On Mon, Apr 23, 2012 at 03:13:05PM +0200, Marco d'Itri wrote: > On Apr 23, Marco d'Itri <m...@linux.it> wrote: > > > > The script /usr/share/initramfs-tools/hooks/cryptroot already contains > > > a function that tries to find the device mounted as / by parsing the > > > fstab. It also works with the UUID= or LABEL= syntax. That function could > > > be used as a fallback mechanicm in write_dev_root_rule. > > Do you care enough to send a patch? > Anyway, I am not sure if there is any point in doing this: if /dev/root > cannot be used in fstab they why bother?
I'm not sure I get your point. The cryptroot script tries to "resolve" the fstab entry for / to a unique and valid path to a block device in /dev. We want to do the same in write_dev_root_rule, as we want to symlink this device to /dev/root. As many scripts (e.g. update-grub) rely on the mount informations to do their job, a nonexistent /dev/root breaks them. Anyway I have another (simpler) idea, but I'm not sure about how solid it would be, please let me know what you think. If we can't find a valid block device using udevadm, as in the case of btrfs, we try to use the root= parameter read from /proc/cmdline. Keep in mind that we have / mounted from the fictious /dev/root only if one is not using an initramfs. In this case the root= parameter should always point to a valid block device the kernel is able to read by itself (so no UUIDs, but a real /dev/something device). We could use this as a fallback for the cases when udevadm can't help. What do you think? Paride -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org