[CentOS] Creating a USB bootable modified netinstall ISO image

2014-12-03 Thread Alfred von Campe
I’ve been creating slightly modified CentOS netinstall ISO images using the 
following steps:

Copy contents of CentOS netinstall ISO image to a temporary directory
Edit isolunux/isolinux.cfg file
Create new ISO image using the following command: mkisofs -o new.iso -b 
isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 
-boot-info-table -R -J -v -T /tmp/iso

I’ve been using that command for many years and found it in the RHEL 5 
documentation I believe.  Anyway, so far, so good.  If I burn a CD from this 
new ISO image I can boot from it and get the modified menu as expected.  
However, if I use dd to copy this ISO image to a USB stick, It’s not bootable.  
Using the exact same dd command with the original CentOS ISO image produces a 
bootable USB stick.  Any idea why my modified ISO image is not bootable when 
copied to a USB stick?

Alfred

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Creating a USB bootable modified netinstall ISO image

2014-12-03 Thread Greg Bailey

On 12/03/2014 09:51 AM, Alfred von Campe wrote:

I’ve been creating slightly modified CentOS netinstall ISO images using the 
following steps:

Copy contents of CentOS netinstall ISO image to a temporary directory
Edit isolunux/isolinux.cfg file
Create new ISO image using the following command: mkisofs -o new.iso -b 
isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 
-boot-info-table -R -J -v -T /tmp/iso

I’ve been using that command for many years and found it in the RHEL 5 
documentation I believe.  Anyway, so far, so good.  If I burn a CD from this 
new ISO image I can boot from it and get the modified menu as expected.  
However, if I use dd to copy this ISO image to a USB stick, It’s not bootable.  
Using the exact same dd command with the original CentOS ISO image produces a 
bootable USB stick.  Any idea why my modified ISO image is not bootable when 
copied to a USB stick?


I think you'd need to use the isohybrid command that's included in the 
syslinux package.  From /usr/share/doc/syslinux-4.04/isolinux.txt:


   HYBRID CD-ROM/HARD DISK MODE 

Starting in version 3.72, ISOLINUX supports a hybrid mode which can
be booted from either CD-ROM or from a device which BIOS considers a
hard disk or ZIP disk, e.g. a USB key or similar.

To enable this mode, the .iso image should be postprocessed with the
isohybrid script from the utils directory:

isohybrid filename.iso

This script creates the necessary additional information to be able to
boot in hybrid mode.  It also pads out the image to an even multiple
of 1 MB.

This image can then be copied using any raw disk writing tool (on Unix
systems, typically dd or cat) to a USB disk, or written to a
CD-ROM using standard CD burning tools.

The ISO 9660 filesystem is encapsulated in a partition (which starts
at offset zero, which may confuse some systems.)  This makes it
possible for the operating system, once booted, to use the remainder
of the device for persistent storage by creating a second partition.

-Greg

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Creating a USB bootable modified netinstall ISO image

2014-12-03 Thread Alfred von Campe
On Dec 3, 2014, at 12:01, Greg Bailey wrote:

 I think you'd need to use the isohybrid command that's included in the 
 syslinux package.

BING! BING! BING!  We have a winner!  Thanks for that info, it makes
the USB stick bootable.  This will make kickstart installations so much
easier, especially for systems that don’t have a CD-ROM (we used to
have to scrounge for an external CD/DVD player every time).

Thanks,
Alfred

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Creating a USB bootable modified netinstall ISO image

2014-12-03 Thread Lars Hecking
Alfred von Campe writes:
 On Dec 3, 2014, at 12:01, Greg Bailey wrote:
 
  I think you'd need to use the isohybrid command that's included in the 
  syslinux package.
 
 BING! BING! BING!  We have a winner!  Thanks for that info, it makes
 the USB stick bootable.  This will make kickstart installations so much
 easier, especially for systems that don???t have a CD-ROM (we used to
 have to scrounge for an external CD/DVD player every time).

 It would be interesting to see a comparison of fdisk -l for USB treated
 without and with isohybrid. I previously found that USB drives would not
 boot if the boot partition doesn't start on block 1; most tools, including
 fdisk and gparted, seem to put the start of the partition on much higher
 blocks when used on USB drives.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos