[CentOS] Simplifying making a USB install key

Bob Beers bob.beers at gmail.com
Fri Apr 30 15:16:27 UTC 2010


On Fri, Apr 30, 2010 at 11:03 AM,  <m.roth at 5-cent.us> wrote:
> Ok, where/how do I submit this to the CentOS project?
>
> Here's a complete script - anyone, *please* feel free to test it, and let
> me know if I've missed anything.
>
> Thanks in advance.
>
>        mark
>
> #!/bin/bash
> # ###################################
> # Author: mark roth
> # Date: 30 Apr. 2010
> # Purpose: to create a working, bootable CentOS install on a USB key
> #####################################
>
> if [[ $# < 2 ]]; then
>   echo "usage: $0 <devname> <path/to/install.iso>"
>   echo "  Example: $0 sdb /scratch/CentOS-5.4-bin-DVD.iso"
>   echo "  Note: you must install livecd-tools before running this."
>   exit
> fi
>
> /sbin/sfdisk -n -uM /dev/$1 << EOF
> ,10,b,*
> ,,83
> ;
> ;
> EOF
>
> mkfs -t vfat /dev/${1}1
> mkfs /dev/${1}2
>
> /usr/bin/livecd-iso-to-disk /scratch/CentOS-5.4-i386-LiveCD.iso /dev/${1}1

s/scratch/CentOS-5.4-i386-LiveCD.iso/${2}/ ???


> mount /dev/${1}2 /mnt
> cp $2 /mnt/
>
> # end
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

-Bob



More information about the CentOS mailing list