LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-20-2009, 02:14 PM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
Can't boot Ubuntu from Slackware with lilo


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
read-only

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 ?
 
Old 03-20-2009, 02:40 PM   #2
Kelean
Member
 
Registered: Dec 2004
Location: G. R. Michigan
Distribution: Absloute 12.x and Slackware 12.0
Posts: 71

Rep: Reputation: 15
Look at your /ect/fstab file. See it your ubuntu partition is listed correctly. Also check lilo to see if it was changed durning the update.
 
Old 03-20-2009, 04:02 PM   #3
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 793

Rep: Reputation: 245Reputation: 245Reputation: 245
Quote:
Originally Posted by Linux.tar.gz View Post
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
read-only

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.

Code:
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
  read-only
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.

=========== Slack
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
=========== BIOS
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".
 
Old 03-20-2009, 04:03 PM   #4
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
I read something similar here. It seems that Ubuntu made some changes that affected this person while using grub.
http://www.linuxquestions.org/questi...ptions-689878/

It's something about a change in inode size. Since you only did an upgrade, maybe this is not your problem.
 
Old 03-20-2009, 04:17 PM   #5
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 793

Rep: Reputation: 245Reputation: 245Reputation: 245
Quote:
Originally Posted by ajlewis2 View Post
I read something similar here. It seems that Ubuntu made some changes that affected this person while using grub.
http://www.linuxquestions.org/questi...ptions-689878/

It's something about a change in inode size. Since you only did an upgrade, maybe this is not your problem.
I have run into the inode size issue with Ubuntu and Slackware. The old default size for inodes in ext2/ext3 was 128 bytes. Both Slackware and Ubuntu now default to using a 256-byte inode. The "grub" included with Slackware packages has been patched to support 256-byte inodes and so has the "lilo" included with Slackware.

If one downloads "lilo" or "grub" from somewhere else one has to be sure that they support the 256-bit inodes or format the partitions using 128-byte inodes.

I have found that many programs such as Paragon Hard Disk Backup and the ext2ifs driver for Windows do not support the 256-byte inodes. I always format partitions using 128-byte inodes. That is a little bit difficult since it has to be done before using the Slackware "setup" program.

mke2fs -j -I 128 /dev/hda2

The "/dev/hda2" has to be replaced with the correct Linux device name for the partition. The "-j" option enables journalling (ext3 filesystem) and it can be omitted to format using no journal (ext2). The "-I" option specifies the size of inodes.

One can verify the inode size using this command.

tune2fs -l /dev/hda2

After formatting the partition then Slackware can be installed using the normal "setup" command. Just make sure not to reformat the partition during "setup". Use the existing partition as is.

I'm not sure exactly how to get a command prompt in Ubuntu setup but it should be possible to do the same thing. It may be easier just to create and format the Ubuntu partition using Slackware and then install Ubuntu to the existing partition.
 
Old 03-20-2009, 04:51 PM   #6
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current, OpenBSD
Posts: 449

Rep: Reputation: 41
Last time I was brave enough to try fedora and ubunu got into something similar. I searched this forums and came across something that helped. I don't remember at the moment how to get that info, but here's a copy from that old lilo.conf. Notice the UUID was what fixed it for me.
Good luck

Code:
# Ubuntu
image = /mnt/ubuntu/boot/vmlinuz-2.6.27-7-generic
#  initrd = /mnt/fedora/boot/initrd-2.6.25-14.fc9.i686.img
  initrd = /mnt/ubuntu/boot/initrd.img-2.6.27-7-generic
 # root = /dev/hda9
  root = "UUID=473fcc12-22a2-41b3-b25d-92b66cb26a99"
  label = Ubuntu
  read-only
 
Old 03-20-2009, 06:03 PM   #7
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 793

Rep: Reputation: 245Reputation: 245Reputation: 245
Quote:
Originally Posted by MannyNix View Post
Last time I was brave enough to try fedora and ubunu got into something similar. I searched this forums and came across something that helped. I don't remember at the moment how to get that info, but here's a copy from that old lilo.conf. Notice the UUID was what fixed it for me.
Good luck

Code:
# Ubuntu
image = /mnt/ubuntu/boot/vmlinuz-2.6.27-7-generic
#  initrd = /mnt/fedora/boot/initrd-2.6.25-14.fc9.i686.img
  initrd = /mnt/ubuntu/boot/initrd.img-2.6.27-7-generic
 # root = /dev/hda9
  root = "UUID=473fcc12-22a2-41b3-b25d-92b66cb26a99"
  label = Ubuntu
  read-only
