Create boot and ESP partitions
This commit is contained in:
parent
051c7b802c
commit
0a00d29b90
|
@ -38,7 +38,7 @@ prepare_iso() {
|
||||||
|
|
||||||
prepare_rootfs() {
|
prepare_rootfs() {
|
||||||
echo -n "Preparing Debian live installation via debootstrap... "
|
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/ || \
|
test -d debootstrap/ || \
|
||||||
sudo /usr/sbin/debootstrap \
|
sudo /usr/sbin/debootstrap \
|
||||||
--include=${SQUASHFS_PKGLIST} \
|
--include=${SQUASHFS_PKGLIST} \
|
||||||
|
|
14
install.sh
14
install.sh
|
@ -190,7 +190,7 @@ partprobe >&2
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Creating LVM PV... "
|
echo -n "Creating LVM PV... "
|
||||||
pvcreate -ff ${target_disk}3 >&2
|
pvcreate -ffy ${target_disk}3 >&2
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Creating LVM VG named 'vgx'... "
|
echo -n "Creating LVM VG named 'vgx'... "
|
||||||
|
@ -199,12 +199,12 @@ echo "done."
|
||||||
|
|
||||||
echo -n "Creating root logical volume (16GB, ext4)... "
|
echo -n "Creating root logical volume (16GB, ext4)... "
|
||||||
lvcreate -L 16G -n root vgx >&2
|
lvcreate -L 16G -n root vgx >&2
|
||||||
mkfs.ext4 -f /dev/vgx/root >&2
|
mkfs.ext4 /dev/vgx/root >&2
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Creating ceph logical volume (16GB, ext4)... "
|
echo -n "Creating ceph logical volume (16GB, ext4)... "
|
||||||
lvcreate -L 16G -n ceph vgx >&2
|
lvcreate -L 16G -n ceph vgx >&2
|
||||||
mkfs.ext4 -f /dev/vgx/ceph >&2
|
mkfs.ext4 /dev/vgx/ceph >&2
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Creating swap logical volume (8GB)... "
|
echo -n "Creating swap logical volume (8GB)... "
|
||||||
|
@ -212,6 +212,14 @@ lvcreate -L 8G -n swap vgx >&2
|
||||||
mkswap -f /dev/vgx/swap >&2
|
mkswap -f /dev/vgx/swap >&2
|
||||||
echo "done."
|
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... "
|
echo -n "Mounting disks on temporary target... "
|
||||||
target=$( mktemp -d )
|
target=$( mktemp -d )
|
||||||
mount /dev/vgx/root ${target} >&2
|
mount /dev/vgx/root ${target} >&2
|
||||||
|
|
Loading…
Reference in New Issue