The Kermacs Guide

Forum rules
Share your brain ;)
User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

The Kermacs Guide

Unread post by franksinistra » Mon Nov 30, 2015 6:10 am

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
Last edited by franksinistra on Tue Dec 01, 2015 11:36 pm, edited 2 times in total.
rice no more.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: The Kermacs Guide

Unread post by GekkoP » Mon Nov 30, 2015 8:59 am

Yay! Thanks for the write-up, frank.

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: The Kermacs Guide

Unread post by pidsley » Mon Nov 30, 2015 2:10 pm

Thank you!

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: The Kermacs Guide

Unread post by ChefIronBelly » Mon Nov 30, 2015 2:25 pm

Nice thanks for the write up
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: The Kermacs Guide

Unread post by pidsley » Mon Nov 30, 2015 6:56 pm

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

User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

Re: The Kermacs Guide

Unread post by franksinistra » Tue Dec 01, 2015 1:57 am

^ Yup, and thank you once again for such a cool release.
rice no more.

Post Reply