I found a project on GitHub that emulates a Windows XP operating system, and I have a problem with an iso.
I want to extract it, change things and recreate the iso.
The problem is that it doesn't extract the bootloader, so when I boot the new one with Qemu, it doesn't start the system.
So, it occurred to me that the bootloader could be extracted using dd, but it seems impossible.
isoinfo -d -i /mnt/sda2/windows/vxp/VirtualXP.iso Setting input-charset to 'UTF-8' from locale. CD-ROM is in ISO 9660 format System id: Volume id: VirtualXP Volume set id: 20210310_1500 Publisher id: MagicISO v5.2 COPYRIGHT (C) 2001-2006 MagicISO, Inc. Data preparer id: MagicISO v5.2 COPYRIGHT (C) 2001-2006 MagicISO, Inc. Application id: Copyright File id: Abstract File id: Bibliographic File id: Volume set size is: 0 Volume set sequence number is: 1 Logical block size is: 2048 Volume size is: 22250 El Torito VD version 1 found, boot catalog is in sector 22248 Joliet with UCS level 3 found. No SUSP/Rock Ridge present Eltorito validation header: Hid 1 Arch 0 (x86) ID 'MagicISO Boot Record' Cksum 16 E7 OK Key 55 AA Eltorito defaultboot header: Bootid 88 (bootable) Boot media 0 (No Emulation Boot) Load segment 0 Sys type 6 Nsect 4 Bootoff 56E9 22249 And when I create it again it looks like this, without it working in the emulator:
isoinfo -d -i /mnt/sda2/windows/vxp/vxp0.iso Setting input-charset to 'UTF-8' from locale. CD-ROM is in ISO 9660 format System id: LINUX Volume id: VXP0 Volume set id: Publisher id: Data preparer id: Application id: MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Copyright File id: Abstract File id: Bibliographic File id: Volume set size is: 1 Volume set sequence number is: 1 Logical block size is: 2048 Volume size is: 22935 El Torito VD version 1 found, boot catalog is in sector 79 CD-ROM uses ISO 9660:1999 relaxed format Joliet with UCS level 3 found. SUSP signatures version 1 found Rock Ridge signatures version 1 found Rock Ridge id 'RRIP_1991A' Eltorito validation header: Hid 1 Arch 0 (x86) ID '' Cksum AA 55 OK Key 55 AA Eltorito defaultboot header: Bootid 88 (bootable) Boot media 0 (No Emulation Boot) Load segment 0 Sys type 0 Nsect 4 Bootoff 50 80 I tried with sector number 22249, and it didn't work:
dd if="$1" of=bootloader.bin bs=1024 skip=$sector count=1024 I changed the name of the bootloader to grldr (I imagine that by doing this I am just changing the name), currently the command to generate the iso, I am using the following:
mkisofs -V VXP0 -J -joliet-long -iso-level 4 -D -R -o vxp0.iso -b grldr -c boot/boot.catalog -no-emul-boot -boot-load-size 4 -boot-info-table vxp0