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 mount /dev/${1}2 /mnt cp $2 /mnt/ # end
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}1s/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
m.roth at 5-cent.us wrote on 04/30/2010 11:03 AM:> Ok, where/how do I submit this to the CentOS project?http://wiki.centos.org/Contribute If you don't want to jump through the hoops required to become a Wiki author, let me know and I'll be glad to add it with attribution to http://wiki.centos.org/HowTos/InstallFromUSBkey Phil
From: "m.roth at 5-cent.us" <m.roth at 5-cent.us>> 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.Don't forget to say in the wiki where to get this 'livecd-iso-to-disk' fedora script JD
m.roth at 5-cent.us wrote on 04/30/2010 11:03 AM:> 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.Variation on your theme. Uses ext2 and extlinux with no FAT partition. Remove "-n" from sfdisk so changes are written. Adds some error checking.: ---------------------------------------------------------------------------- #!/bin/bash # ################################### # Author: mark roth # Date: 30 Apr. 2010 # Purpose: to create a working, bootable CentOS install on a USB key ##################################### PATH=/sbin:/bin:/usr/sbin:/usr/bin if [[ $# < 2 ]]; then echo "usage: $0 <devname> <path/to/install.iso>" echo " Example: $0 sdb /scratch/CentOS-5.4-bin-DVD.iso" exit 1 fi if [[ ! -f /usr/bin/livecd-iso-to-disk ]]; then echo "You must install livecd-tools before running this." echo "See: http://projects.centos.org/trac/livecd/wiki/GetToolset" exit 2 fi if [[ -f $2 ]]; then if file $2 | grep -q "ISO 9660"; then echo "Using ISO image $2 ..." else echo "$2 is not an ISO image!" exit 3 fi else echo "$2 ISO image file not found." exit 4 fi if [[ $EUID -ne 0 ]]; then echo "This script must be run as root." exit 5 fi if sfdisk -l /dev/$1 >& /dev/null; then echo "Current partitions for /dev/$1:" sfdisk -l /dev/$1 echo -n "Press <Enter> to continue or ^C to abort: " read aline else echo "No such device /dev/$1" exit 6 fi sfdisk -uM /dev/$1 << EOF ,,83,* ; ; ; EOF echo "Remove and reinsert the USB key." echo " Use Safely Remove first if in a GUI." echo " Do not mount in GUI after reinsertion." echo -n " Press <Enter> to continue: " read aline mkfs /dev/${1}1 /usr/bin/livecd-iso-to-disk --reset-mbr $2 /dev/${1}1 echo "USB boot media of $2 done." # end ---------------------------------------------------------------------------- Unfortunately the only system I have to test on at the moment boots the installer OK, then asks for the installation media, but doesn't see the USB device when Hard Disk is selected. With the FAT partition and syslinux doesn't see the device as bootable at all.