adjust all LVM's to use %pre

This commit is contained in:
Louis Abel 2023-01-26 14:23:30 -07:00
parent 86010af052
commit e236ed0b1b
Signed by untrusted user: label
GPG Key ID: B37E62D143879B36
5 changed files with 107 additions and 26 deletions

View File

@ -32,14 +32,34 @@ zerombr
# Partition clearing information
clearpart --all --initlabel --disklabel=gpt
# Disk partitioning information
part prepboot --fstype="prepboot" --size=4
part biosboot --fstype="biosboot" --size=1
part /boot/efi --fstype="efi" --size=100
part /boot --fstype="xfs" --size=1000 --label=boot
part pv.01 --grow --ondisk=vda --size=1
part /boot/efi --fstype="efi"
part /boot --fstype="xfs" --label=boot
part prepboot --fstype="prepboot"
part biosboot --fstype="biosboot"
part pv.01 --grow --ondisk=vda
volgroup rocky pv.01
logvol / --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" --name=root --vgname=rocky
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%post --erroronfail
passwd -d root
passwd -l root

View File

@ -15,17 +15,38 @@ services --disabled="kdump,rhsmcertd" --enabled="NetworkManager,sshd,rsyslog,chr
rootpw --iscrypted thereisnopasswordanditslocked
# Partition stuff - Should work for x86 and aarch64
zerombr
clearpart --all --initlabel --disklabel=gpt
#zerombr
#clearpart --all --initlabel --disklabel=gpt
#reqpart
part biosboot --size=1 --fstype=biosboot --asprimary
part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1024 --fstype=xfs --label=boot
part pv.01 --size=1 --ondisk=vda --grow
part /boot/efi --fstype=efi --asprimary
part /boot --fstype=xfs --label=boot
part prepboot --fstype=prepboot --asprimary
part biosboot --fstype=biosboot --asprimary
part pv.01 --ondisk=vda --grow
volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions "-m bigtime=0,inobtcount=0"
shutdown
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%packages
@core
rocky-release

View File

@ -15,21 +15,41 @@ services --disabled="kdump,rhsmcertd" --enabled="NetworkManager,sshd,rsyslog,chr
rootpw --iscrypted thereisnopasswordanditslocked
# Partition stuff
zerombr
clearpart --all --initlabel --disklabel=gpt
#zerombr
#clearpart --all --initlabel --disklabel=gpt
#reqpart
# This should allow BIOS, UEFI, and PReP booting. Trying to be as universal as
# possible. This is a similar setup to Fedora without the btrfs.
part prepboot --size=4 --fstype=prepboot --asprimary
part biosboot --size=1 --fstype=biosboot --asprimary
part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1000 --fstype=xfs --label=boot
part pv.01 --size=1 --ondisk=vda --grow
part /boot/efi --fstype=efi --asprimary
part /boot --fstype=xfs --label=boot
part prepboot --fstype=prepboot --asprimary
part biosboot --fstype=biosboot --asprimary
part pv.01 --ondisk=vda --grow
volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions "-m bigtime=0,inobtcount=0"
shutdown
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end
%packages
@core
rocky-release

View File

@ -1,13 +1,33 @@
zerombr
clearpart --all --initlabel --disklabel=gpt
#zerombr
#clearpart --all --initlabel --disklabel=gpt
#reqpart
# This should allow BIOS, UEFI, and PReP booting. Trying to be as universal as
# possible. This is a similar setup to Fedora without the btrfs.
part prepboot --size=4 --fstype=prepboot --asprimary
part biosboot --size=1 --fstype=biosboot --asprimary
part /boot/efi --size=100 --fstype=efi --asprimary
part /boot --size=1000 --fstype=xfs --label=boot
part pv.01 --size=1 --ondisk=vda --grow
part /boot/efi --fstype=efi --asprimary
part /boot --fstype=xfs --label=boot
part prepboot --fstype=prepboot --asprimary
part biosboot --fstype=biosboot --asprimary
part pv.01 --ondisk=vda --grow
volgroup rocky pv.01
logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions "-m bigtime=0,inobtcount=0"
%pre
# Clear the Master Boot Record
dd if=/dev/zero of=/dev/vda bs=512 count=1
# Create a new GPT partition table
parted /dev/vda mklabel gpt
# Create a partition for /boot/efi
parted /dev/vda mkpart primary fat32 1MiB 100MiB
parted /dev/vda set 1 boot on
# Create a partition for /boot
parted /dev/vda mkpart primary xfs 100MiB 1100MiB
# Create a partition for prep
parted /dev/vda mkpart primary 1100MiB 1104MiB
# Create a partition for bios_grub
parted /dev/vda mkpart primary 1104MiB 1105MiB
# Create a partition for LVM
parted /dev/vda mkpart primary ext2 1106MiB 10.7GB
parted /dev/vda set 5 lvm on
%end

View File

@ -1,5 +1,5 @@
%include rocky-cloud-base.ks
%include rocky-cloud-parts-base.ks
%include rocky-cloud-parts-lvm.ks
%include rocky-cloud-base-packages.ks
bootloader --append="console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295" --location=mbr --timeout=1