The officially official Devuan Forum!

You are not logged in.

#1 2018-03-03 17:11:19

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

How to replace Grub2 with Lilo? KISS multiboot configuration.

I  would like to know how to replace Grub2 with Lilo. I am running a vanilla Debian Jessie system with i3wm. I have a multiboot system with Win 10 and a brand new Salix OS install, each on separate hard disks. The Salix OS has no bootloader as I was planning on using Grub2, but I am tired of jumping through hoops every time that I need to make a change to my boot configuration. KISS with Lilo is my new motto smile but how do I replace Grub2 with a working Lilo bootloader? I have absolutely no experience with Lilo. The searches I have done all seem to be about replacing Lilo with Grub or Grub2. Thanks


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#2 2018-03-04 23:55:22

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

I finally got a lilo.conf file to look at, in my case from a Salix OS install. The file seems to be able to be divided into three parts. The most important (bottom) appears to be the actual boot instructions, which I have attempted to modify for my setup:

# Linux bootable partition config begins
image = /boot/vmlinuz
# root = /dev/sda1
  root=UUID="cca59513-f81b-4cbd-9814-e72a3c6b3dfb"
  label = Devuan
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
# root = /dev/sdd1
  root=UUID="bfb77a63-55ab-4552-a3ac-72ab9277ad82"
  label = Salix
  read-only
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/sda1
  label = Windows
# table = /dev/sdc
  table=UUID="E6BCC326BCC2F05B"
# Windows bootable partition config ends

The next most important appears to be at the very top, telling lilo where to start lilo from:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append="quiet  vt.default_utf8=1"
boot = /dev/sda

Next comes VGA configuration. This will have to be something generic as my NVIDIA driver/blob thingy kicks in later. I think the current setting should be safe:

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 50
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x64k
vga = 791
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769

Lastly comes the appearance. It would be nice with some purpy goodness with logo, but not sure how to configure that. Here is the stock code:

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/salix.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 12,0,10,0,9,9
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 5,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 70,6,14,0

However, before I install Lilo or make the necessary changes to the /etc/lilo.conf file, I will need to run:

$ sudo apt-get purge grub2-common grub-pc grub-pc-bin

and

# dd if=/dev/zero of=/dev/sda bs=446 count=1

Am I on the right track?

Last edited by devuan_dk_fan (2018-03-05 10:00:53)


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#3 2018-03-06 12:40:50

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

There should be lots of instructions for using lilo with debian. They'll all be old, but they should still work. It's been years since I've used lilo. Some of what you posted looks familiar, and some is new to me.

More recently, I've tried extlinux, which might be easier than lilo.
https://dev1galaxy.org/viewtopic.php?id=555

Offline

#4 2018-03-06 16:49:55

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

fsmithred wrote:

There should be lots of instructions for using lilo with debian. They'll all be old, but they should still work. It's been years since I've used lilo. Some of what you posted looks familiar, and some is new to me.

More recently, I've tried extlinux, which might be easier than lilo.
https://dev1galaxy.org/viewtopic.php?id=555

Thank you for your reply fsmithred. I have yet to be able to find instructions for my situation - multiboot with two different Linux distribution installations. I have gone so far as to install new, standard XFCE based distributions on two different computers, to get some practical experience with the resultant Lilo bootloader installs to the MBR. One of the distributions is of course Devuan, while the other has been Salix OS. On the computer with one hard disk configured for both Devuan and Salix to reside, installing Lilo to the MBR has failed with both distros 95% of the time, regardless of whether the MBR had been wiped before a reboot and a new install with alternating distros on alternating partition configurations. The Devuan installer kicked up the error:

Configuring lilo-installer failed error code 1. Menu item lilo-installer failed.

The Salix OS installer typically froze. If an install of Lilo to the MBR succeeded, only the Salix OS install was configured.

At this time, on my tower computer, I have a triple boot system, with both Devuan and Windows configured correctly out of the box. The Salix OS installation was ignored, so I am trying to edit the lilo.conf file by hand. The bits for Devuan are configured correctly with UUID and "/dev/disk/by-id/". The Salix entry, unfortunately seems to keep picking up on the Devuan kernel, so something is not configured correctly. I load the partition first:

$ udisksctl mount -b /dev/sdd1
Mounted /dev/sdd1 at /media/username/9d2c1561-d6d7-4651-9373-bcd440c289dd.

I then run:

$ sudo lilo -v
LILO version 24.1 (released 17-October-2014)

(...)

Compiled at 19:47:36 on Oct 17 2014
Debian GNU/Linux

Warning: LBA32 addressing assumed
Reading boot sector from /dev/disk/by-id/ata-ST2000DM001-1CH164_S1E21XPJ
Using MENU secondary loader
Calling map_insert_data

Boot image: /vmlinuz -> boot/vmlinuz-3.16.0-4-amd64
Mapping RAM disk /initrd.img -> /boot/initrd.img-3.16.0-4-amd64
Added Devuan  *

Skipping /vmlinuz.old
Boot image: /vmlinuz -> boot/vmlinuz-3.16.0-4-amd64
Added Salix

Boot other: /dev/sdc1, on /dev/sdc, loader CHAIN
Added Windows

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
One warning was issued.
$ ls /media/username/9d2c1561-d6d7-4651-9373-bcd440c289dd/boot/ | grep vmlinuz
vmlinuz
vmlinuz-huge
vmlinuz-huge-4.4.19

