liveusb: mount /var/lib/qubes using overlayfs on tmpfs, instead of dm-snapshot

When dm-snapshot fills up, it is not recoverable situation. Also much
less flexible (for example deleting files does not free the space).
This commit is contained in:
Marek Marczykowski-Górecki 2015-08-03 17:49:53 +02:00
parent d8e4080015
commit ae670d0290
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 16 additions and 0 deletions

View File

@ -104,6 +104,9 @@ qubes-set-updates disable
chgrp -R qubes /var/lib/qubes
chmod -R g+w /var/lib/qubes
mv /var/lib/qubes /var/lib/qubes-base
mkdir -p /var/lib/qubes
%end

View File

@ -100,8 +100,21 @@ fi
# if we have a persistent /home, then we want to go ahead and mount it
if ! strstr "`cat /proc/cmdline`" nopersistenthome && [ -n "$homedev" ] ; then
action "Mounting persistent /home" mountPersistentHome
mkdir -p /home/qubes
else
mkdir -p /home/qubes
mount -t tmpfs none /home/qubes
fi
mkdir -p /home/qubes/qubes
mkdir -p /home/qubes/workdir
ln -nsf /var/lib/qubes-base/vm-templates /home/qubes/qubes/vm-templates
mount -t overlay overlay \
-o lowerdir=/var/lib/qubes-base \
-o upperdir=/home/qubes/qubes \
-o workdir=/home/qubes/workdir \
/var/lib/qubes
/usr/bin/qvm-prefs --offline-mode -s sys-net pcidevs '[]'
for dev in $(/sbin/lspci -mm -n | sed -ne 's/^\([0-9][0-9]:[0-9][0-9].[0-9]\) "02.*/\1/p'); do
/usr/bin/qvm-pci --offline-mode -a sys-net $dev