Support reboot in non-chroot modes using grub and an init script

We use grub-2.06 as 2.12 has some packaging issues, and can't be
built in live-bootstrap for now.
This commit is contained in:
Gábor Stefanik 2024-01-22 15:23:32 +01:00
parent eb3414c2da
commit 6d26855dc6
9 changed files with 168 additions and 2 deletions

View file

@ -16,6 +16,11 @@ mount | grep '/sys' &> /dev/null || (mkdir -p /sys; mount -t sysfs sysfs /sys)
mount | grep '/tmp' &> /dev/null || (mkdir -p /tmp; mount -t tmpfs tmpfs /tmp)
mount | grep '/dev/shm' &> /dev/null || (mkdir -p /dev/shm; mount -t tmpfs tmpfs /dev/shm)
if [ "${CHROOT}" = False ]; then
rm /etc/mtab
ln -s /proc/mounts /etc/mtab
fi
# Add /etc/resolv.conf
if [ ! -e "/etc/resolv.conf" ]; then
echo 'nameserver 1.1.1.1' > /etc/resolv.conf