Moving Ubuntu to a new hard drive

Russell Cook bike_oz at yahoo.com.au
Fri Dec 23 21:03:50 UTC 2005


Thanks Mike I wasn't sure if Rsync was the best tool.  A sudo Nautilus
works fine for the home partition, but with all the links and special
files a commandline tool is definitely need for /. I'll give it a burl.

Regards Russell

On Thu, 2005-12-22 at 22:21 -0800, Mike Bird wrote: 

> On Thu, 2005-12-22 at 21:55, Russell Cook wrote:
> > What I want to know is if there's a simple technique to move the root
> > and boot partitions to the new drive? I'm, happy enough to edit the
> > grub installation, but I'm not sure what's involved in maintaining
> > permissions when copying etc, dev, proc, sbin and other important and
> > special folders. Is there a tool or technique for this? 
> 
> With the new root mounted at /newroot,you can use
> "cp -vax / /newroot".  Mount the new boot at /newroot/boot
> and "cp -vax /boot /newroot/".  You may wonder why there's
> no boot on the end of that last command.  You can experiment
> on some small folders in /tmp if you want to figure it out.
> 
> The "-x" (or the "x" in "-vax") ensures that it only copies one
> filesystem at a time.
> 
> Or a cpio pipeline is kind of traditional.
> 
> However, I personally prefer using rsync.  I can use "-n" to
> see what it's going to do before I let it loose:
> "rsync -n -vax -H --delete / /newroot/".  When it looks
> like its going to do the right thing just run it again without
> the "-n".  Then "rsync -n -vaz -H --delete /boot/ /newroot/boot/".
> 
> You also need to get Grub or LILO working on the new drives.
> There's lots of different techniques.  If the system is not
> three thousand miles away just boot the CD in recovery mode,
> let it find your new root, chroot into it, mount your /boot
> in the jail if it's not already there, then run Grub or LILO.
> 
> --Mike Bird
> 
> 

Kind Regards Russell
==================
www.windsorcycles.com.au
sales at windsorcycles.com.au
ph. 02 4577 3209
bikes.no-ip.info
Linux user #369094
================== 




Kind Regards Russell
==================
www.windsorcycles.com.au
sales at windsorcycles.com.au
ph. 02 4577 3209
bikes.no-ip.info
Linux user #369094
================== 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20051224/de42889f/attachment.html>


More information about the ubuntu-users mailing list