1

I have extracted the iso file "archlinux-2022.06.01-x86_64.iso". And I have made changes in the "airootfs.sfs" file

And now I am going to create a "bootable (dos/MBR sector)" iso image again Like the original iso file that I have extracted

sudo xorriso -as  mkisofs -d -l -r  -no-emul-boot 
-o archlinux.iso .
-append_partition 2 0xef ../compile-linux/efi_part.img -e  "--interval:appended_partition_2:all::" -no-emul-boot ../compile-linux/bios_boot.img
-G ../compile-linux/mbr_code.img 
-b syslinux/isolinux.bin 
-c syslinux/boot.cat

output file archlinux.iso

archlinux.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'ISOIMAGE' (bootable)

output command xorriso -indev archlinux.iso -report-el-torito plain -report-system-area plain

xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE :     114 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev 'archlinux.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito , MBR cyl-align-off
Media summary: 1 session, 445804 data blocks,  871m data,  178g free
Volume id    : 'ISOIMAGE'
El Torito catalog  : 42  1
El Torito cat path : /syslinux/boot.cat
El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
El Torito boot img :   1  BIOS  y   none  0x0000  0x00     76          43
El Torito img path :   1  /syslinux/isolinux.bin
System area options: 0x00000a00
System area summary: MBR cyl-align-off
ISO image size/512 : 1783216
Partition offset   : 0
MBR heads per cyl  : 64
MBR secs per head  : 32
MBR partition table:   N Status  Type        Start       Blocks
MBR partition      :   1   0x00  0x83            0      1783216
MBR partition      :   2   0x00  0xef      1783216         1600

The above outputs are for the iso file that I made myself

I tried to use my iso file live in virtual machine "Efi option is disabled" but I get these errors.

enter image description here

I am a beginner and don't know much about this

That's why I tried to find the right way to make the image from the original iso output, but I didn't succeed

xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : ISO image bears MBR with  -boot_image any partition_offset=16
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE :     113 nodes read in 1 seconds
libisofs: NOTE : Found hidden El-Torito image for EFI.
libisofs: NOTE : EFI image start and size: 396800 * 2048 , 0 * 512
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev '../archlinux-2022.06.01-x86_64.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito , MBR isohybrid cyl-align-all GPT
Media summary: 1 session, 440998 data blocks,  861m data,  178g free
Volume id    : 'ARCH_202206'
El Torito catalog  : 118  1
El Torito cat path : /syslinux/boot.cat
El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
El Torito boot img :   1  BIOS  y   none  0x0000  0x00      4         119
El Torito boot img :   2  UEFI  y   none  0x0000  0x00      0      396800
El Torito img path :   1  /syslinux/isolinux.bin
El Torito img opts :   1  boot-info-table isohybrid-suitable
El Torito img blks :   2  44032
System area options: 0x00000302
System area summary: MBR isohybrid cyl-align-all GPT
ISO image size/512 : 1763992
Partition offset   : 16
MBR heads per cyl  : 64
MBR secs per head  : 32
MBR partition table:   N Status  Type        Start       Blocks
MBR partition      :   1   0x80  0x00           64      1587136
MBR partition      :   2   0x00  0xef      1587200       176128
GPT                :   N  Info
GPT disk GUID      :      3230323230363041b130303533353232
GPT entry array    :      2  248  separated
GPT lba range      :      64  1763928  1763991
GPT partition name :   1  490053004f00480079006200720069006400
GPT partname local :   1  ISOHybrid
GPT partition GUID :   1  3230323230363041b131303533353232
GPT type GUID      :   1  a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags:   1  0x1000000000000001
GPT start and size :   1  64  1587136
GPT partition name :   2  490053004f004800790062007200690064003100
GPT partname local :   2  ISOHybrid1
GPT partition GUID :   2  3230323230363041b132303533353232
GPT type GUID      :   2  a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags:   2  0x1000000000000001
GPT start and size :   2  1587200  176128

Where did I go wrong? I am trying to create my ISO image file and use it live

Thank you for your help

2 Answers 2

1

your xorriso -as mkisofs run lacks at least the separator -eltorito-alt-boot between -e and its modifying options and -b and its modifying options. So your result ISO lacks an El Torito entry for EFI, because -e was overridden by -b.

Whatever, the failure of ISOLINUX is not to blame on this shortcomming. I guess it is rather about missing modifying options for -b.

You may ask xorriso for a proposal about the boot related options to replay a bootable ISO (works best if the ISO was made by xorriso). For correctly analysing the Archlinux ISOs you need xorriso-1.5.4 or newer, because the used combination of boot options are not expected by older versions.

