0

I'm trying to change an Ubuntu 18.04 based custom iso originally built against a 5.3.0-26 kernel but I need to build against a 4.15.0-74 kernel. I have Ubuntu 16.04 installed and copied the initrd and vmlinux from it to the 4.15 build folder for the custom iso as well as the isolinux files needed for the build. The following xorriso script works fine with the 5.3 build but fails on the 4.15 build. Here's the build script:

#! /bin/sh

############################
# Create the new ISO image #
############################

# The example names get mapped to their roles here
orig_iso="$HOME"/foxclone/foxclone025-01.iso
new_iso="$HOME"/foxclone/foxclone025-02-4.15.iso
new_files="$PWD"
mbr_template=isolinux/isohdpfx.bin

# Extract MBR template file to disk
dd if="$orig_iso" bs=1 count=432 of="$mbr_template"

xorriso -as mkisofs "$new_files" \
  -o foxclone025-02-4.15.iso \
  -isohybrid-mbr "$mbr_template"
  -c isolinux/boot.cat \
  -b isolinux/isolinux.bin \
   -no-emul-boot -boot-load-size 4 -boot-info-table \
  -eltorito-alt-boot \
  -e boot/grub/efi.img \
   -no-emul-boot \
   -isohybrid-gpt-basdat \
  -m grub.cfg
  "$new_files"

There is no isohdpfx.bin in the Ubuntu 16.04 iso so I'm using one from 18.04. I don't know what to point to from the 16.04 iso.

Here's the result of running the script against the 4.15 files

larry@larry-Satellite-C55-A:~/foxclone/415iso$ sudo bash uefi.sh
[sudo] password for larry:      
432+0 records in
432+0 records out
432 bytes copied, 0.00285789 s, 151 kB/s
xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:foxclone025-02-4.15.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data,  277g free
Added to ISO image: directory '/'='/home/larry/foxclone/415iso'
xorriso : UPDATE : 325 files added in 1 seconds
xorriso : UPDATE : 325 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 432 bytes from file '/home/larry/foxclone/415iso/isolinux/isohdpfx.bin'
libisofs: MISHAP : Cannot patch isolinux boot image
xorriso : FAILURE : Failed to prepare session write run
xorriso : NOTE : -return_with SORRY 32 triggered by problem severity FAILURE
uefi.sh: line 19: -c: command not found
uefi.sh: line 27: /home/larry/foxclone/415iso: Is a directory
larry@larry-Satellite-C55-A:~/foxclone/415iso$ 

Can anyone suggest how to make this work?

TIA Larry

EDIT: Fixed problem with script. Iso will not boot. I suspect this change in the internal kernel involves more than the changes I've already made. I suspect that /casper/filesystem.squashfs will also need to be modified but I'm unsure about that.

Any guidance available?

  • You seem to be missing some line continuation markers (the backslash character at the end of the line) in your xorriso command. That would be the reason behind for the uefi.sh: line 19: and uefi.sh: line 27: errors. Fix those and see if the libisofs: MISHAP error still happens. Update your question with the new results if you still need assistance. – GracefulRestart Jan 20 at 19:04
  • Thanks for pointing that out. The build scripts now run without errors. Now to boot and see if the kernel change worked. – larry78723 Jan 20 at 22:46
  • Why do you add a mkisofs tag when you do not use mkisofs? – schily Jan 24 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.