The Salix section currently looks like this:

# Salix OS bootable partition config begins
# /dev/sdd1
# boot=/dev/disk/by-id/ata-WDC_WD1002FAEX-00Y9A0_WD-WCAW30125528
	root="UUID=9d2c1561-d6d7-4651-9373-bcd440c289dd"
	image=/vmlinuz
	label=Salix
#   read-only
#	restricted
#	alias=3
# End Salix OS configuration

Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#5 2018-03-06 19:00:47

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

I was going to suggest that you get one working and then edit the boot menu manually. You beat me to it.

Maybe you need to change the path to the salix kernel to image=/boot/vmlinuz

Offline

#6 2018-03-06 20:53:12

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

fsmithred wrote:

I was going to suggest that you get one working and then edit the boot menu manually. You beat me to it.

Maybe you need to change the path to the salix kernel to image=/boot/vmlinuz

I tried changing it to:

image=/media/username/9d2c1561-d6d7-4651-9373-bcd440c289dd/boot/vmlinuz

Unfortunately, there was some sort of panic during boot up:
"EOI panic+0x1b7/0x1f0
(...)
3.762164 -[end trace 6e0a640ecf8d150a]---"

Last edited by devuan_dk_fan (2018-03-06 20:53:31)


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#7 2018-03-07 11:53:32

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

OK, I am told that this is apparently unique to Slackware based systems. The installer installs a "huge" kerrnel with no initrd. To multiboot with Salix and Lilo, I will apparently have to install a "generic" kernel and then generate an initrd manually. As this was about Lilo and Devuan, I am considering installing an alternative distro that automatically generates an initrd during install to solve this issue with Devuan, Lilo and multibooting.

Last edited by devuan_dk_fan (2018-03-07 11:54:15)


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#8 2018-03-07 13:12:06

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

image=/media/username/9d2c1561-d6d7-4651-9373-bcd440c289dd/boot/vmlinuz

When you are in the process of booting devuan, the filesystem that holds the devuan kernel is not mounted on /media/username. You need to tell the bootloader the location of the kernel before anything is mounted.

I don't think the lack of an initrd in salix should have any impact on devuan. Lilo is happy to boot an OS with or without initrd. It's just a matter of getting the stanza right.

Offline

#9 2018-03-07 21:05:17

laprjns
Member
Registered: 2018-03-07
Posts: 2  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

fsmithred wrote:

I don't think the lack of an initrd in salix should have any impact on devuan. Lilo is happy to boot an OS with or without initrd. It's just a matter of getting the stanza right.

In generral this is true however the OP has choosen to used UUIDs in th path for liloconfig root file systems directive (i.e. root_)  lilo cannot pass root file system paths to the kernel when UUIDs are used.  This requires a initrd.

The Slackware installer, and therefore, Salix installer installs the kernel-huge as default.  This kernel has everthing but the kitchen sink complied into it so as to work on as many different system. Slackware does not recommand that user contiune to used the kernel-huge but rather recommends that a the user either complies thier own kernel or use the generic kernel with an initrd.

image=/media/username/9d2c1561-d6d7-4651-9373-bcd440c289dd/boot/vmlinuz

It is correct. This path is not the one that gets passed to the kernel. It specifies where the kernel image can be found in the currently running OS.

Offline

#10 2018-03-09 07:09:50

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

laprjns wrote:
image=/media/username/9d2c1561-d6d7-4651-9373-bcd440c289dd/boot/vmlinuz

It is correct. This path is not the one that gets passed to the kernel. It specifies where the kernel image can be found in the currently running OS.

Which is important on a computer like mine, where the /dev/sdX1 path changes, depending on (apparently) the BIOS's view of the situation.


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#11 2018-03-10 00:26:06

laprjns
Member
Registered: 2018-03-07
Posts: 2  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

devuan_dk_fan wrote:

Which is important on a computer like mine, where the /dev/sdX1 path changes, depending on (apparently) the BIOS's view of the situation.

I don't know if its the BIOS causing the problem but it does bring up a question.  Have you updated the bios to the lastest version available from the motherboard manufacture? It might be a good idea to do that, especially if it is UEFI.

Offline

#12 2018-03-11 11:51:22

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

laprjns wrote:
devuan_dk_fan wrote:

Which is important on a computer like mine, where the /dev/sdX1 path changes, depending on (apparently) the BIOS's view of the situation.

I don't know if its the BIOS causing the problem but it does bring up a question.  Have you updated the bios to the lastest version available from the motherboard manufacture? It might be a good idea to do that, especially if it is UEFI.

Yes, thanks. I have been experiencing so many problems with multiboot and both Grub 2 and Lilo combined with my relatively new motherboard, that I have decided to reinstall everything using UEFI.

Last edited by devuan_dk_fan (2018-03-11 11:52:18)


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#13 2018-03-11 15:24:31

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 95  

Re: How to replace Grub2 with Lilo? KISS multiboot configuration.

This thread is now forked as I have reinstalled Devuan using my computer's UEFI, rather than legacy mode and have been getting some other problems. The thread is here:
https://dev1galaxy.org/viewtopic.php?id=1931

Last edited by devuan_dk_fan (2018-03-11 16:49:01)


Military justice is to justice what military music is to music. - Groucho Marx
I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

Board footer