Bug#378332: initramfs-tools: Resolve the link using readlink?
Package: initramfs-tools
Version: 0.73
Followup-For: Bug #378332
I had the same problem here. I think you should provide a more verbose way
to tell the user he should user the /dev/mapper/vg-lv schema rather than
/dev/vg/lv one. Or maybe you can use readlink to see what is the real file
name (patch provided).
-- Package-specific info:
-- /proc/cmdline
root=/dev/mapper/vg0-root ro vga=791
-- /proc/filesystems
cramfs
xfs
ext3
-- lsmod
Module Size Used by
mousedev 11108 1
nvidia 4549844 12
agpgart 30152 1 nvidia
pktcdvd 26620 1
ipv6 223968 12
nfsd 198596 13
exportfs 5888 1 nfsd
button 6800 0
ac 5124 0
battery 9476 0
nfs 195404 5
lockd 54152 3 nfsd,nfs
nfs_acl 3840 2 nfsd,nfs
sunrpc 138876 11 nfsd,nfs,lockd,nfs_acl
tuner 46124 0
tvaudio 22556 0
bttv 158324 0
video_buf 23172 1 bttv
firmware_class 10112 1 bttv
ir_common 27332 1 bttv
compat_ioctl32 1728 1 bttv
i2c_algo_bit 8648 1 bttv
v4l2_common 14336 2 tuner,bttv
btcx_risc 5000 1 bttv
tveeprom 14096 1 bttv
videodev 9216 1 bttv
forcedeth 26700 0
ext3 119304 1
jbd 50772 1 ext3
mbcache 8580 1 ext3
rtc 12724 0
fuse 35464 0
usb_storage 71488 0
sr_mod 16228 0
sd_mod 19008 0
scsi_mod 123784 3 usb_storage,sr_mod,sd_mod
ohci_hcd 18500 0
usbcore 112384 3 usb_storage,ohci_hcd
ns558 5056 0
analog 10976 0
joydev 9280 0
snd_intel8x0 30428 3
snd_ac97_codec 82976 1 snd_intel8x0
snd_ac97_bus 2624 1 snd_ac97_codec
snd_pcm_oss 36704 0
snd_mixer_oss 16192 3 snd_pcm_oss
snd_pcm 74884 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer 21124 1 snd_pcm
snd 48548 8 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 9440 3 snd
snd_page_alloc 9800 2 snd_intel8x0,snd_pcm
gameport 14600 3 ns558,analog
w83781d 29480 0
hwmon_vid 2880 1 w83781d
i2c_isa 5184 1 w83781d
i2c_amd756 6468 0
i2c_dev 8772 0
i2c_core 19904 10 nvidia,tuner,tvaudio,bttv,i2c_algo_bit,tveeprom,w83781d,i2c_isa,i2c_amd756,i2c_dev
psmouse 34888 0
floppy 54788 0
ide_cd 36128 1
cdrom 32864 3 pktcdvd,sr_mod,ide_cd
dm_mirror 19216 0
dm_snapshot 15968 0
dm_mod 50520 7 dm_mirror,dm_snapshot
ide_generic 1664 0 [permanent]
xfs 496216 3
ide_disk 15360 5
amd74xx 12956 0 [permanent]
ide_core 111432 5 usb_storage,ide_cd,ide_generic,ide_disk,amd74xx
thermal 13128 0
processor 25800 1 thermal
fan 4804 0
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable'), (99, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17-1-k7
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8)
Versions of packages initramfs-tools depends on:
ii busybox 1:1.1.3-2 Tiny utilities for small and embed
ii cpio 2.6-16 GNU cpio -- a program to manage ar
ii klibc-utils 1.4.11-3 small statically-linked utilities
ii module-init-tools 3.2.2-3 tools for managing Linux kernel mo
ii udev 0.093-1 /dev/ and hotplug management daemo
initramfs-tools recommends no packages.
-- no debconf information
--- lvm.orig 2006-08-03 16:07:01.179240500 -0300
+++ /usr/share/initramfs-tools/scripts/local-top/lvm 2006-08-03 16:10:21.875783250 -0300
@@ -38,6 +38,7 @@
esac
# Make sure that we have a d-m path
+ vg=`/bin/readlink "$vg"`
vg=${vg#/dev/mapper/}
if [ "$vg" = "$1" ]; then
return 1
Reply to: