Following method works with CentOS 6.2:
Requirements: USB flash drive (at least 4 GB, I used a 16 GB one)
Download an ISO image from a mirror - I chose the full 1st DVD image to avoid a network install (because it is not clear if the cryptographic package signatures are checked by the installer or not), e.g.:
$ wget http://ftp.uni-bayreuth.de/linux/CentOS/6.2/isos/i386/CentOS-6.2-i386-bin-DVD1.iso
$ md5sum CentOS-6.2-i386-bin-DVD1.iso
Check the md5sum against a md5sum.txt
file from another mirror (and check md5sum.txt
against md5sum.txt.asc
via gpg
).
Partition your flash drive (say it is /dev/sdb
), i.e. delete all partitions, create just one, set the boot-flag and perhaps the FS-type:
# dd if=/dev/zero of=/dev/sdb bs=512 count=1
# fdisk /dev/sdb
> n
> p
> 1
(defaults)
> a
> 1
(toggles boot flag)
> t
> c
(filesystem type, default is 83, probably no need to change it)
> w
(write the new table)
Create a filesystem of type VFAT:
# mkfs.vfat /dev/sdb1
Fetch the Fedora-LiveCD tools:
$ git clone git://git.fedorahosted.org/livecd
(We need livecd/tools/livecd-iso-to-disk.sh
- it also supports non-livecd ISO-images as source!)
Install some packages needed by the script, e.g. under a Debian-like system:
# apt-get install isomd5sum syslinux extlinux
Execute the script:
# bash livecd-iso-to-disk.sh CentOS-6.2-i386-bin-DVD1.iso /dev/sdb1
Test the device:
$ qemu -hda /dev/sdb -m 256 -vga std
For this to work you user (temporarily) needs rw
permissions on /dev/sdb
.
PS: As a side node, RHEL 6 has dropped support for non PAE hardware - i.e. the kernel does not run on such an old system like a Thinkpad R40 (which is Centrino based).
Since you have KVM access to the machine, you have two fairly straightforward solutions.
The first -- & easiest -- is to determine if your KVM setup supports mounting a USB or DVD remotely. (Read the Fine Manual to determine this.) I know one of the products I have used over the years, which is manufactured by Raritan, supports this. Because one thinks KVM as only a remote tool to access the monitor, keyboard & mouse, the fact it also supports the USB protocol is easily overlooked.
The drawback with this solution is, of course, bandwidth latency. If you have only a 1Mb connection to this machine, it will take a while to transfer the install data to the target.
The second solution, which is a little more difficult, is to use your KVM access to implement @jsbillings suggestion. Put the image somewhere the target CentOS system can see it (e.g., the Windows machine), & use the image file there. Although the commands might be a bit tricky if you aren't an experienced Linux SysAdmin, you won't have the same bandwidth issue the first option poses. But having KVM access means you can actually monitor the install, & you have a means to access the system if the install encounters an unforeseen problem.
Pick the option you are most comfortable with, & give it a try.
Best Answer
Yes you can install centos in USB drive. Don't install it in the same USB disk which you're using as installer. Use separate usb disk as installer and installation. Or you can keep the installer in a CD disk.
Select boot drive properly while using the CentOS installed in the usb. You may install bootloader into the usb drive to make it bootable and select it as first boot drive. Otherwise skip bootloader installation in the usb drive and make a proper enty in grub configuration of your existing Linux system in hard drive
Installation procedure is same as installing in hard deive. It's better to install in a USB 3 drive for better performance.