Re: lilo config is busted, need help fixing it
On Sat, 25 Sep 2010 03:40:04 -0400 (EDT), briand@aracnet.com wrote:
>
> Before I post all that stuff, let me show you exactly what's happening
> on boot. I think there is something very strange going on and it may
> not be lilo.
>
> Lin_img0 is : /boot/vmlinuz
>
> When I boot using that entry I get the following error:
>
> kernel-Panic: not syncing : VFS : Unable to mount root fs on unknown
> - block(8,2)
>
> specifying
>
> Lin_img0 root=/dev/sda2
>
> DOES NOT WORK.
After looking at your /etc/lilo.conf file, I'm not surprised. More later.
>
> When I use the lilo entry Lin_2.6.32img5, /boot/vmlinuz-2.6.32-5-amd64,
> AND specify root=/dev/sda2, i.e.
>
> Lin_2.6.32img5 root=/dev/sda2
>
> I get the following weirdness:
>
> Running /scripts/local-premount
>
> resume: could not stat the resume device
> file /dev/disk/by-uuid/558d7790-5914-4949....
>
> enter full path:
>
> at that point I enter /dev/sda2 and then it boots normally.
>
> don't have any idea what the uuid it's try to use is, but this is a
> real WTF !?
OK, I'm also goint to need to see the contents of
/etc/initramfs-tools/conf.d/resume.
I'm also going to need
to see the output of the following commands:
ls -Al /dev/disk/by-id/
ls -Al /dev/disk/by-uuid/
>
> It seems like I have two different problems. I have a lilo entry that
> doesn't work at all and another one which dumps me into this resume
> nonsense.
Agreed.
>
> Here's a really interesting observation:
>
> The Lin_img0 lilo entry behaves differently from the Lin_2.6.32img5, BUT
> THEY BOTH USE THE SAME IMAGE ! /boot/vmlinuz is a symlink to
> vmlinuz-2.6.32-5-amd64.
>
> ugh...
That makes sense, given your config file.
>
> Stephen Powell wrote:
>> Interesting. What happens if you specify
>>
>> root=802
>>
>> as an argument to the boot prompt?
>
> I get the above resume weirdness.
Good. It's consistent. That means that the kernel is treating
root=/dev/sda2
and
root=802
as equivalent, which it should.
> Stephen Powell wrote:
>> Please post your entire /etc/lilo.conf.
>
> # Generated by liloconfig
>
> # This allows booting from any partition on disks with more than 1024
> # cylinders.
> lba32
>
> # Specifies the boot device
> boot=/dev/sda
>
>
> # Specifies the device that should be mounted as root.
> # If the special name CURRENT is used, the root device is set to the
> # device on which the root file system is currently mounted. If the root
> # has been changed with -r , the respective device is used. If the
> # variable ROOT is omitted, the root device setting contained in the
> # kernel image is used. It can be changed with the rdev program.
> root=/dev/sda2
>
> # Bitmap configuration for /boot/debianlilo.bmp
> # bitmap=/boot/debianlilo.bmp
> # bmp-colors=1,,0;9,,0
> # bmp-table=106p,144p,2,9,144p
> # bmp-timer=514p,144p,6,8,0
>
> # Enables map compaction:
> # Tries to merge read requests for adjacent sectors into a single
> # read request. This drastically reduces load time and keeps the map
> # smaller. Using COMPACT is especially recommended when booting from a
> # floppy disk.
> # compact
I would uncomment the above "compact" line for performance reasons,
but this is not your problem and it is not required.
>
> # Install the specified file as the new boot sector.
> # LILO supports built in boot sectory, you only need
> # to specify the type, choose one from 'text', 'menu' or 'bitmap'.
> # new: install=bmp old: install=/boot/boot-bmp.b
> # new: install=text old: install=/boot/boot-text.b
> # new: install=menu old: install=/boot/boot-menu.b or boot.b
> # default: 'menu' is default, unless you have a bitmap= line
> # Note: install=bmp must be used to see the bitmap menu.
> install=menu
> # install=bmp
>
> # Specifies the number of _tenths_ of a second LILO should
> # wait before booting the first image. LILO
> # doesn't wait if DELAY is omitted or if DELAY is set to zero.
> # delay=50
>
> # Prompt to use certaing image. If prompt is specified without timeout,
> # boot will not take place unless you hit RETURN
> prompt
> timeout=50
>
> # Enable large memory mode.
> large-memory
Good!
>
> # Specifies the location of the map file. If MAP is
> # omitted, a file /boot/map is used.
> map=/boot/map
>
> # Specifies the VGA text mode that should be selected when
> # booting. The following values are recognized (case is ignored):
> # NORMAL select normal 80x25 text mode.
> # EXTENDED select 80x50 text mode. The word EXTENDED can be
> # abbreviated to EXT.
> # ASK stop and ask for user input (at boot time).
> # <number> use the corresponding text mode. A list of available modes
> # can be obtained by booting with vga=ask and pressing [Enter].
> vga=normal
>
> # Defines non-standard parameters for the specified disk.
>
> # If you are using removable USB drivers (with mass-storage)
> # you will need to tell LILO to not use these devices even
> # if defined in /etc/fstab and referenced in /proc/partitions.
> # Adjust these lines to your devices:
> #
> # disk=/dev/sda inaccessible
>
> # These images were automagically added. You may need to edit something.
>
> image=/boot/vmlinuz
> label="Lin img0"
> read-only
>
ERROR! No initial RAM disk specified! Add:
initrd=/boot/initrd.img
> image=/boot/vmlinuz-2.6.26-2-amd64
> label="Lin 2.6.26img2"
> initrd=/boot/initrd.img-2.6.26-2-amd64
> read-only
>
> image=/boot/vmlinuz-2.6.31-1-amd64
> label="Lin 2.6.31img3"
> initrd=/boot/initrd.img-2.6.31-1-amd64
> read-only
>
> image=/boot/vmlinuz-2.6.32-3-amd64
> label="Lin 2.6.32img4"
> initrd=/boot/initrd.img-2.6.32-3-amd64
> read-only
>
> image=/boot/vmlinuz-2.6.32-5-amd64
> label="Lin 2.6.32img5"
> initrd=/boot/initrd.img-2.6.32-5-amd64
> read-only
>
> image=/boot/vmlinuz.old
> label="Lin img6"
> read-only
>
ERROR! No initial RAM disk image. Add:
initrd=/boot/initrd.img.old
> # If you have another OS on this machine (say DOS),
> # you can boot if by uncommenting the following lines
> # (Of course, change /dev/hda2 to wherever your DOS partition is.)
> # other=/dev/hda2
> # label="MS Windows"
>
> Stephen Powell wrote:
>> Also post:
>> /etc/kernel-img.conf
>
Where is it? I need to see the contents of that file.
It's very important.
> Stephen Powell wrote:
>> A list of all files in /etc/kernel/postinst.d
>
> -rwxr-xr-x 1 root root 436 Jun 4 06:33 dkms
> -rwxr-xr-x 1 root root 614 Apr 7 20:53 initramfs-tools.dpkg-dist
> -rwxr-xr-x 1 root root 196 Mar 18 2010 pm-utils
> -rwxr-xr-x 1 root root 1607 Apr 3 21:22 S30initramfs
> -rwxr-xr-x 1 root root 3355 Jul 14 22:33 S50symlink_hook
>
> Stephen Powell wrote:
>> A list of all files in /etc/kernel/postrm.d
>
> -rwxr-xr-x 1 root root 563 Apr 7 20:53 initramfs-tools.dpkg-dist
> -rw-r--r-- 1 root root 1662 Apr 3 21:24 K30initramfs
> -rw-r--r-- 1 root root 3390 Apr 3 21:27 K50symlink_hook
Several problems here. S30initramfs, S50symlink_hook,
K30initramfs, and K50symlink_hook, though they will still
work, I now consider obsolete. S30initramfs and K30initramfs
were made obsolete by newer versions of the initramfs-tools
package. The initramfs-tools hook scripts appear to be missing.
And you have a couple of scripts called initramfs-tools.dpkg-dist.
Are they renamed versions of initramfs-tools? Are they the current
versions of them? I would erase S30initramfs, K30initramfs,
and both copies of initramfs-tools.dpkg-dist, and reinstall
the latest version of the initramfs-tools package. This should
install a script called initramfs-tools in both /etc/kernel/postinst.d
and /etc/kernel/postrm.d.
I also don't see any zz-lilo hook scripts, which the latest version
of lilo would have installed. Reinstall the latest version of lilo.
This should also install a file in /etc/initramfs/post-update.d called
lilo or runlilo, depending on which version of lilo you are running.
Then remove S50symlink_hook and K50symlink_hook. Finally, install
the two zy-symlinks hook scripts available on my web site, one for
/etc/kernel/postinst.d and one for /etc/kernel/postrm.d. Then make
sure that
do_symlinks = no
is set in /etc/kernel-img.conf. Also erase any of the following symbolic
links, if they exist, from the root directory:
vmlinuz
initrd.img
vmlinuz.old
initrd.img.old
> Stephen Powell wrote:
>> A list of all files in /boot
>
> boot.0800
> coffee.bmp
> config-2.6.26-2-amd64
> config-2.6.31-1-amd64
> config-2.6.32-3-amd64
> config-2.6.32-5-amd64
> debian.bmp
> debianlilo.bmp
> initrd.img
> initrd.img-2.6.26-2-amd64
> initrd.img-2.6.31-1-amd64
> initrd.img-2.6.32-3-amd64
> initrd.img-2.6.32-5-amd64
> initrd.img.old
> map
> sarge.bmp
> sid.bmp
> System.map-2.6.26-2-amd64
> System.map-2.6.31-1-amd64
> System.map-2.6.32-3-amd64
> System.map-2.6.32-5-amd64
> vmlinuz
> vmlinuz-2.6.26-2-amd64
> vmlinuz-2.6.31-1-amd64
> vmlinuz-2.6.32-3-amd64
> vmlinuz-2.6.32-5-amd64
> vmlinuz.old
Looks OK.
> Stephen Powell wrote:
>> The definitions of the boot-related symlinks:
>>
>> vmlinuz
>> initrd.img
>> vmlinuz.old
>> initrd.img.old
>>
>
> lrwxrwxrwx 1 root root 25 Jul 14 22:38 initrd.img ->
> initrd.img-2.6.32-5-amd64
>
> lrwxrwxrwx 1 root root 25 Jul 14 22:38 initrd.img.old ->
> initrd.img-2.6.32-3-amd64
>
> lrwxrwxrwx 1 root root 22 Jul 14 22:38 vmlinuz ->
> vmlinuz-2.6.32-5-amd64
>
> lrwxrwxrwx 1 root root 22 Jul 14 22:38 vmlinuz.old ->
> vmlinuz-2.6.32-3-amd64
Looks good. I'm assuming that they are in the /boot directory.
> Stephen Powell wrote:
>> The output of
>>
>> lilo -v
>>
>
> LILO version 22.8 (test mode), Copyright (C) 1992-1998 Werner
> Almesberger Development beyond version 21 Copyright (C) 1999-2006 John
> CoffmanReleased 19-Feb-2007, and compiled at 18:52:11 on Sep 21 2009
> Running Linux kernel 2.6.32-5-amd64 on x86_64
> Debian GNU/Linux
>
> device-mapper major = 254
> raid_setup returns offset = 00000000 ndisk = 0
> BIOS VolumeID Device
> Reading boot sector from /dev/sda
> pf_hard_disk_scan: ndevs=1
> 0800 5879D4A8 /dev/sda
> Resolve invalid VolumeIDs
> Resolve duplicate VolumeIDs
> 0800 5879D4A8 /dev/sda
> device codes (user assigned pf) = 0
> device codes (user assigned) = 0
> device codes (BIOS assigned) = 1
> device codes (canonical) = 1
> Device 0x0800: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 0 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> mode = 0x03, columns = 80, rows = 25, page = 0
> Using MENU secondary loader
> Calling map_insert_data
> Secondary loader: 18 sectors (0x3600 dataend).
> bios_boot = 0x80 bios_map = 0x80 map==boot = 0 map S/N: 5879D4A8
> BIOS data check was okay on the last boot
>
> Boot image: /boot/vmlinuz -> vmlinuz-2.6.32-5-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Setup length is 27 sectors.
> Mapped 4708 sectors.
> Added Lin_img0 *
> <dev=0xe0,hd=227,cyl=182,sct=252>
> "ro root=802"
>
> Boot image: /boot/vmlinuz-2.6.26-2-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Setup length is 24 sectors.
> Mapped 3430 sectors.
> Mapping RAM disk /boot/initrd.img-2.6.26-2-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> RAM disk: 15181 sectors.
> Added Lin_2.6.26img2
> <dev=0xe0,hd=227,cyl=183,sct=45>
> "ro root=802"
>
> Boot image: /boot/vmlinuz-2.6.31-1-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Setup length is 27 sectors.
> Mapped 4848 sectors.
> Mapping RAM disk /boot/initrd.img-2.6.31-1-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> RAM disk: 7205 sectors.
> Added Lin_2.6.31img3
> <dev=0xe0,hd=227,cyl=183,sct=240>
> "ro root=802"
>
> Boot image: /boot/vmlinuz-2.6.32-3-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Setup length is 27 sectors.
> Mapped 4638 sectors.
> Mapping RAM disk /boot/initrd.img-2.6.32-3-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> RAM disk: 7215 sectors.
> Added Lin_2.6.32img4
> <dev=0xe0,hd=227,cyl=184,sct=106>
> "ro root=802"
>
> Boot image: /boot/vmlinuz-2.6.32-5-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Setup length is 27 sectors.
> Mapped 4708 sectors.
> Mapping RAM disk /boot/initrd.img-2.6.32-5-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> RAM disk: 9407 sectors.
> Added Lin_2.6.32img5
> <dev=0xe0,hd=227,cyl=184,sct=226>
> "ro root=802"
>
> Boot image: /boot/vmlinuz.old -> vmlinuz-2.6.32-3-amd64
> Device 0x0802: BIOS drive 0x80, 255 heads, 30515 cylinders,
> 63 sectors. Partition offset: 120583890 sectors.
> Using Volume ID 5879D4A8 on bios 80
> Setup length is 27 sectors.
> Mapped 4638 sectors.
> Added Lin_img6
> <dev=0xe0,hd=227,cyl=185,sct=113>
> "ro root=802"
>
> BIOS VolumeID Device
> 80 5879D4A8 0800
> The boot sector and the map file have *NOT* been altered.
Looks good. Obviously, you also used the -t option as well.
Oh, I almost forgot. Another file I need to see is
/etc/fstab
So please make the changes indicated and post the additional
information requested, which is scattered throughout this post.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
Reply to: