diff options
author | Helmut Grohne <helmutg@debian.org> | 2022-12-22 11:13:38 +0000 |
---|---|---|
committer | Helmut Grohne <helmutg@debian.org> | 2022-12-22 11:13:38 +0000 |
commit | 0234a8ba67bb1025b5d6c24f3c313dd750b36f05 (patch) | |
tree | a0772a2ed58892abfb179fa77add74947483e95d /debvm-run | |
parent | fba873db285464c402dfff6689908edabd49fcbb (diff) | |
parent | d1c39543c259f76720a4d9c173d7d15f6fa753d7 (diff) | |
download | debvm-0234a8ba67bb1025b5d6c24f3c313dd750b36f05.tar.gz |
Merge branch 'josch' into 'main'
give the ext4 image a disk label
See merge request helmutg/debvm!5
Diffstat (limited to 'debvm-run')
-rwxr-xr-x | debvm-run | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -46,6 +46,14 @@ done test -f "$IMAGE" || die "image '$IMAGE' not found" test -s "$IMAGE" || die "image '$IMAGE' is empty" +if ! printf '\123\357' | cmp --bytes=2 "$IMAGE" - 1080; then + die "image '$IMAGE' is not in ext4 format" +fi + +if ! printf 'debvm\000' | cmp --bytes=6 "$IMAGE" - 1144; then + die "image '$IMAGE' was not created by debvm-create (wrong disk label)" +fi + cleanup() { set +x test -n "$KERNELTMP" && rm -f "$KERNELTMP" @@ -78,7 +86,7 @@ INITRDNAME=$(/sbin/debugfs "$IMAGE" -R "stat initrd.img" | sed 's/Fast link dest test -n "$KERNELNAME" || die "failed to discover kernel image" test -n "$INITRDNAME" || die "failed to discover initrd image" -KERNEL_CMDLINE="root=/dev/vda rw" +KERNEL_CMDLINE="root=LABEL=debvm rw" NETDEV="user,id=net0" set -- \ |