diff --git a/Meta/build-image-extlinux.sh b/Meta/build-image-extlinux.sh index f6af37224bc..1bef99b80fa 100755 --- a/Meta/build-image-extlinux.sh +++ b/Meta/build-image-extlinux.sh @@ -75,7 +75,7 @@ dd if=/dev/zero of="${dev}${partition_number}" bs=1M count=1 status=none || die echo "done" printf "creating new filesystem... " -mke2fs -q -I 128 "${dev}${partition_number}" || die "couldn't create filesystem" +mke2fs -q "${dev}${partition_number}" || die "couldn't create filesystem" echo "done" printf "mounting filesystem... " diff --git a/Meta/build-image-grub.sh b/Meta/build-image-grub.sh index 89e8d0ab070..ca1c7fda4dc 100755 --- a/Meta/build-image-grub.sh +++ b/Meta/build-image-grub.sh @@ -93,7 +93,7 @@ dd if=/dev/zero of="${dev}${partition_number}" bs=1M count=1 status=none || die echo "done" printf "creating new filesystem... " -mke2fs -q -I 128 "${dev}${partition_number}" || die "couldn't create filesystem" +mke2fs -q "${dev}${partition_number}" || die "couldn't create filesystem" echo "done" printf "mounting filesystem... " diff --git a/Meta/build-image-limine.sh b/Meta/build-image-limine.sh index 10246c30fbd..a59046254c8 100755 --- a/Meta/build-image-limine.sh +++ b/Meta/build-image-limine.sh @@ -77,7 +77,7 @@ echo "done" printf "creating new filesystems... " mkfs.vfat -F 32 "${dev}p1" || die "couldn't create efi filesystem" -mke2fs -q -I 128 "${dev}p2" || die "couldn't create root filesystem" +mke2fs -q "${dev}p2" || die "couldn't create root filesystem" echo "done" printf "mounting filesystems... " diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh index 03b909337d7..fc53d7d37b8 100755 --- a/Meta/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -33,7 +33,7 @@ fi # Prepend the toolchain qemu directory so we pick up QEMU from there PATH="$SCRIPT_DIR/../Toolchain/Local/qemu/bin:$PATH" -INODE_SIZE=128 +INODE_SIZE=256 INODE_COUNT=$(($(inode_usage "$SERENITY_SOURCE_DIR/Base") + $(inode_usage Root))) INODE_COUNT=$((INODE_COUNT + 2000)) # Some additional inodes for toolchain files, could probably also be calculated DISK_SIZE_BYTES=$((($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Root) ) * 1024 * 1024)) @@ -180,8 +180,8 @@ script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) if [ $use_genext2fs = 1 ]; then # regenerate new image, since genext2fs is unable to reuse the previously written image. # genext2fs is very slow in generating big images, so I use a smaller image here. size can be updated - # if it's not enough. - # not using "-I $INODE_SIZE" since it hangs. Serenity handles whatever default this uses instead. + # if it's not enough. this also accounts for the fact that genext2fs only supports 128-byte inodes. + DISK_SIZE_BYTES=$((DISK_SIZE_BYTES - INODE_COUNT * 128)) genext2fs -B 4096 -b $((DISK_SIZE_BYTES / 4096)) -N "${INODE_COUNT}" -d mnt _disk_image || die "try increasing image size (genext2fs -b)" # if using docker with shared mount, file is created as root, so make it writable for users chmod 0666 _disk_image