diff options
author | Martin ร berg <martin@fripost.org> | 2021-08-17 18:18:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-18 10:25:00 +0200 |
commit | 0bf867bb9a1a3113e72330f687da92d616d68f7a (patch) | |
tree | ae19b408f5a4607bdbfe2a653056aa70a923badf /Meta/build-image-qemu.sh | |
parent | e9d8f158a12c9dbec629b12939a23c29c3c53aa2 (diff) | |
download | serenity-0bf867bb9a1a3113e72330f687da92d616d68f7a.zip |
Meta: Create memory disk before mounting it on FreeBSD
There was previously a case where the build-image-qemu.sh script
decided to mount an existing disk image, but without creating the
memory disk device and recording its /dev file name.
After this commit, We create the memory disk device just before
it is used to mount the disk image.
Diffstat (limited to 'Meta/build-image-qemu.sh')
-rwxr-xr-x | Meta/build-image-qemu.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh index 938a9241c0..4dc8726804 100755 --- a/Meta/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -98,9 +98,6 @@ if [ $USE_EXISTING -ne 1 ]; then VND=$(vnconfig _disk_image) (echo "e 0"; echo 83; echo n; echo 0; echo "*"; echo "quit") | fdisk -e "$VND" newfs_ext2fs -D $INODE_SIZE -n $INODE_COUNT "/dev/r${VND}i" || die "could not create filesystem" - elif [ "$(uname -s)" = "FreeBSD" ]; then - MD=$(mdconfig _disk_image) - mke2fs -q -I $INODE_SIZE -N $INODE_COUNT _disk_image || die "could not create filesystem" else if [ -x /sbin/mke2fs ]; then /sbin/mke2fs -q -I $INODE_SIZE -N $INODE_COUNT _disk_image || die "could not create filesystem" @@ -119,6 +116,7 @@ if [ "$(uname -s)" = "Darwin" ]; then elif [ "$(uname -s)" = "OpenBSD" ]; then mount_cmd="mount -t ext2fs "/dev/${VND}i" mnt/" elif [ "$(uname -s)" = "FreeBSD" ]; then + MD=$(mdconfig _disk_image) mount_cmd="fuse-ext2 -o rw+,direct_io "/dev/${MD}" mnt/" else mount_cmd="mount _disk_image mnt/" |