$ xorriso -indev archlinux-2022.06.01-x86_64.iso -report_el_torito as_mkisofs
...
-V 'ARCH_202206'
--modification-date='2022060115352200'
-isohybrid-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:'archlinux-2022.06.01-x86_64.iso'
-partition_cyl_align all
-partition_offset 16
-partition_hd_cyl 64
-partition_sec_hd 32
--mbr-force-bootable
-append_partition 2 0xef --interval:local_fs:1587200d-1763327d::'archlinux-2022.06.01-x86_64.iso'
-iso_mbr_part_type 0x00
-c '/syslinux/boot.cat'
-b '/syslinux/isolinux.bin'
-no-emul-boot
-boot-load-size 4
-boot-info-table
-eltorito-alt-boot
-e '--interval:appended_partition_2_start_396800s_size_176128d:all::'
-no-emul-boot
-boot-load-size 0
-isohybrid-gpt-basdat

Not all of them have to be given, because some are individual to the ISO (-V 'ARCH_202206' --modification-date='2022060115352200'). Some are not really needed because xorriso can figure out by itself (-partition_cyl_align all -partition_hd_cyl 64 -partition_sec_hd 32 -boot-load-size 0).

Comparing with your option list, i bet on this as immediate reason of the failure to boot via BIOS from (virtual) optical medium:

  • Missing -b modifying options: -no-emul-boot -boot-load-size 4 -boot-info-table (Well, -no-emul-boot gets into effect by mistake.)

But there are more problems:

  • Missing -eltorito-alt-boot, thus no EFI booting via optical medium.

  • Missing -e modifying option -isohybrid-gpt-basdat, thus no GPT for booting via picky EFI implementations from USB stick.

  • Missing -isohybrid-mbr, thus no booting via BIOS from USB stick. Instead there is a surplus -G with an obscure MBR image mbr_code.img (from where do you get this ?)

  • Obscure input file ../compile-linux/bios_boot.img will be mapped to the root of the ISO.

The sequence of -b and -e is the other way round, but should be ok. Boot load size 0 for the EFI image is correct, because it is too large to have its real size listed in the boot catalog (limit is 32 MiB).

With xorriso-1.5.4 there would be a simpler way to manipulate the Archlinux ISO:

xorriso -indev archlinux-2022.06.01-x86_64.iso \
        -outdev archlinux.iso \
        ... xorriso manipulation commands like -map or -rm ... \
        -boot_image any replay

(xorriso questions and support requests are best submitted to [email protected] .)

Have a nice day :)

Thomas

2
  • It's working fine... Thank you very much :) Just because you used ... I used sudo xorriso -as mkisofs -d -l -r -no-emul-boot -o archlinux.iso . Commented Jul 6, 2022 at 9:28
  • In response to your question I got mbr_code.img with command dd if=archlinux-2022.06.01-x86_64.iso of=compile-linux/mbr_code.img bs=1 count=446 Commented Jul 6, 2022 at 9:40
0

archlinux-2022.06.01-x86_64.iso is bootable in a total of four separate ways:

  • as a (real or virtual) ISO9660 CD/DVD in BIOS mode
  • as a (real or virtual) ISO9660 CD/DVD in UEFI mode
  • as a HDD image in BIOS mode
  • as a HDD image in UEFI mode

According to archiso profile configuration, the UEFI boot modes even include two separate bootloaders for the 64-bit and 32-bit x86 UEFI implementations (x64 and ia32 in UEFI terminology), so you could say it has a total of six boot modes.

Creating such a beast is complicated, and Arch has a dedicated tool archiso for the job - for a good reason, I guess. I'd suggest you should perhaps try using it instead of trying to reinvent the wheel. The source code of archiso is available in Gitlab, if you find you need to customize it.

If I'm interpreting the xorriso report correctly, your ISO image claims to be bootable only in two ways:

  • as a (real or virtual) ISO9660 CD/DVD in BIOS mode
  • as a HDD image in UEFI mode (but with a MBR partition table only)

Also, on your image the boot record status says cyl-align-off as opposed to isohybrid cyl-align-all, suggesting that the various components of the ISO image might not be properly aligned.

On the real Arch ISO, the MBR indicates the first partition (the main Iiso9660 filesystem content) is bootable in BIOS mode (status 0x80) and has a partition type ID of 0x00, which is typical for ISO9660 filesystems, as they have no standard MBR partition type ID assigned. On your image, the MBR claims the first partition as non-bootable and has a type ID of 0x83, which would be the expected value for ext4 or other Linux filesystem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .