mirror of
https://github.com/Dasharo/preseeds.git
synced 2026-03-06 14:49:53 -08:00
qubesos: try R4.3.0-rc3
This commit is contained in:
committed by
Filip Lewiński
parent
4c5c52da59
commit
d9fffaa710
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
QUBES_VERSION="R4.2.4"
|
||||
QUBES_VERSION="R4.3.0-rc3"
|
||||
ISO_DOWNLOAD_LINK="https://mirrors.edge.kernel.org/qubes/iso/Qubes-${QUBES_VERSION}-x86_64.iso"
|
||||
OUTPUT_ISO="qubesos-auto-${QUBES_VERSION}.iso"
|
||||
ISO_PATH="${ISO_PATH:-qubesos.iso}"
|
||||
ISO_PATH="${ISO_PATH:-qubesos_${QUBES_VERSION}.iso}"
|
||||
|
||||
while getopts "hi:o" arg; do
|
||||
case "${arg}" in
|
||||
|
||||
@@ -19,11 +19,11 @@ insmod chain
|
||||
set timeout=60
|
||||
### END /etc/grub.d/00_header ###
|
||||
|
||||
search --no-floppy --set=root -l 'QUBES-R4-2-4-X86-64'
|
||||
search --no-floppy --set=root -l 'QUBES-R4-3-0-RC3-X86-64'
|
||||
|
||||
### BEGIN /etc/grub.d/10_linux ###
|
||||
menuentry '3mdeb QubesOS preseed' --class qubes --class gnu-linux --class gnu --class os {
|
||||
multiboot2 /images/pxeboot/xen.gz console=none
|
||||
module2 /images/pxeboot/vmlinuz-6.12.11-1.qubes.fc37 inst.repo=hd:LABEL=QUBES-R4-2-4-X86-64 plymouth.ignore-serial-consoles quiet inst.ks=https://raw.githubusercontent.com/Dasharo/preseeds/refs/heads/qubesos-preseed/qubesos/ks.cfg
|
||||
module2 /images/pxeboot/initrd-6.12.11-1.qubes.fc37.img
|
||||
module2 /images/pxeboot/vmlinuz inst.repo=hd:LABEL=QUBES-R4-3-0-RC3-X86-64 plymouth.ignore-serial-consoles quiet inst.ks=https://raw.githubusercontent.com/Dasharo/preseeds/refs/heads/qubesos-preseed/qubesos/ks.cfg
|
||||
module2 /images/pxeboot/initrd.img
|
||||
}
|
||||
@@ -1,64 +1,16 @@
|
||||
%pre --interpreter=/bin/bash
|
||||
DISK="/dev/nvme0n1"
|
||||
REQUIRED_SIZE=61440
|
||||
|
||||
PART_COUNT=$(lsblk -nrpo NAME,TYPE,MOUNTPOINT $DISK | grep 'part' | wc -l)
|
||||
|
||||
if [ "$PART_COUNT" -eq 0 ]; then
|
||||
echo "autopart" > /tmp/part-include
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# disk size minus size of partitions
|
||||
FREE_SPACE=$(lsblk -bno NAME,TYPE,SIZE $DISK | awk '
|
||||
$2=="disk"{disk=$3/1024/1024}
|
||||
$2=="part"{used+=$3/1024/1024}
|
||||
END{print int(disk-used)}
|
||||
')
|
||||
|
||||
if [ "$FREE_SPACE" -lt "$REQUIRED_SIZE" ]; then
|
||||
echo "Error: insufficient free space ($FREE_SPACE MiB available, $REQUIRED_SIZE MiB required)" > /dev/tty1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# EFI partition GUID hardcoded, cant use mountpoint as its not mounted
|
||||
EFI_PART=$(lsblk -nrpo NAME,PARTTYPE $DISK | awk '
|
||||
/c12a7328-f81f-11d2-ba4b-00a0c93ec93b/ {print $1; exit}
|
||||
')
|
||||
if [ -z "$EFI_PART" ]; then
|
||||
EFI_PART=$(lsblk -nrpo NAME,MOUNTPOINT $DISK | awk '/boot/ {print $1; exit}')
|
||||
fi
|
||||
|
||||
# disk configuration
|
||||
echo "ignoredisk --only-use=$DISK" > /tmp/part-include
|
||||
echo "reqpart" >> /tmp/part-include
|
||||
|
||||
if [ -z "$EFI_PART" ]; then
|
||||
echo "part /boot/efi --fstype=efi --size=512" >> /tmp/part-include
|
||||
fi
|
||||
|
||||
# Create bounded LVM partition
|
||||
echo "part pv.01 --fstype=lvm --size=$REQUIRED_SIZE --maxsize=$REQUIRED_SIZE --grow" >> /tmp/part-include
|
||||
echo "volgroup qubes_dom0 pv.01" >> /tmp/part-include
|
||||
echo "logvol / --vgname=qubes_dom0 --name=root --fstype=ext4 --size=30000" >> /tmp/part-include
|
||||
echo "logvol swap --vgname=qubes_dom0 --name=swap --recommended" >> /tmp/part-include
|
||||
|
||||
%end
|
||||
#%include /tmp/part-include
|
||||
ignoredisk --only-use=nvme0n1
|
||||
bootloader --location=mbr --boot-drive=nvme0n1
|
||||
autopart --type thinp
|
||||
|
||||
graphical
|
||||
keyboard --vckeymap=pl --xlayouts='pl'
|
||||
lang en_US.UTF-8
|
||||
timezone Europe/Warsaw
|
||||
|
||||
# create user
|
||||
user --name=qubesos --groups=wheel --password="qubesos" --plaintext --gecos="qubesos"
|
||||
sshpw --username root --plaintext qubesos
|
||||
|
||||
firstboot --enable
|
||||
harddrive --dir= --partition=LABEL=QUBES-R4-3-0-RC3-X86-64
|
||||
ignoredisk --only-use=nvme0n1
|
||||
bootloader --location=none
|
||||
clearpart --none --initlabel
|
||||
|
||||
part pv.429 --fstype="lvmpv" --ondisk=nvme0n1 --size=76805
|
||||
part /boot/efi --fstype=efi --ondisk=nvme0n1 --size=600 --fsoptions="umask=0077,shortname=winnt"
|
||||
part /boot --fstype="ext4" --ondisk=nvme0n1 --size=1024
|
||||
volgroup qubes_dom0 --pesize=4096 pv.429
|
||||
logvol none --size=20480 --thinpool --metadatasize=40 --chunksize=64 --name=root-pool --vgname=qubes_dom0
|
||||
logvol swap --fstype="swap" --size=4020 --name=swap --vgname=qubes_dom0
|
||||
logvol / --fstype="ext4" --size=20480 --thin --poolname=root-pool --name=root --vgname=qubes_dom0
|
||||
|
||||
# https://github.com/QubesOS/qubes-anaconda-addon
|
||||
%addon org_qubes_os_initial_setup
|
||||
@@ -79,15 +31,19 @@ default_template fedora-xfce
|
||||
templates_to_install debian-xfce fedora-xfce whonix-gateway whonix-workstation
|
||||
%end
|
||||
|
||||
graphical
|
||||
keyboard --vckeymap=pl --xlayouts='pl'
|
||||
lang en_US.UTF-8
|
||||
timezone Europe/Warsaw --utc
|
||||
network --hostname=dom0
|
||||
|
||||
# create user
|
||||
user --name=qubesos --groups=wheel,qubes --password="qubesos" --plaintext --gecos="qubesos"
|
||||
sshpw --username root --plaintext qubesos
|
||||
|
||||
# reboot after installation
|
||||
reboot
|
||||
|
||||
%packages
|
||||
@^qubes-xfce
|
||||
@qubes-ui
|
||||
kernel-latest
|
||||
kernel-latest-qubes-vm
|
||||
%end
|
||||
|
||||
%post
|
||||
# enable SSH
|
||||
|
||||
Reference in New Issue
Block a user