Various fixes in initramfs:

- revert changes to the "copy" function from r23132
- copy mdadm if it exists
- add the PARTUUID case (patch by Alain Dumont)

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23196 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Pierre Labastie 2020-05-23 20:54:29 +00:00
parent 4da7077aa5
commit 99ff4fadfa

View File

@ -76,9 +76,9 @@ copy()
local file
if [ "$2" = "lib" ]; then
file=$(find /lib /usr/lib -maxdepth 1 -name $1 | head -n 1)
file=$(PATH=/lib:/usr/lib type -p $1)
else
file=$(find /bin /usr/bin /sbin /usr/sbin -maxdepth 1 -name $1 | head -n 1)
file=$(type -p $1)
fi
if [ -n "$file" ] ; then
@ -338,10 +338,11 @@ do_mount_root()
rootflags="$rootflags$ro"
case "$root" in
/dev/* ) device=$root ;;
UUID=* ) eval $root; device="/dev/disk/by-uuid/$UUID" ;;
LABEL=*) eval $root; device="/dev/disk/by-label/$LABEL" ;;
"" ) echo "No root device specified." ; problem ;;
/dev/* ) device=$root ;;
UUID=* ) eval $root; device="/dev/disk/by-uuid/$UUID" ;;
PARTUUID=*) eval $root; device="/dev/disk/by-partuuid/$PARTUUID" ;;
LABEL=* ) eval $root; device="/dev/disk/by-label/$LABEL" ;;
"" ) echo "No root device specified." ; problem ;;
esac
while [ ! -b "$device" ] ; do