add esp setup

master
lub 5 years ago
parent 8b3517be28
commit bca4251bfc

@ -5,3 +5,4 @@
/dev/mapper/md0-unlocked / btrfs relatime 0 0
/dev/md1 /boot btrfs relatime 0 0
UUID=%esp_uuid% /boot/efi fat relatime 0 0

@ -0,0 +1 @@
/dev/nvme0n1p3

@ -33,8 +33,11 @@ sed -i 's/DROPBEAR_PORT=.*/DROPBEAR_PORT=222/' /etc/default/dropbear
apt-get -y install linux-image-amd64
apt-get -y install grub-efi-amd64
"/hardware-setup/hardware/$1/grub.sh"
update-grub
# edit esp_uuid in fstab
esp_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/esp" | head -n1)
sed -i "s/%esp_uuid%/${esp_uuid}/" /etc/fstab
### users

@ -31,6 +31,11 @@ mkfs.btrfs /dev/md1
mkdir "$chroot/boot"
mount /dev/md1 "$chroot/boot"
# esp device
mkfs.fat "hardware/${1}/esp"
mkdir "$chroot/boot/efi"
mount "hardware/${1}/esp" "$chroot/boot/efi"
# debootstrap

Loading…
Cancel
Save