Skip to content

Commit

Permalink
Merge pull request puppylinux-woof-CE#4187 from gyrog/root
Browse files Browse the repository at this point in the history
Provide support for "root=UUID=" boot parameter - init and isoboot
  • Loading branch information
gyrog authored Jan 22, 2024
2 parents 8b53d51 + 1e407ca commit 6902d6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions initrd-progs/0initrd/init
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ for i in $(cat /proc/cmdline) ; do
fullinstall) exec ash /sbin/init_full_install ;;
bootmenu) ZBOOTMENU=1 ;;
loglevel=*) LOGLEVEL=${i##*=} ;;
root=*) GRUB_ROOT=${i#root=} ;;
esac
done
if [ "$GRUB_ROOT" ]; then
[ "${GRUB_ROOT%=*}" = 'UUID' ] && GRUB_ROOT=${GRUB_ROOT#*=}
fi
# always call init-bootmenu on ARM devices
case $(uname -m) in arm*) ZBOOTMENU=1 ;; esac

Expand Down Expand Up @@ -898,9 +902,15 @@ export PFSCK # read by /sbin/load_ext_file
[ "$TZ" ] && export TZ
hwclock -l -s

ISO_LOOP=''
if [ -f /sbin/isoboot ] ; then
. /sbin/isoboot # optional, can remove all occurrences of "isoboot" from this script
fi
if [ "$PDRV" = '' ]; then
if [ "$ISO_LOOP" = '' ]; then
[ "$GRUB_ROOT" ] && PDRV=$GRUB_ROOT
fi
fi

[ "$PDEBUG" ] && echo "0: PMEDIA=$PMEDIA PDRV=$PDRV PSUBDIR=$PSUBDIR pfix=$pfix"

Expand Down
3 changes: 3 additions & 0 deletions initrd-progs/0initrd/sbin/isoboot
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ if [ "$iso_path" ] ; then
FOUND_ISO=

[ "$iso_dev" ] && img_dev="$iso_dev"
if [ "$img_dev" = '' ]; then
[ "$GRUB_ROOT" ] && img_dev=$GRUB_ROOT
fi
if [ "$img_dev" ] ; then
img_dev="${img_dev##*/}"
decode_id "$img_dev"
Expand Down

0 comments on commit 6902d6f

Please sign in to comment.