]>
git.proxmox.com Git - pve-installer.git/blob - unconfigured.sh
7 # shellcheck disable=SC2013 # per word splitting is wanted here
8 for par
in $
(cat /proc
/cmdline
); do
24 /etc
/init.d
/networking stop
26 # stop udev (release file handles)
29 echo -n "Deactivating swap..."
30 swap
=$
(awk '/^\/dev\// { print $1 }' /proc
/swaps
);
31 if [ -n "$swap" ]; then
36 umount
-l -n /target
>/dev
/null
2>&1
39 [ -d /sys
/firmware
/efi
/efivars
] && umount
-l -n /sys
/firmware
/efi
/efivars
47 echo "\nInstallation aborted - unable to continue (type exit or CTRL-D to reboot)"
52 echo "Starting Proxmox installation"
54 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
:/usr
/X11R
6/bin
56 # ensure udev isn't snippy and ignores our request
57 export SYSTEMD_IGNORE_CHROOT
=1
59 mount
-n -t proc proc
/proc
60 mount
-n -t sysfs sysfs
/sys
61 if [ -d /sys
/firmware
/efi
]; then
62 echo "EFI boot mode detected, mounting efivars filesystem"
63 mount
-n -t efivarfs efivarfs
/sys
/firmware
/efi
/efivars
65 mount
-n -t tmpfs tmpfs
/run
69 # always load most common input drivers
70 modprobe
-q psmouse || true
71 modprobe
-q sermouse || true
72 modprobe
-q usbhid || true
74 # load device mapper - used by lilo
75 modprobe
-q dm_mod || true
77 echo "Installing additional hardware drivers"
80 /etc
/init.d
/udev start
83 mount
-t tmpfs tmpfs
/dev
/shm
85 # allow pseudo terminals for debuggin in X
87 mount
-vt devpts devpts
/dev
/pts
-o gid
=5,mode
=620
89 if [ $proxdebug -ne 0 ]; then
90 /sbin
/agetty
-o '-p -- \\u' --noclear tty9
&
91 echo "Dropping in debug shell inside chroot before starting installation"
92 echo "type exit or CTRL-D to start installation wizard"
99 # try to get ip config with dhcp
100 echo -n "Attempting to get DHCP leases... "
104 echo -n "Starting chrony for opportunistic time-sync... "
105 chronyd ||
echo "starting chrony failed"
107 echo "Starting a root shell on tty3."
108 setsid
/sbin
/agetty
-a root
--noclear tty3
&
110 xinit
-- -dpi 96 >/dev
/tty2
2>&1
112 # just to be sure everything is on disk
115 if [ $proxdebug -ne 0 ]; then
116 echo "Debug shell after installation exited (type exit or CTRL-D to reboot)"
120 echo "Installation done, rebooting... "