increased disk size and moved bpb/ebpb a bit

This commit is contained in:
2024-10-04 14:26:10 -04:00
parent d93236d298
commit fdbfd811d5
2 changed files with 5 additions and 5 deletions

View File

@@ -59,7 +59,7 @@
; copy of FAT32 EBPB, 54 bytes ; copy of FAT32 EBPB, 54 bytes
;0x306A ;0x306A
%define fat32_ebpb 0x3070 %define fat32_ebpb 0x30A0
%define fat32_ebpb_SIZE 54 %define fat32_ebpb_SIZE 54
; FAT32 FSInfo, 512 bytes ; FAT32 FSInfo, 512 bytes

View File

@@ -37,12 +37,12 @@ mount_point=/tmp/stevia_disk
disk_tmp_file=/tmp/disk.img disk_tmp_file=/tmp/disk.img
disk_file_final=./disk.img.gz disk_file_final=./disk.img.gz
# $disk_sector_size * $disk_size = total bytes, default is 128MiB # $disk_sector_size * $disk_size = total bytes, default is 256MiB
disk_size=262144 disk_size=524288
disk_sector_size=512 disk_sector_size=512
if ! [ -e $disk_tmp_file ]; then if ! [ -e $disk_tmp_file ]; then
# create raw disk image with 128MiB of space # create raw disk image
dd if=/dev/zero of=$disk_tmp_file bs=$disk_sector_size count=$disk_size dd if=/dev/zero of=$disk_tmp_file bs=$disk_sector_size count=$disk_size
sync sync
else else
@@ -66,7 +66,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# get first partition, this is sloppy might need to review this... # get first partition, this is sloppy might need to review this...
firstpart=$(lsblk -ilp -o NAME $ld | tr '\n' ' ' | awk '{print $3}') firstpart=$(lsblk -ilp -o NAME $ld | tr '\n' ' ' | awk '{print $3}')
mkfs.vfat -v -F32 -S $disk_sector_size $firstpart mkfs.fat -v -F32 $firstpart
# copy MBR while preserving partition table # copy MBR while preserving partition table
dd if=$mbr_file of=$ld bs=1 count=440 dd if=$mbr_file of=$ld bs=1 count=440