Saturday, September 7, 2013

Linux: Install ISO image from DVD (CentOS5)

This is for CentOS5, creating a bootable USB image that can install the .iso images:

Summarised from the following:

http://wiki.centos.org/HowTos/InstallFromUSBkey


1.  Use fdisk to setup partitions (about 60M for the boot partition, "a" makes bootable):

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      124927       61440    b  W95 FAT32
/dev/sdc2          124928    15638479     7756776   83  Linux


2.  Create filesystems:

mkfs.vfat -n BOOT /dev/sdc1
mkfs.ext2 -m 0 -b 4096 -L DATA /dev/sdc2

3.  Remount the USB drive, and copy iso image

mkdir /media/DATA/centos
; copy .iso images

4.  Configure syslinux boot on the FAT32 partition

syslinux -s /dev/sdc1
dd if=/usr/share/syslinux/mbr.bin of=/dev/sdc


mount the .iso image locally using -o loop
cp -rv /tmp/image/isolinux/ /media/BOOT/syslinux
cd /media/BOOT
mv syslinux/isolinux.cfg  syslinux/syslinux.cfg
rm -f syslinux/isolinux.bin

5.  Edit syslinux.cfg on the append statements add:

method=hd:sda2:/centos

No comments: