Bug#558683: grub-common: grub-mkrelpath fails on root of a partition

brian m. carlson sandals at crustytoothpaste.ath.cx
Sun Nov 29 20:05:24 UTC 2009


Package: grub-common
Version: 1.97+20091125-1
Severity: important
File: /usr/bin/grub-mkrelpath

In my filesystem, /boot is on a separate partition (/dev/sda1) and all
the other partitions are on LVM.  grub used to determine that this
correctly and set up /boot/grub/grub.cfg to reference /boot/vmlinuz* as
/vmlinux*, and likewise for the initrds.  However, recently grub has
been referring to /boot/vmlinuz* in the grub.cfg file, which is not
valid (since the kernels are in the root of that partition, not under a
directory).

I ran /etc/grub.d/10_linux under sh -x and determined that
"grub-mkrelpath /boot" responds with "/boot" instead of "/".  This is
called by make_system_path_relative_to_its_root.  This buggy behavior is
also true for other (LVM) volumes:

lakeview ok % grub-mkrelpath /boot
/boot
lakeview ok % grub-mkrelpath /usr 
/usr
lakeview ok % grub-mkrelpath /boot/grub 
/grub
lakeview ok % grub-mkrelpath /usr/bin  
/bin

As a consequence, every boot requires manual intervention.  This is
merely an annoyance for me, but it precludes the ability to boot the
system for my boyfriend, since he has no clue how to fix the problem.

My /boot/grub/grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod lvm
insmod ext2
set root=(lakeview-usr)
search --no-floppy --fs-uuid --set a736dc6e-fb64-4aa2-a3d8-3b8ba5456c3b
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
set locale_dir=/boot/grub/locale
set lang=en
insmod gettext 
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1617f2ac-92e1-4a87-bade-6a1902e9c344
insmod png
if background_image /grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 1617f2ac-92e1-4a87-bade-6a1902e9c344
	linux	/boot/vmlinuz-2.6.31-1-amd64 root=/dev/mapper/lakeview-root ro  quiet usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.31-1-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 1617f2ac-92e1-4a87-bade-6a1902e9c344
	linux	/boot/vmlinuz-2.6.31-1-amd64 root=/dev/mapper/lakeview-root ro single 
	initrd	/boot/initrd.img-2.6.31-1-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-amd64" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 1617f2ac-92e1-4a87-bade-6a1902e9c344
	linux	/boot/vmlinuz-2.6.30-2-amd64 root=/dev/mapper/lakeview-root ro  quiet usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.30-2-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 1617f2ac-92e1-4a87-bade-6a1902e9c344
	linux	/boot/vmlinuz-2.6.30-2-amd64 root=/dev/mapper/lakeview-root ro single 
	initrd	/boot/initrd.img-2.6.30-2-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu 9.04 (9.04) (on /dev/mapper/lakeview-ubuntu)" {
	insmod lvm
	insmod ext2
	set root=(lakeview-ubuntu)
	search --no-floppy --fs-uuid --set 3dd0b685-b9f1-4b5a-a399-25ff4a4818cc
	linux /boot/vmlinuz-2.6.28-11-generic root=/dev/mapper/lakeview-ubuntu
	initrd /boot/initrd.img-2.6.28-11-generic
}
menuentry "Ubuntu 9.04 (9.04) (on /dev/mapper/lakeview-ubuntu)" {
	insmod lvm
	insmod ext2
	set root=(lakeview-ubuntu)
	search --no-floppy --fs-uuid --set 3dd0b685-b9f1-4b5a-a399-25ff4a4818cc
	linux /boot/vmlinuz-2.6.28-13-generic root=/dev/mapper/lakeview-ubuntu
	initrd /boot/initrd.img-2.6.28-13-generic
}
menuentry "Ubuntu 9.04 (9.04) (on /dev/mapper/lakeview-ubuntu)" {
	insmod lvm
	insmod ext2
	set root=(lakeview-ubuntu)
	search --no-floppy --fs-uuid --set 3dd0b685-b9f1-4b5a-a399-25ff4a4818cc
	linux /boot/vmlinuz-2.6.28-9-generic root=/dev/mapper/lakeview-ubuntu
	initrd /boot/initrd.img-2.6.28-9-generic
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

The contents of /proc/mounts:

rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,size=10240k,mode=755 0 0
/dev/mapper/lakeview-root / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/sda1 /boot ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/lakeview-home /home ext4 rw,relatime,user_xattr,barrier=0,data=ordered 0 0
/dev/mapper/lakeview-tmp /tmp ext4 rw,relatime,barrier=0,data=ordered 0 0
/dev/mapper/lakeview-usr /usr ext4 rw,relatime,barrier=0,data=ordered 0 0
/dev/mapper/lakeview-var /var ext4 rw,relatime,barrier=0,data=ordered 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
/home/bmc/.Private /home/bmc/Private ecryptfs rw,relatime,ecryptfs_fnek_sig=c792de995cb426e9,ecryptfs_sig=d3d1f4b74dbeed2d,ecryptfs_cipher=aes,ecryptfs_key_bytes=16 0 0
gvfs-fuse-daemon /home/bmc/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-common depends on:
ii  base-files             5.0.0             Debian base system miscellaneous f
ii  dpkg                   1.15.5.3          Debian package management system
ii  gettext-base           0.17-8            GNU Internationalization utilities
ii  install-info           4.13a.dfsg.1-5    Manage installed documentation in 
ii  libc6                  2.10.2-2          GNU C Library: Shared libraries
ii  libfreetype6           2.3.11-1          FreeType 2 font engine, shared lib
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

Versions of packages grub-common recommends:
ii  os-prober                     1.35       utility to detect other OSes on a 

Versions of packages grub-common suggests:
pn  grub-emu                      <none>     (no description available)
pn  multiboot-doc                 <none>     (no description available)

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20091129/bd1fd8dc/attachment.pgp>


More information about the Pkg-grub-devel mailing list