Re: [PATCH 1/3] Fix 'root=LABEL=/'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seewer Philippe (philippe.seewer@xxxxxx) said: 
>> Applied, thanks.  Though I still want to get to where we use a udev 
>> rule to create the /dev/root symlink so that we can not have to do this 
>> sort of escaping.
>
> Just out of curiosity. Any idea how to do a udev rule like that?

Before you start udev, in the initramfs init script, you'd do something
like:

if [ "${root#LABEL=}" != "$root" ]; then
	l=${root#LABEL=}
	cat > /etc/udev/rules.d/99-rootfs.rules << EOF
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="$l", SYMLINK+="root"
EOF
fi

Then, you'd just wait for /dev/root to show up, rather than a particular
device.

Bill
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux