LDA -> LBA b/c I'm dyslexic

This commit is contained in:
cvoges12 2021-10-08 05:05:37 +00:00
parent 99620c8d3b
commit 9bb4fe29c3

View file

@ -23,14 +23,14 @@ LOAD_SIZE="$(dumpet -i Win*.iso \
| grep -o "[^:]*$" \
| cut -d ' ' -f2 \
| head -1)"
LDA="$(dumpet -i Win*.iso \
| grep "LDA" \
LBA="$(dumpet -i Win*.iso \
| grep "LBA" \
| tail -n 1 \
| awk '{printf $3}')"
CDROM_SECTOR_SIZE=2048
FLOPPY_SECTOR_SIZE=512
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LDA} count=1 > win.dmp
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LBA} count=1 > win.dmp
FLOPPY_SECTORS="$(file win.dmp \
| sed -e "s/.*sectors\ //" \
| awk '{printf $1}')"
@ -42,7 +42,7 @@ CDROM_SECTORS=`expr $FLOPPY_SECTOR_SIZE \
dd \
if=Win*.iso \
bs=${CDROM_SECTOR_SIZE} \
skip=${LDA} \
skip=${LBA} \
count=${CDROM_SECTORS} \
of=win_efi_boot.img