[Q] how to move to new drive?

simonn ulist at gs1.ubuntuforums.org
Mon Jun 26 02:22:55 UTC 2006


Ken N9VV Wrote: 
> Hi, is there an easy way to move Ubuntu from my old dual-boot 40GB 
> drive to a new 120GB drive?
> 

Yep, best to boot from a boot disk/cd...


Code:
--------------------
    
  cp -a [src] [dest]
  
--------------------


You may need to modify /etc/fstab and /boot/grub/menu.lst, and possibly
install grub on the new drive.

I always install grub to the MBR so it is as simple as doing:


Code:
--------------------
    
  $ sudo grub
  > root (hd?,?)
  > setup (hd?)
  
--------------------


Where ? is a drive or partition number. Grub drive numbering is sort of
like: 

(hd0) = hda
(hd0,0) = hda1
(hd0,1) = hda2
(hd1) = hdb
(hd2) = hdc 
etc etc

If you have mixed IDE, SATA and/or SCSI it can get a bit more
complicated as (hd0) will be whatever the bios picks up first (or what
you have told it to use) and this depends on your hardware. However,
when you do setup (hd?,?) in the grub shell above, if you get an error
about grub not being able to find files then you have chosen the wrong
partition.

In summary...

man fstab
man mount
man grub 

are your friends.


-- 
simonn




More information about the ubuntu-users mailing list