Archived
1
0

ISO-Repack: fixed layout

This commit is contained in:
2022-11-16 12:23:44 +01:00
parent 0077eecb73
commit 7b236c1dc0

View File

@@ -7,27 +7,29 @@ mkisofs xorriso isohybrid
## Editing ISO image
create workspace
`mkdir /tmp/custom_iso`
Mount image and extract it since it is read only
`mount -t iso9660 -o loop ~/original.iso /mnt/`
`tar cf - /mnt/. | (cd /tmp/custom_iso; tar xfp -)`
You can now modify the files for editing the bootloader config for example!
Create workspace
`mkdir /tmp/custom_iso`
Mount image and extract it since it is read only
```
mount -t iso9660 -o loop ~/original.iso /mnt/`
tar cf - /mnt/. | (cd /tmp/custom_iso; tar xfp -)
```
You can now modify the files for editing the bootloader config for example!
## Back into an iso
### Legacy only
Rebuild iso with mkisofs
`mkisofs -o output.iso -b syslinux/isolinux.bin -c syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "Custom ISO" /tmp/custom_iso`
Bless it with isohybrid
`isohybrid output.iso`
Rebuild iso with mkisofs
`mkisofs -o output.iso -b syslinux/isolinux.bin -c syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "Custom ISO" /tmp/custom_iso`
Bless it with isohybrid
`isohybrid output.iso`
### EFI and Legacy
Rebuild iso with mkisofs
`mkisofs -o output.iso -b syslinux/isolinux.bin -J -R -l -c syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -graft-points -V "Custom ISO" /tmp/custom_iso`
Bless it with isohybrid
Rebuild iso with mkisofs
`mkisofs -o output.iso -b syslinux/isolinux.bin -J -R -l -c syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -graft-points -V "Custom ISO" /tmp/custom_iso`
Bless it with isohybrid
`isohybrid --uefi output.iso`
### Sources
https://gist.github.com/AkdM/2cd3766236582ed0263920d42c359e0f
https://tuxfixer.com/mount-modify-edit-repack-create-uefi-iso-including-kickstart-file/
https://gist.github.com/AkdM/2cd3766236582ed0263920d42c359e0f
https://tuxfixer.com/mount-modify-edit-repack-create-uefi-iso-including-kickstart-file/