That's a very good suggestion. I think that one can use either the UUID or a device name. If the device name doesn't work then the UUID might be the best solution. I'm not exactly sure how to find out the UUID but I'm sure there is a way.
 
Old 03-20-2009, 07:53 PM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
I'm not exactly sure how to find out the UUID but I'm sure there is a way.
As root run blkid to find out UUID's.
 
Old 03-20-2009, 07:55 PM   #9
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Quote:
Originally Posted by Erik_FL View Post
I'm not exactly sure how to find out the UUID but I'm sure there is a way.

ls -l /dev/disk/by-uuid/
 
Old 03-21-2009, 04:12 AM   #10
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Thanks all for your help and suggestions.
It appears Ubuntu can boot again, due to some magic, because i came back to my initial setup after many tweaks.
I remember i used to launch lilo twice with an old machine... Maybe i have to do the same here.

Thanks again.
 
Old 03-21-2009, 08:25 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,046
Blog Entries: 1

Rep: Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370
Hi,

Quote:
Originally Posted by Erik_FL View Post
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.
I'm not going to get into a semantics or a 'pissing' contest but your definitions are not correct. BIOS does boot the system but will load the 'IPL' bootloader. If that bootloader happens to be 'lilo' then the information from the 'lilo.conf' file was used to create the 'IPL' at creation. If you wish to use the BIOS system device configurations then you can do so but not necessary with 'Linux'. Just remember that BIOS >IPL > SPL! Some fall into the M$ trap. This is GNU/Linux an we can use the system not the system using us.

Quote:
Originally Posted by Erik_FL View Post
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.
I'm sorry but your definitions are not complete. Once the information is passed via the IPL > SPL then devices are handled by the kernel. The initrd is nothing more than a temporary filesystem that is utilized by the kernel.
A user will create the 'initrd' to reflect the installed system.

Code:
excerpt from SlackwareŽ 12.2
'/boot/README.initrd';

1.  What is an initrd?

Initrd stands for "initial ramdisk".  An initial ramdisk is a very small
Linux filesystem that is loaded into RAM and mounted as the kernel boots,
and before the main root filesystem is mounted.

2.  Why do I need an initrd?

The usual reason to use an initrd is because you need to load kernel
modules before mounting the root partition.  Usually these modules are
required to support the filesystem used by the root partition (ext3,
reiserfs, xfs), or perhaps the controller that the hard drive is attached
to (SCSI, RAID, etc).  Essentially, there are so many different options
available in modern Linux kernels that it isn't practical to try to ship
many different kernels to try to cover everyone's needs.  It's a lot more
flexible to ship a generic kernel and a set of kernel modules for it.
Code:
Quote:
Originally Posted by Erik_FL View Post
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.
Code:
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
  read-only
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. =========== Slack 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 =========== BIOS 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".
Your above definition or explanation should be corrected.

The idea is that the kernel will utilize the 'initrd' ( a temporary filesystem) that a user creates to load the filesystem along with required modules to support the actions. Any modules that are not defined directly but are need with a directed module will be loaded. The kernel does the actions not the 'initrd'.

As for lilo it will utilize the 'lilo.conf' file to create IPL that could be written to the 'MBR' or the superblock. This will depend on how someone wants to control their system. A bootloader of some sort must be used as the IPL to pass control to the SPL. That SPL could be grub, lilo or io.sys that will depend on configuration of the original bootloader. Chainloading anyone?

Again don't take offense but your definitions need polish.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Advice for Lilo setup: Dual Boot Slackware / Ubuntu andrew.46 Slackware 26 10-01-2008 03:26 PM
LILO no finding Ubuntu partition after Slackware 12 install Paul_M Linux - General 4 10-28-2007 10:08 AM
Kernel 2.6.81 Won't Boot with LILO under Slackware 10.0 pwo Linux - Software 2 10-22-2004 01:40 AM
I can't boot slackware! LILO not work! froxass Slackware - Installation 4 03-15-2004 01:08 PM
I install Slackware on small HDD with LILO, can't boot LILO? kleptophobiac Slackware 4 08-10-2003 04:50 PM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration