mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:14:58 +00:00
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.
This commit is contained in:
parent
e9d8f158a1
commit
0bf867bb9a
1 changed files with 1 additions and 3 deletions
|
@ -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/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue