Page 1 of 1

The Kermacs Guide

Posted: Mon Nov 30, 2015 6:10 am
by franksinistra
So Pids asked me to write a how-to for booting Kermacs with Lilo. I figured since it's lunchtime, i'm gonna write it. This can be applied to Szalonna as well.

Requirements: The How-tos:
  • 1. Extract kermacs to your flashdrive

    Code: Select all

     
    # mount /dev/sdX /tmp/kermacs 
    # cp linuxbbq-kermacs-1126.txz /tmp/kermacs 
    # cd /tmp/kermacs && tar xpvf linuxbbq-kermacs-1126.txz
    
    2. Install LILO to your flashdrive, i like to compile it statically

    Code: Select all

    $ cd $lilo-source-dir
    # make alles
    # make DESTDIR=/tmp/kermacs install
    
    ###### remove the bloats ########
    # rm -rf /tmp/kermacs/etc/initramfs /tmp/kermacs/etc/kernel 
    
    3. Now that you have lilo installed to your flash-drive, move your kernel to its designated place in /tmp/kermacs/boot.

    For example, i use towo/siduction's latest 4.3 kernel. So i just have to copy /boot/vmlinuz-4.3.0-towo.3-siduction-686-pae to /tmp/kermacs/boot, don't forget the initrd. Also copy the /lib/modules/$kernel-version directory to /tmp/kermacs/lib/modules/$kernel-version. If you're (like me) testing kermacs on a relatively new hardware: Z-170 Skylake which isn't supported by 3.xx kernel. The shipped kernel worked super fine with other hardware configuration. For an instruction of using the shipped kernel, take a look at Pidsley's post.

    4. Symlink the kernel and initrd to the root (/) of kermacs. 'ls -l' should give you an idea what to symlink.

    5. Write lilo.conf to /tmp/kermacs/etc/lilo.conf

    Code: Select all

    boot=/dev/sdX
    
    default=Kermacs
    timeout=50
    lba32 
    prompt
    compact
    
    # Kermacs entry
      image=/boot/vmlinuz-4.3.0-towo.3-siduction-686-pae
      initrd=/boot/initrd.img-4.3.0-towo.3-siduction-686-pae
      append="init=/linuxrc rootfstype=ext4"
      root=/dev/sdX1
      read-only
      label=Kermacs
    
    You can add debian.bmp to the lilo conf too (if that's your thing.)

    5. Chroot to your kermacs, and run lilo

    Code: Select all

    
    # cd /tmp/kermacs
    # for d in dev proc sys run; do mount --bind /$d $d; done
    # chroot . /bin/bash
    # /sbin/lilo.static 
    
    

    6. Reboot to the usb, and enjoy it.

You can for instance replace lilo with syslinux/grub, but since i really like lilo i haven't tried other bootloader(s). Hmmm not really, i've tried UEFI booting before, and it worked. Just uhhh nobody seems to care about uefi right?

EDIT_1: adding syslinux/grub part
EDIT_2: Fix typo

Re: The Kermacs Guide

Posted: Mon Nov 30, 2015 8:59 am
by GekkoP
Yay! Thanks for the write-up, frank.

Re: The Kermacs Guide

Posted: Mon Nov 30, 2015 2:10 pm
by pidsley
Thank you!

Re: The Kermacs Guide

Posted: Mon Nov 30, 2015 2:25 pm
by ChefIronBelly
Nice thanks for the write up

Re: The Kermacs Guide

Posted: Mon Nov 30, 2015 6:56 pm
by pidsley
If you just want to use the kernel that is included with Kermacs, you can skip steps 3 and 4, and change the lilo.conf as follows:

Code: Select all

boot=/dev/sdX

default=Kermacs
timeout=50
lba32
prompt
compact

# Kermacs entry
  image=/vmlinuz
  initrd=/initrd.img
  append="init=/linuxrc rootfstype=ext4"
  root=/dev/sdX1
  read-only
  label=Kermacs

Re: The Kermacs Guide

Posted: Tue Dec 01, 2015 1:57 am
by franksinistra
^ Yup, and thank you once again for such a cool release.