On Fri, 2020-05-15 at 21:34 +0200, Alain Dumont via blfs-dev wrote:
> Hi all,
> 
> With grub I usually use PARTUUID rather than UUID to specify the 
> location of my file system :
> linux/boot/vmlinuz root=PARTUUID="7d896f5 ....."
> It works very well. But recently I needed to use initrd (*) and I
> used 
> the script mkinitramfs described in the blfs-book chapter 5.
> But then my system refused to start. The reason is that the init.in 
> script does not support the case of PARTUUID.
> It is very easy to include this functionality in the script by
> simply 
> adding a single line in the function do_mount_root() :
> 
> do_mount_root()
> {
>     mkdir /.root
>     [ -n "$rootflags" ] && rootflags="$rootflags,"
>     rootflags="$rootflags$ro"
> 
>     case "$root" in
>           /dev/*    ) device=$root ;;
>           UUID=*    ) eval $root; device="/dev/disk/by-uuid/$UUID" ;;
>           PARTUUID=*) eval $root; 
> device="/dev/disk/by-partuuid/$PARTUUID" ;;   <=== add this line
>           LABEL=*   ) eval $root; device="/dev/disk/by-label/$LABEL"
> ;;
>           ""        ) echo "No root device specified." ; problem ;;
>     esac
> 
> et voila!
> 
> a simple suggestion which could be included definitively in the
> script 
> hoping that it would be useful for others.
> 
> Alain
> 
> (*) Here, initrd is required by lvm to check thin-pools at boot time
> (I 
> use optional thin-provisonning-tools).
> 
>       More info about that in an other post if needed.
> 
> 

Done at r23196, together with a fix and another improvement. Thanks

Pierre

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to