pivot root to /run/initramfs instead of /mnt/live because systemd handles that better and other inits dont care
parent
5ebb97faf5
commit
087eb008e0
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue