pivot root to /run/initramfs instead of /mnt/live because systemd handles that better and other inits dont care

pull/40/head
TomasM 2017-11-10 07:30:49 -05:00
parent 5ebb97faf5
commit 087eb008e0
1 changed files with 4 additions and 2 deletions

View File

@ -774,8 +774,10 @@ change_root()
if [ -x sbin/init -o -L sbin/init ]; then INIT=sbin/init; fi if [ -x sbin/init -o -L sbin/init ]; then INIT=sbin/init; fi
if [ "$INIT" = "" ]; then fatal "Can't find executable init command"; fi if [ "$INIT" = "" ]; then fatal "Can't find executable init command"; fi
mkdir -p mnt/live mkdir -p run
mount -t tmpfs tmpfs run
mkdir -p run/initramfs
mount -n -o remount,ro aufs . mount -n -o remount,ro aufs .
pivot_root . mnt/live pivot_root . run/initramfs
exec $CHROOT . $INIT < dev/console > dev/console 2>&1 exec $CHROOT . $INIT < dev/console > dev/console 2>&1
} }