Allow real_root to point to LVM-created symlinks.
authorRobin H. Johnson <robbat2@gentoo.org>
Thu, 22 Sep 2011 22:43:47 +0000 (22:43 +0000)
committerRobin H. Johnson <robbat2@gentoo.org>
Thu, 22 Sep 2011 22:43:47 +0000 (22:43 +0000)
Needed to unbreak root-on-LVM on my laptop.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
defaults/initrd.scripts

index da8cb017ba397f7d5560c4e71da507df9196ae07..b6b01ca45bf29e505cc4739ba7e5019b8eabec90 100755 (executable)
@@ -648,6 +648,11 @@ startVolumes() {
 
                        # To activate volumegroups on all devices in the cache
                        lvm_commands="${lvm_commands} \nvgchange -ay --sysinit"
+                       
+                       # To create symlinks so users can use real_root=/dev/vg/root
+                       # This needs to run after vgchange, using vgchange --mknodes is too
+                       # early.
+                       lvm_commands="${lvm_commands} \nvgmknodes --ignorelockingfailure"
 
                        # And finally execute it all (/proc/... needed if lvm is compiled without readline)
                        good_msg "Scanning for and activating Volume Groups"