[CentOS] how to install centos on the attached external usb hard disk?

Sun Jul 25 16:37:13 UTC 2010
Les Mikesell <lesmikesell at gmail.com>

hadi motamedi wrote:
> 
  > I tried to do it as the following :
> #dd if=/dev/hda of=/dev/sda
> But it was not successful. The primary disk is 150GB and the external 
> usb disk is 20GB. As I check with the 'df -m' , with respect to the used 
> space , the 20GB capacity seems to be sufficient. Can you please let me 
> know how to modify my command to have the os installed on the primary 
> disk to be cloned to the external usb disk ?

You can't do an image clone to a smaller target.  If you need to do this, get a 
matching or larger target drive.  Or, install from scratch on the USB device and 
  then copy over any files you need from the source drive.

If you want to do much disk cloning, look at the bootable clonezilla-live CD. 
It makes it simple and knows enough about most filesystems to only copy the used 
blocks, but it still can't move a large source to a smaller disk - although it 
could put a compressed image there that could be used as a source to restore the 
larger drive.  If you are just looking for a full backup and don't expect to run 
from the USB, that might work for you.

-- 
   Les Mikesell
    lesmikesell at gmail.com