Strangle lilo behavior when adding new grub-default distro
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Strangle lilo behavior when adding new grub-default distro
I have a linux-only box. About 6 months ago I had two distros,
Slack 12 and Suse and was using lilo to boot. However, I was running out of space, so I got a 500G SATA disk, and used 200G for a new Slack
installation and also fixed lilo so I could boot any of the three.
So this was(and still is) a perfectly working installation.
Now things become interesting. What do I do with the rest of the SATA disk? I decided install Ubuntu Hardy to give it a try. So I did.
Ubuntu asks me where to install grub, so I tell it to install on its own
root partition, which makes sure it will not mess with my lilo.
Then I grab Ubuntu's vmlinuz and initrd and also config and system
files and copy them to /boot(the same /boot where the vmlinuz of
all other distros are).
I update lilo accordingly by adding another entry and run (each time) lilo
to commit the changes.
This is where trouble starts:
First, I had set the order NewSlack-oldSlack-Suse-hardy
the first 3 work, hardy was failing because it was trying to
use a different root partition, /dev/hdb3 when I specified it lilo that
its root partition was /dev/sda3
Next, I switched the order to
NewSlack-OldSlack-hardy-Suse
The original 3 still work fine, but hardy gets to the
Booting hardy.....
and then gives a hanging screen.
Could it be I am doing something silly here?
Quote:
fdisk -l
Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 24 192748+ 83 Linux
/dev/hdb2 * 25 1218 9590805 83 Linux
/dev/hdb3 1219 2312 8787555 83 Linux
/dev/hdb4 2313 4865 20506972+ 5 Extended
/dev/hdb5 2313 2434 979933+ 82 Linux swap
/dev/hdb6 2435 4865 19526976 83 Linux
Disk /dev/hdc: 30.7 GB, 30758289408 bytes
255 heads, 63 sectors/track, 3739 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 1 127 1020096 82 Linux swap
/dev/hdc2 128 217 722925 83 Linux
/dev/hdc3 218 3739 28290465 83 Linux
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 122 979933+ 83 Linux
/dev/sda2 123 24437 195310237+ 83 Linux
/dev/sda3 24438 48752 195310237+ 83 Linux
/dev/sda4 48753 60801 96783592+ 83 Linux
Disk /dev/sdb: 1998 MB, 1998585856 bytes
16 heads, 32 sectors/track, 7624 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 7624 1951728 e W95 FAT16 (LBA)
mount
/dev/sda2 on / type reiserfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sdb1 on /mnt/My_Book type vfat (rw,noexec,nosuid,nodev)
Here is lilo. The root partitions are as described here
Quote:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hdb
#compact # faster, but won't work on all systems.
prompt
timeout = 300
# VESA framebuffer console @ 1024x768x256
vga = 773
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuzSlack12sda2
root = /dev/sda2
label = Slack12sda2
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
image = /boot/vmlinuz
root = /dev/hdb2
label = Slack12
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
image = /boot/vmlinuzSuse
initrd=/boot/initrd-2.6.11.4-20a-default
root = /dev/hdb3
label = Suse9.3
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
image=/boot/vmlinuz-2.6.24-16-rt
label=hardy
root=/dev/sda3
initrd=/boot/initrd.img-2.6.24-16-rt
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
vga=ask
optional
# Linux bootable partition config ends
Why was Ubuntu trying to use /dev/hdb3? I presume that's the /boot partition, but can't imagine why varying the order of entries should change LILOs behaviour... I wonder what the grub setup for Ubuntu looks like. Maybe there's another kernel option that it uses in its "menu.lst" that you need to include in lilo.
title Ubuntu 8.04, kernel 2.6.24-16-rt (recovery mode)
root (hd2,2)
kernel /boot/vmlinuz-2.6.24-16-rt root=UUID=da504e0e-f885-46aa-9528-e1dfafabb9b0 ro single
initrd /boot/initrd.img-2.6.24-16-rt
title Ubuntu 8.04, memtest86+
root (hd2,2)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb2.
title Slackware Linux (Slackware 12.0.0) (on /dev/sdb2)
root (hd1,1)
kernel /boot/vmlinuz-2.4.22 root=/dev/sdb2
savedefault
etc , which means it has a different disk labelling than other distros
/dev/sdb in slack is the flash and/or an external disk
more stuff
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb2.
title Slackware Linux (Slackware 12.0.0) (on /dev/sdb2)
root (hd1,1)
kernel /boot/vmlinuz-generic-2.6.21.5 root=/dev/sdb2
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb2.
title Slackware Linux (Slackware 12.0.0) (on /dev/sdb2)
root (hd1,1)
kernel /boot/vmlinuz-generic-smp-2.6.21.5-smp root=/dev/sdb2
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb2.
title Slackware Linux (Slackware 12.0.0) (on /dev/sdb2)
root (hd1,1)
kernel /boot/vmlinuz-huge-2.6.21.5 root=/dev/sdb2
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb2.
title Slackware Linux (Slackware 12.0.0) (on /dev/sdb2)
root (hd1,1)
kernel /boot/vmlinuz-huge-smp-2.6.21.5-smp root=/dev/sdb2
savedefault
boot
you mean
append="root=/dev/sda3/by-uuid/da504e0e-f885-46aa-9528-e1dfafabb9b0 ro"
?
what is the da50....?
I can try, but why isn't that necessary for the other systems?
I used the Suse CD to boot Ubuntu. It gets mixed up
says "failed to start the X server, likely not set up correctly"
/var/log/Xorg.0.log says "
Code:
(EE) GARTInit: Unable to open /dev/agpgart (No such device)
(WW) intel(0): /dev/agpgart is either not available, or no memory is available
for allocation. Using pre-allocated memory only.
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed
[drm] failed to load kernel module "i915"
(EE) [drm] drmOpen failed.
(EE) intel(0): [dri] DRIScreenInit failed. Disabling DRI.
(==) intel(0): VideoRam: 8060 KB
(**) intel(0): Framebuffer compression disabled
(**) intel(0): Tiling enabled
(WW) intel(0): Failed to allocate Overlay register space.
(WW) intel(0): Failed to allocate EXA offscreen memory.
(EE) intel(0): Couldn't allocate video memory
Fatal server error:
AddScreen/ScreenInit failed for driver 0
and had to disable X, but it gives me a prompt and I can get in
There is nothing in /var/log/messages
other than:
Code:
Jun 28 19:44:54 myhost syslogd 1.5.0#1ubuntu1: restart.
Jun 28 19:52:31 myhost exiting on signal 15
(I could see that by mounting
/dev/sda3 of course, but the fact that I can get an ubuntu shell means the installation is usable). I suspect the problem is X, i.e. by default Ubuntu would boot in X.
I also did dmesg and I get a strange message I do not make much out of:
JBD: barrier-based sync failed on sda3 - disabling barriers
Here is dmesg:
Code:
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
ppa: Version 2.07 (for Linux 2.4.x)
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
raid5: automatically using best checksumming function: pIII_sse
pIII_sse : 2200.000 MB/sec
raid5: using function: pIII_sse (2200.000 MB/sec)
md: raid5 personality registered as nr 4
raid6: int32x1 437 MB/s
raid6: int32x2 605 MB/s
raid6: int32x4 437 MB/s
raid6: int32x8 398 MB/s
raid6: mmxx1 1394 MB/s
raid6: mmxx2 1746 MB/s
raid6: sse1x1 875 MB/s
raid6: sse1x2 1023 MB/s
raid6: sse2x1 1375 MB/s
raid6: sse2x2 1757 MB/s
raid6: using algorithm sse2x2 (1757 MB/s)
md: raid6 personality registered as nr 8
md: multipath personality registered as nr 7
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com
BIOS EDD facility v0.16 2004-Jun-25, 3 devices found
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
SGI XFS with ACLs, security attributes, realtime, large block numbers, no debug enabled
SGI XFS Quota Management subsystem
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
SGI XFS with ACLs, security attributes, realtime, large block numbers, no debug enabled
SGI XFS Quota Management subsystem
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
ReiserFS: hdb2: found reiserfs format "3.6" with standard journal
ReiserFS: hdb2: using ordered data mode
reiserfs: using flush barriers
ReiserFS: hdb2: journal params: device hdb2, size 8192, journal first block 18, max trans len 1024,
max batch 900, max commit age 30, max trans age 30
ReiserFS: hdb2: checking transaction log (hdb2)
reiserfs: disabling flush barriers on hdb2
ReiserFS: hdb2: Using r5 hash to sort names
ReiserFS: hdb3: found reiserfs format "3.6" with standard journal
ReiserFS: hdb3: using ordered data mode
reiserfs: using flush barriers
ReiserFS: hdb3: journal params: device hdb3, size 8192, journal first block 18, max trans len 1024,
max batch 900, max commit age 30, max trans age 30
ReiserFS: hdb3: checking transaction log (hdb3)
reiserfs: disabling flush barriers on hdb3
ReiserFS: hdb3: Using r5 hash to sort names
ReiserFS: hdb6: found reiserfs format "3.6" with standard journal
ReiserFS: hdb6: using ordered data mode
reiserfs: using flush barriers
ReiserFS: hdb6: journal params: device hdb6, size 8192, journal first block 18, max trans len 1024,
max batch 900, max commit age 30, max trans age 30
ReiserFS: hdb6: checking transaction log (hdb6)
reiserfs: disabling flush barriers on hdb6
ReiserFS: hdb6: Using r5 hash to sort names
ReiserFS: hdc2: found reiserfs format "3.6" with standard journal
ReiserFS: hdc2: using ordered data mode
reiserfs: using flush barriers
ReiserFS: hdc2: journal params: device hdc2, size 8192, journal first block 18, max trans len 1024,
max batch 900, max commit age 30, max trans age 30
ReiserFS: hdc2: checking transaction log (hdc2)
reiserfs: disabling flush barriers on hdc2
ReiserFS: hdc2: Using r5 hash to sort names
ReiserFS: hdc3: found reiserfs format "3.6" with standard journal
ReiserFS: hdc3: using ordered data mode
reiserfs: using flush barriers
ReiserFS: hdc3: journal params: device hdc3, size 8192, journal first block 18, max trans len 1024,
max batch 900, max commit age 30, max trans age 30
ReiserFS: hdc3: checking transaction log (hdc3)
reiserfs: disabling flush barriers on hdc3
ReiserFS: hdc3: Using r5 hash to sort names
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
ReiserFS: sda2: found reiserfs format "3.6" with standard journal
ReiserFS: sda2: using ordered data mode
reiserfs: using flush barriers
ReiserFS: sda2: journal params: device sda2, size 8192, journal first block 18, max trans len 1024,
max batch 900, max commit age 30, max trans age 30
ReiserFS: sda2: checking transaction log (sda2)
reiserfs: disabling flush barriers on sda2
ReiserFS: sda2: Using r5 hash to sort names
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
EXT3 FS on sda3, internal journal
JBD: barrier-based sync failed on sda3 - disabling barriers
you mean
append="root=/dev/sda3/by-uuid/da504e0e-f885-46aa-9528-e1dfafabb9b0 ro"
?
what is the da50....?
I can try, but why isn't that necessary for the other systems?
That's the file system UUID method of specifying the root file system. Ubuntu uses that and I wonder whether it's startup scripts don't care for "/dev/sdaX" or "/dev/hdaX".
However, you might be on to something with the graphical logon problem. You could try starting at a different runlevel; see this:
The other thing which occurred to me is that when you copied over the file systems whether or not the devices in /dev and symlinks were (1) copied over and (2) with their owners and permissions unchanged. When you do logon using your boot CD you might want to check on that with ls -l. From my limited understanding of udev, some or all of the devices are remade everytime you boot, but if you have improperly owned devices already, perhaps that's what's borking up things so that you have no /dev/agpgart, for example.
Having said that, it seems like your Suse CD boot trick might not have set up Ubuntu properly. I'd try using the ubuntu rescue disk to do the same thing in "rescue" mode to see if it works better:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.