LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-26-2008, 05:38 AM   #1
svar
Member
 
Registered: Jul 2003
Posts: 360

Rep: Reputation: 30
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
 
Old 06-26-2008, 03:02 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,776
Blog Entries: 14

Rep: Reputation: 274Reputation: 274Reputation: 274
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.
 
Old 06-26-2008, 04:18 PM   #3
svar
Member
 
Registered: Jul 2003
Posts: 360

Original Poster
Rep: Reputation: 30
/dev/hdb3 is the Suse root, not the boot partition

the only options in menu.lst that are not commented are
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

But note I did not try to boot from grub, so I have no idea if it works


title Ubuntu 8.04, kernel 2.6.24-16-rt
root (hd2,2)
kernel /boot/vmlinuz-2.6.24-16-rt root=UUID=da504e0e-f885-46aa-9528-e1dfafabb9b0 ro quiet spl
ash
initrd /boot/initrd.img-2.6.24-16-rt
quiet

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

Other stuff in menu.lst

## ## End Default Options ##

title Ubuntu 8.04, kernel 2.6.24-16-rt
root (hd2,2)
kernel /boot/vmlinuz-2.6.24-16-rt root=UUID=da504e0e-f885-46aa-9528-e1dfafabb9b0 ro quiet
splash
initrd /boot/initrd.img-2.6.24-16-rt
quiet

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
 
Old 06-27-2008, 06:07 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,776
Blog Entries: 14

Rep: Reputation: 274Reputation: 274Reputation: 274
Have you tried mounting by UUID using the append= in lilo?

append="root=/dev/disk/by-uuid/da504e0e-f885-46aa-9528-e1dfafabb9b0 ro"

Also it appears that grub thinks ubuntu is on hdc3 (hd2,2) not sda3, unless grub thinks sda is hd2, which is odd but possible....
 
Old 06-28-2008, 11:14 AM   #5
svar
Member
 
Registered: Jul 2003
Posts: 360

Original Poster
Rep: Reputation: 30
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?
 
Old 06-28-2008, 12:19 PM   #6
svar
Member
 
Registered: Jul 2003
Posts: 360

Original Poster
Rep: Reputation: 30
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
 
Old 06-29-2008, 10:03 AM   #7
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,776
Blog Entries: 14

Rep: Reputation: 274Reputation: 274Reputation: 274
Quote:
Originally Posted by svar View Post
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:

http://ubuntuforums.org/archive/index.php/t-201130.html

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:

http://www.cyberciti.biz/faq/howto-b...x-rescue-mode/

I don't know about the jbd thing; this is what I found:

https://secure-support.novell.com/Ka...AL_Public.html

In short, it may be related to the Suse boot of Ubuntu but doesn't seem important.

Hope that helps.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mult distro boot help (lilo and grub) cygnus-x1 Linux - General 1 11-08-2007 09:57 PM
Grub over lilo (Changing distro) PPisHere Linux - Software 3 07-10-2005 12:44 PM
GRUB or LILO won't boot linux!!! for ANY distro stelmate Linux - Hardware 12 05-27-2005 06:42 PM
Lilo to boot OS that uses grub by default unholy Linux - Distributions 8 06-05-2004 08:46 AM
Adding another Distro to Grub revenger681 Linux - Newbie 6 03-30-2004 02:05 PM


All times are GMT -5. The time now is 06:02 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration