Create boot and ESP partitions

This commit is contained in:
Joshua Boniface 2023-09-01 15:41:53 -04:00
parent 051c7b802c
commit 0a00d29b90
2 changed files with 12 additions and 4 deletions

View File

@ -38,7 +38,7 @@ prepare_iso() {
prepare_rootfs() {
echo -n "Preparing Debian live installation via debootstrap... "
SQUASHFS_PKGLIST="mdadm,lvm2,parted,gdisk,debootstrap,grub-pc,linux-image-amd64,sipcalc,live-boot"
SQUASHFS_PKGLIST="mdadm,lvm2,parted,gdisk,debootstrap,grub-pc,grub-efi,linux-image-amd64,sipcalc,live-boot,dosfstools"
test -d debootstrap/ || \
sudo /usr/sbin/debootstrap \
--include=${SQUASHFS_PKGLIST} \

View File

@ -190,7 +190,7 @@ partprobe >&2
echo "done."
echo -n "Creating LVM PV... "
pvcreate -ff ${target_disk}3 >&2
pvcreate -ffy ${target_disk}3 >&2
echo "done."
echo -n "Creating LVM VG named 'vgx'... "
@ -199,12 +199,12 @@ echo "done."
echo -n "Creating root logical volume (16GB, ext4)... "
lvcreate -L 16G -n root vgx >&2
mkfs.ext4 -f /dev/vgx/root >&2
mkfs.ext4 /dev/vgx/root >&2
echo "done."
echo -n "Creating ceph logical volume (16GB, ext4)... "
lvcreate -L 16G -n ceph vgx >&2
mkfs.ext4 -f /dev/vgx/ceph >&2
mkfs.ext4 /dev/vgx/ceph >&2
echo "done."
echo -n "Creating swap logical volume (8GB)... "
@ -212,6 +212,14 @@ lvcreate -L 8G -n swap vgx >&2
mkswap -f /dev/vgx/swap >&2
echo "done."
echo -n "Creating boot partition filesystem... "
mkfs.ext2 ${target_disk}2 >&2
echo "done."
echo -n "Creating ESP partition filesystem... "
mkdosfs -F32 ${target_disk}1 >&2
echo "done."
echo -n "Mounting disks on temporary target... "
target=$( mktemp -d )
mount /dev/vgx/root ${target} >&2