|
@@ -7,7 +7,7 @@
|
|
# - One disk, one partion, swap-file in the same partion as safety net
|
|
# - One disk, one partion, swap-file in the same partion as safety net
|
|
# - Use systemd whereever possible (network, ntp, cron, journald logging)
|
|
# - Use systemd whereever possible (network, ntp, cron, journald logging)
|
|
# - Minimal number of packages & cloud kernel
|
|
# - Minimal number of packages & cloud kernel
|
|
-# - grub-pc, not efi
|
|
|
|
|
|
+# - support for grub-pc and grub-efi
|
|
# - random root and admin user password generation
|
|
# - random root and admin user password generation
|
|
# - ssh on port 50101 limited to the admin user
|
|
# - ssh on port 50101 limited to the admin user
|
|
|
|
|
|
@@ -25,9 +25,9 @@
|
|
# sudo /installer/bootstrap-bullseye.sh postinstall # run postinstall in the new system
|
|
# sudo /installer/bootstrap-bullseye.sh postinstall # run postinstall in the new system
|
|
|
|
|
|
# Variables
|
|
# Variables
|
|
-mnt="/mnt/root" # mountpoint for the new root filesystem
|
|
|
|
|
|
+mnt="/mnt/root" # mountpoint for the root filesystem during installation
|
|
hostname="somehost.example.com"
|
|
hostname="somehost.example.com"
|
|
-partition="single-mbr"
|
|
|
|
|
|
+partition="mbr-single"
|
|
disk="/dev/vda" # lsblk --list
|
|
disk="/dev/vda" # lsblk --list
|
|
disk1=$disk"1"
|
|
disk1=$disk"1"
|
|
disk0=$disk"p1" # efi partion, only relevant if partion="efi"
|
|
disk0=$disk"p1" # efi partion, only relevant if partion="efi"
|
|
@@ -55,7 +55,7 @@ echo nameserver $netDNS2 >> /etc/resolv.conf
|
|
|
|
|
|
install(){
|
|
install(){
|
|
|
|
|
|
-if [ "$partition" = "single-mbr" ]
|
|
|
|
|
|
+if [ "$partition" = "mbr-single" ]
|
|
then
|
|
then
|
|
#----------
|
|
#----------
|
|
# Prepare disks
|
|
# Prepare disks
|
|
@@ -240,8 +240,19 @@ exit
|
|
|
|
|
|
|
|
|
|
bootloader(){
|
|
bootloader(){
|
|
-# Install GRUB in /dev/vba
|
|
|
|
-chroot $mnt /bin/bash -c "grub-install $disk && update-grub"
|
|
|
|
|
|
+
|
|
|
|
+# Install grub in the mbr
|
|
|
|
+if [ $partition="mbr-single" ]
|
|
|
|
+then
|
|
|
|
+ chroot $mnt /bin/bash -c "grub-install $disk && update-grub"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# Install grub in the efi partition
|
|
|
|
+if [ $partition="efi-crypt" ]
|
|
|
|
+then
|
|
|
|
+ chroot $mnt /bin/bash -c \
|
|
|
|
+ "grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub && update-grub"
|
|
|
|
+fi
|
|
}
|
|
}
|
|
|
|
|
|
unmount(){
|
|
unmount(){
|