Originally Posted by Linux.tar.gz
I installed Ubuntu Studio without grub.
Then i added this to my lilo.conf :
image = /mnt/hd/sda5/boot/vmlinuz-2.6.27-7-generic
root = /dev/sda5
label = UbuntuStudio
initrd = /mnt/hd/sda5/boot/initrd.img-2.6.27-7-generic
It worked fine until i updated Ubuntu.
Now i can't boot neither new or old kernel...
I only get a can't find /root error message, and a shell.
A detail : my first hd is IDE, so Slack recognize it as hda, and Ubu, sda.
Putting root = /dev/sdb5 gives me Fatal: Illegal 'root=' specification: /dev/sdb5
But it worked anyway with root = /dev/sda5 .
Any idea ?
In order to sort this out you have to keep in mind the different contexts in which LILO will execute and LILO boot parameters will be used.
- BIOS boot time (lilo menu)
- LILO configuration (Slack is booted)
- Ubuntu boot time (Ubuntu is booted)
At BIOS boot time when lilo displays the boot menu, it uses BIOS disk drive ID's such as 0x80, 0x81, etc. to refer to drives and it uses the sector addresses of files to load the files. The device names in Linux are no longer used by lilo after "lilo" has been installed / updated using the "lilo" configuration command.
The "image" and "initrd" options are evaluated when lilo is configured using the "lilo" command in Slack. After you make ANY changes to "lilo.conf" you have to run the "lilo" command and that essentially parses the configuration and writes it to the boot sector for lilo. The "image" and "initrd" information is converted to a hard disk ID 0x80, 0x81, 0x82, etc and sector addresses on the disks. The names of devices are only important for the "lilo" configuration command and are not used by "lilo" when it actually loads the files.
So you want "image" and "initrd" to use the device names as Slack knows them NOT Ubuntu. That allows the "lilo" configuration command to figure out the corresponding drive ID and sector addresses for each file.
The "root" option is passed to the Linux kernel (Ubuntu) and must be from the perspective of Ubuntu device naming for the root device. The "root" option is not used by "lilo" at all. It is just stored along with other kernel parameters (text) passed to the kernel. Ubuntu is the kernel in this case so "root" must be the correct information for Ubuntu. Ubuntu will use the root device name plus the "read-only" option for mounting the root device AFTER the Ubuntu kernel has initialized.
If the root device driver in Ubuntu is a module then you have to make sure that the "initrd" image file loads that module and any other required modules. The standard "initrd" image for Ubuntu probably loads the required driver unless you have an unusual hard disk controller card/chip. The "initrd" image does things from the standpoint of Ubuntu and not Slack and must be built using Ubuntu.
Here is my suggestion for a possible solution.
image = /mnt/hd/hda5/boot/vmlinuz-2.6.27-7-generic
root = /dev/sda5
label = UbuntuStudio
initrd = /mnt/hd/hda5/boot/initrd.img-2.6.27-7-generic
After you change that in "lilo.conf" don't forget to use the "lilo" command. If you copied the boot block to a file for Windows then update the copy of the boot block as well.
To clarify how this whole process works here is basically what happens.
You edit the "lilo.conf" file using Slack
You run the "lilo" command in Slack
The "lilo" command converts devices/files to disk ID/sector
The "lilo" command writes the "lilo" boot sectors
You start up the computer
Lilo loads and displays the menu
Lilo uses the disk drive ID and sector information to load the Ubuntu kernel into memory.
Lilo uses the disk drive ID and sector information to load the initrd image (RAM disk filesystem) into memory.
=========== Ubuntu Kernel
Lilo starts the Ubuntu kernel specifying the kernel parameters provided, including information for "root=" and the RAM disk filesystem.
Ubuntu mounts and runs the init script for the "initrd" filesystem image.
The "initrd" script loads required modules and does other things to make the root device accessible.
The "initrd" script mounts the root device (read-only) and then starts the Ubuntu "init" task that completes the initialization of the system.
It IS important which operating system you use to run the "lilo" command because device names used in "image" and "initrd" must be for that operating system (not the one ultimately being booted). You may need a different "lilo.conf" depending on which operating system will update the lilo configuration with "lilo".