umount -l -n /target >/dev/null 2>&1
umount -l -n /dev
+ umount -l -n /run
+ [ -d /sys/firmware/efi/efivars ] && umount -l -n /sys/firmware/efi/efivars
umount -l -n /sys
umount -l -n /proc
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
+# ensure udev isn't snippy and ignores our request
+export SYSTEMD_IGNORE_CHROOT=1
+
mount -n -t proc proc /proc
mount -n -t sysfs sysfs /sys
+if [ -d /sys/firmware/efi ]; then
+ echo "EFI boot mode detected, mounting efivars filesystem"
+ mount -n -t efivarfs efivarfs /sys/firmware/efi/efivars
+fi
+mount -n -t tmpfs tmpfs /run
parse_cmdline
export PREVLEVEL=N
/etc/init.d/udev start
+mkdir -p /dev/shm
+mount -t tmpfs tmpfs /dev/shm
+
+# allow pseudo terminals for debuggin in X
+mkdir -p /dev/pts
+mount -vt devpts devpts /dev/pts -o gid=5,mode=620
+
+if [ $proxdebug -ne 0 ]; then
+ /sbin/agetty -o '-p -- \\u' --noclear tty9 &
+ echo "Dropping in debug shell inside chroot before starting installation"
+ echo "type exit or CTRL-D to start installation wizard"
+ debugsh
+fi
+
# set the hostname
hostname proxmox
# try to get ip config with dhcp
-echo -n "Detecting network settings... "
-/etc/init.d/networking start >/dev/tty2 2>&1
+echo -n "Attempting to get DHCP leases... "
+dhclient -v
echo "done"
xinit -- -dpi 96 >/dev/tty2 2>&1
echo "Installation done, rebooting... "
#mdadm -S /dev/md0 >/dev/tty2 2>&1
+kill $(pidof dhclient) 2>&1 > /dev/null
real_reboot
# never reached