moved win dump removal to after mkisofs

This commit is contained in:
cvoges12 2021-10-07 22:56:57 +00:00
parent 1868029f7b
commit 67c3139637
1 changed files with 10 additions and 5 deletions

View File

@ -30,17 +30,21 @@ LDA="$(dumpet -i Win*.iso \
CDROM_SECTOR_SIZE=2048
FLOPPY_SECTOR_SIZE=512
# number of floppy disk sectors
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LDA} count=1 > win.dmp
FLOPPY_SECTORS="$(file win.dmp \
| sed -e "s/.*sectors\ //" \
| awk '{printf $1}')"
rm win.dmp
CDROM_SECTORS=`expr $FLOPPY_SECTOR_SIZE \
\* $FLOPPY_SECTORS \
/ $CDROM_SECTOR_SIZE`
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LDA} count=${CDROM_SECTORS} of=win_efi_boot.img
dd \
if=Win*.iso \
bs=${CDROM_SECTOR_SIZE} \
skip=${LDA} \
count=${CDROM_SECTORS} \
of=win_efi_boot.img
# install mkisofs
# recreate iso
@ -65,9 +69,10 @@ mkisofs \
-o winsp.iso \
.
mv winsp.iso ../
mv winsp.iso ..
# clean up bootsect and iso extract
cd ..
rm -rf bootsect/
rm win.dmp
#rm -rf bootsect/
sudo rm -rf ${EXTRACT}