Hyperv Debian + UEFI

This commit is contained in:
Greg Hellings
2023-12-30 05:37:32 +00:00
parent 76abdb9132
commit b11669345e
112 changed files with 468 additions and 850 deletions
+15 -11
View File
@@ -17,29 +17,33 @@ fi
# The sed bit is just to strip out the extra fluff, like comments
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk ${disk}
o # create new GPT partition table
g # create new GPT partition table
n # new
p # primary partition
1 # part number
# default partition number
# default start
+512M # size
t # set type
1 # EFI system partition
n # second partition
# default partition number
# start at first free sector
# default to full disk
p # print, for debugging
w # write the partition table and exit
EOF
sleep 10 # Let me at least read it!
#t # set partition type
#1 # on partition 1
#4 # BIOS boot
# Format and mount partitions
mkfs.ext4 "${disk}1"
mkfs.vfat "${disk}1"
mkfs.ext4 "${disk}2"
mount "${disk}1" /mnt
mount "${disk}2" /mnt
mkdir -p /mnt/boot
mount "${disk}1" /mnt/boot
# Bootstrap system
pacstrap -K /mnt base linux nano sudo networkmanager openssh grub python3
pacstrap -K /mnt base linux nano sudo networkmanager openssh grub python3 efibootmgr
genfstab -L /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
# Run stuff in the chroot
curl -o /mnt/in-chroot.sh "http://${host}:${port}/in-chroot.sh"