Browse Source

init: run resize2fs on /rw before mounting

In case of private.img was resized while the VM was powered off.
Marek Marczykowski-Górecki 10 years ago
parent
commit
fabc72701c
2 changed files with 2 additions and 0 deletions
  1. 1 0
      vm-init.d/qubes-core
  2. 1 0
      vm-systemd/misc-post.sh

+ 1 - 0
vm-init.d/qubes-core

@@ -55,6 +55,7 @@ start()
 	mkdir -p /var/run/qubes
 
 	if [ -e /dev/xvdb ] ; then
+		resize2fs /dev/xvdb 2> /dev/null || echo "'resize2fs /dev/xvdb' failed"
 		mount /rw
 
         if ! [ -d /rw/home ] ; then

+ 1 - 0
vm-systemd/misc-post.sh

@@ -13,6 +13,7 @@ fi
 INTERFACE=eth0 /usr/lib/qubes/setup-ip
 
 if [ -e /dev/xvdb -a ! -e /etc/this-is-dvm ] ; then
+    resize2fs /dev/xvdb 2> /dev/null || echo "'resize2fs /dev/xvdb' failed"
     mount /rw
 
     if ! [ -d /rw/home ] ; then