Bug#378332: initramfs-tools: Resolve the link using readlink?
hello,
On Thu, 03 Aug 2006, Leandro Lucarella wrote:
> 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
yup that is a correct boot param,
that is your _real_ root.
> --- 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
big NACK,
you can never have tested - that won't boot.
vgchange creates the lvm devices under /dev/mapper,
so at that stage we have no /dev/mapper devices yet.
/dev/mapper/vg-lv is the way to recognise an lvm dev.
best regards
--
maks
Reply to: