Commit Graph

24 Commits

Author SHA1 Message Date
AJ Jordan
c05310f61c
Revert "Fix root volume size comparison"
This reverts commit 8000e76d43, because
as @marmarek pointed out, the original was correct and I totally
misread. The check in question is checking whether to _abort_, not
whether to continue. So we want to check if the block device size is
_less_ than the filesystem + margin, not more.

Reopens QubesOS/qubes-issues#4553
2018-12-01 16:19:56 -05:00
AJ Jordan
737a65e5e7
Rename variable to be more clear 2018-12-01 00:01:04 -05:00
AJ Jordan
ce78625bec
Remove weird spaces from script output 2018-12-01 00:01:02 -05:00
AJ Jordan
8000e76d43
Fix root volume size comparison
Fixes QubesOS/qubes-issues#4553
2018-12-01 00:00:57 -05:00
AJ Jordan
98a6b60a49
Remove unnecessary quotes 2018-11-30 23:56:13 -05:00
AJ Jordan
bc6c729a82
Simplify block number calculation 2018-11-30 23:46:09 -05:00
Marek Marczykowski-Górecki
581d9c12ed
Fix detection of root device resize
If xvda is not partitioned, checking size of device mounted as root dev
doesn't detect xvda resize - it will have the new size, while the fs on
it not. Change to checking actual filesystem size.

Also, improve log message to include the size.

Fixes QubesOS/qubes-issues#4274
2018-09-04 18:12:07 +02:00
Peter Gerber
8ff9cbe299
setup-rwdev.sh: Only check first 1 GiB for zeros
As described in QubesOS/qubes-issues#3758, a VM may fail to start
if the volume is large. This because the whole volume is read to
ensure it's empty (=all zeros).

This changes limits the check to the first 1 GiB of the private
volume. As additional safety, a scan with blkid is done.

Fixes https://github.com/QubesOS/qubes-issues/issues/3758
2018-07-03 20:07:12 +00:00
Marek Marczykowski-Górecki
82937e129e
Use only /etc/skel to provision user's home directory of new VM
Get rid of non-standard /home.orig handling.

Fixes QubesOS/qubes-issues#3771
2018-04-13 00:35:08 +02:00
Marek Marczykowski-Górecki
1781568d08
Speed up initial /rw setup
On first VM's boot, setup-rwdev.sh script create filesystem on
/dev/xvdb. But it does so only after checking if /dev/xvdb is really
empty, by comparing it to /dev/zero. Speed up reads from /dev/zero bu
using larger blocks (default of head - 8k, instead of explicit 512).
This speed up the check over 5 times.
2018-02-27 05:12:44 +01:00
TomZ
3abc3b1b75
Fix language issues and usability issue 2017-12-13 10:15:20 +01:00
Marek Marczykowski-Górecki
1ed6e614ab
Resize root filesystem at VM startup if needed
Check if root device was enlarged while domain was powered off and
resize the filesystem in such a case.

QubesOS/qubes-issues#3173
QubesOS/qubes-issues#3143
2017-10-18 21:02:15 +02:00
Marek Marczykowski-Górecki
aad6fa6d19
Hint shellcheck where to look for sourced files, if in repository
This will ease running shellcheck from the repository.
2017-09-30 05:05:34 +02:00
Marek Marczykowski-Górecki
8bb152f76e
init: fix issues found by shellcheck in init scripts
Most of them are missing quotes, `` -> $(), and -o/-a usage in
conditions. Also add few directives disabling checks where were too
verbose.
2017-09-30 04:49:21 +02:00
Marek Marczykowski-Górecki
7e608a8bb4
Remove DisposableVM savefile related files
In Qubes 4.0 we no longer use two-stage DisposableVM startup.
2017-06-08 22:11:35 +02:00
Marek Marczykowski-Górecki
9a7dee5b46
dispvm: don't use perl to decode base64-encoded script
This looks like an overkill. And more importantly - required modules are
not installed by default, making it impossible to use in default minimal
template.

Fixes QubesOS/qubes-issues#1610
2017-05-14 23:29:52 +02:00
Marek Marczykowski-Górecki
9f9c3c56fc
Use online resize2fs, and run filesystem check only when needed
When trying offline resize2fs, it require running fsck first, which
takes time, especially on large volumes. And in most cases, resize2fs
will notice that no action is needed - after wasting some time on fsck.
To remedy this, use resize2fs in online mode (on mounted filesystem).
And drop fsck call if it fails (filesystem is already mounted
read-write, running fsck isn't good idea).

But do not remove fsck call completely - still call it, but without '-f'
flag, so it run actual check only when really needed (unclean shutdown,
last check far in the past etc).

Fixes QubesOS/qubes-issues#979
Fixes QubesOS/qubes-issues#2583
2017-02-27 04:21:59 +01:00
Marek Marczykowski-Górecki
a69acdabbf
Merge remote-tracking branch 'qubesos/pr/24'
* qubesos/pr/24:
  Initialize home_volatile for disposable VMs.
2016-11-17 09:33:02 +01:00
Marek Marczykowski-Górecki
dbcd3e5f0a
Write random seed directly to /dev/urandom
Don't store it in some variable, as may contain non-ASCII or control
characters (or starts with '-').
2016-11-17 09:30:49 +01:00
Patrick Schleizer
b1f418ca76 fix reload_random_seed error handling
https://github.com/QubesOS/qubes-core-agent-linux/pull/21#pullrequestreview-8302473
2016-11-13 23:37:49 +01:00
Manuel Amador (Rudd-O)
6ca10b42eb Initialize home_volatile for disposable VMs. 2016-11-13 21:20:46 +00:00
Manuel Amador (Rudd-O)
60adadff73 Invert logic of systemd_version_changed. 2016-10-28 05:02:53 +00:00
Manuel Amador (Rudd-O)
40db82a79f Better private.img size management. 2016-10-26 12:59:50 +00:00
Manuel Amador (Rudd-O)
59aec8e5eb Clean up early initialization and setup of /rw 2016-10-23 20:19:51 +00:00