File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ package_qubes-vm-core() {
5959 release=${BASH_REMATCH[1]}.${BASH_REMATCH[2]}
6060 depends=(
6161 dconf
62+ dosfstools
6263 fakeroot
6364 gawk
6465 gnome-packagekit
Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ update_qubesconfig() {
8585 mount /usr/local || :
8686 fi
8787
88+ rootdev=$( grep -o ' ^[^ ]* / ' /proc/mounts | cut -f 1 -d ' ' ) || rootdev=
89+ # if root volume uses partitions, and is mounted directly (no dm-snapshot),
90+ # check if xvda1 needs filesystem to be created
91+ if [ -n " $rootdev " ] && [ " $( readlink -f " $rootdev " ) " = " /dev/xvda3" ]; then
92+ if [ -z " $( blkid -o value -s TYPE /dev/xvda1) " ]; then
93+ mkfs.vfat -S 4096 -n EFI /dev/xvda1 || \
94+ echo " Creating EFI fs failed: 'mkfs.vfat -S 4096 -n EFI /dev/xvda1': $? " >&2
95+ fi
96+ fi
97+
8898 # Install qubes version of fstab
8999 if ! grep -q dmroot /etc/fstab; then
90100 cp -f /etc/fstab.qubes /etc/fstab
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ Depends:
3131 dconf-cli,
3232 distro-info-data,
3333 dmsetup,
34+ dosfstools,
3435 e2fsprogs,
3536 gawk,
3637 graphicsmagick,
Original file line number Diff line number Diff line change @@ -166,6 +166,16 @@ case "${1}" in
166166 mount /usr/local || :
167167 fi
168168
169+ rootdev=$( grep -o ' ^[^ ]* / ' /proc/mounts | cut -f 1 -d ' ' ) || rootdev=
170+ # if root volume uses partitions, and is mounted directly (no dm-snapshot),
171+ # check if xvda1 needs filesystem to be created
172+ if [ -n " $rootdev " ] && [ " $( readlink -f " $rootdev " ) " = " /dev/xvda3" ]; then
173+ if [ -z " $( blkid -o value -s TYPE /dev/xvda1) " ]; then
174+ mkfs.vfat -S 4096 -n EFI /dev/xvda1 || \
175+ echo " Creating EFI fs failed: 'mkfs.vfat -S 4096 -n EFI /dev/xvda1': $? " >&2
176+ fi
177+ fi
178+
169179 # remove old symlinks
170180 if [ -L /etc/systemd/system/sysinit.target.wants/qubes-random-seed.service ]; then
171181 rm /etc/systemd/system/sysinit.target.wants/qubes-random-seed.service
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ Obsoletes: qubes-core-vm-doc < 4.0.0
186186Conflicts: qubes-gui-agent < 4.1.6
187187Conflicts: pulseaudio-qubes < 4.2.0
188188Provides: group(qubes)
189+ Requires(post): dosfstools
189190Requires(pre): shadow
190191Requires(pre): qubes-db
191192BuildRequires: gcc
@@ -574,6 +575,15 @@ if [ -L /usr/local ]; then
574575 mount /usr/local || :
575576fi
576577
578+ rootdev=$(grep -o '^[^ ]* / ' /proc/mounts | cut -f 1 -d ' ') || rootdev=
579+ # if root volume uses partitions, and is mounted directly (no dm-snapshot),
580+ # check if xvda1 needs filesystem to be created
581+ if [ -n "$rootdev" ] && [ "$(readlink -f "$rootdev")" = "/dev/xvda3" ]; then
582+ if [ -z "$(blkid -o value -s TYPE /dev/xvda1)" ]; then
583+ mkfs.vfat -S 4096 -n EFI /dev/xvda1 || echo "Creating EFI fs failed: 'mkfs.vfat -S 4096 -n EFI /dev/xvda1': $?" >&2
584+ fi
585+ fi
586+
577587%if 0%{?fedora} < 41
578588if [ ! -f /etc/qubes-dnf-hardened ]; then
579589 dnf config-manager --setopt=zchunk=0 --setopt=deltarpm=0 --save &&
You can’t perform that action at this time.
0 commit comments