[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recreating a second boot kernel in LILO



On Sat, Jan 14, 2017, at 11:38, Stephen Powell wrote:
> 
> If there are special kernels that you want to be able to boot which are outside
> the normal "last two", then you must manually edit /etc/lilo.conf to provide
> the capability to boot this kernel, then run lilo.
> 
As an example, here is a copy of my /etc/lilo.conf for one of my machines which
uses non-parity memory.  Non-parity memory is cheaper, but memory errors cannot
be directly detected.  However, there are programs one can run if one suspects that
he/she has a bad memory stick.  One such program, memtest86+, provides a stand-alone
memory testing program built to resemble a Linux kernel, so that Linuxboot loaders
think it is a Linux kernel and will load it like one (the entire boot image is
loaded, not just a single sector, as with "other").

        # /etc/lilo.conf
        #
        # global options
        #
        #boot=/dev/sda1
        boot=/dev/disk/by-uuid/e150000c-a23a-4f1e-bb6b-8ca0b512cff2
        compact
        default=Linux
        delay=40
        #
        # This allows lilo to correctly handle the USB-attached floppy drive.
        # It is used in conjunction with a user-created udev rule which
        # creates a symbolic link between /dev/fd0 and the actual device name
        # for the USB-attached floppy drive in the current boot.
        #
        #disk=/dev/sdb
        disk=/dev/fd0
                bios=0x00
        #
        # This is the disk geometry reported by BIOS Int 13h Function 08h
        # for the hard disk.  Specifying it here allows the "geometric"
        # option to work.  However, we are not using the "geometric" option.
        # The disk geometry reported by BIOS Int 13h Function 08h is
        # reported here for reference purposes only.  
        #
        #disk=/dev/sda
        disk=/dev/disk/by-id/ata-Samsung_SSD_840_EVO_120GB_S1D5NSBDB61675Y
                sectors=63
                heads=240
                cylinders=1024
        #
        install=text
        large-memory
        #
        # The BIOS supports EDD, but linear is used instead of lba32 in order
        # to get maximum benefit out of the compact option: 128 sectors
        # per BIOS call.
        #
        linear
        map=/boot/map
        #
        # per-image options
        #
        image=/boot/vmlinuz
                label=Linux
                initrd=/boot/initrd.img
                append="net.ifnames=0"
                read-only
                #root=/dev/sda6
                root="UUID=1af2bc58-83f7-44f8-af32-94d1dd54701e"
                vga=normal
        #
        image=/boot/vmlinuz.old
                label=LinuxOLD
                initrd=/boot/initrd.img.old
                append="net.ifnames=0"
                read-only
                #root=/dev/sda6
                root="UUID=1af2bc58-83f7-44f8-af32-94d1dd54701e"
                vga=normal
                optional
        #
        image=/boot/memtest86+.bin
                label=memtest86+

The first two "image" entries define the standard "most recent" and
"next-most recent" kernels and don't need to be messed with, provided
that the standard symbolic link names are being maintained by
"do_symlinks = yes" in /etc/kernel-img.conf or by installation of the
xy-symlinks kernel hook scripts.
 
The third "image" entry defines the stand-alone memtest86+ program.
To run it, the user types "memtest86+" (without the quotes) at a LILO
"boot:" prompt.  This boot entry may be thought of as a special Linux
kernel which is outside the normal cycle of "most recent" and
"next-most recent".

-- 
  .''`.     Stephen Powell    <zlinuxman@fastmail.com>
 : :'  :
 `. `'`
   `-


Reply to: