Migrate Ubuntu to a bigger disk on a laptop
Rick Bragg
rbragg at gmnet.net
Sun Feb 22 04:04:21 UTC 2009
On Sat, 2009-02-21 at 16:34 -0500, Asif Iqbal wrote:
> Hi All
>
> I have ubuntu 8.10 running on my laptop. It is a 40gb disk. I want to
> upgrade it to 250gb drive.
>
> I am thinking of doing the migration like this
>
> 1. copy over my home dir to another machine on same subnet using tar/ssh
> 2. generate a list of all the pkgs and save it on a file on another machine
> 3. boot from a liveCD and wipe the disk clean
> 4. replace the 40g disk with new 250g disk
> 5. fresh install ubuntu 8.10
> 6. copy my home dir content back from remote machine
> 7. take the pkg list file from remote machine and pipe it through
> aptitude to install all the new pkgs
>
> Am I missing anything?
>
> Now what is the best way to do step 2 and step 7?
>
> Also what is the best method of wipe clean a hard drive in step 3?
>
> How do I make sure the rc scripts are setup same way? There are few
> apps where I ran
> the `sudo update-rc.d -f <appname> remove'. So the rc scripts are not
> at default state
>
> Thanks for your help
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
I have done the following before and it worked great. It seems like
allot, but for me this was the easiest way, and I knew everything that
happend.
* On your current laptop, as root, run something like the following to
back up your laptop to a remote machine:
tar -zcvpf - / --exclude-from /path/tar.exclude | ssh user at backuphost "( cat > /path/to/backup.tar.gz )"
*** In your tar.exclude file (above), put something like this:
/dev/*
/proc/*
/mnt/*/*
/sys/*
/var/tmp/ccache/*
After you run that, your entire system should be backed up. (keep your
old hard drive aside in case something goes wrong)
Then:
* replace the drive with the new one,
* boot up the laptop from a live CD,
* partition your new drive with cfdisk, make it bootable, and mount it
somewhere, don't forget to make a swap partition as well.
* copy the tar file back onto the new mounted drive with scp. Something
like:
scp user at backuphost//path/to/backup.tar.gz /mnt/newdrive/.
* untar it with:
cd /mnt/newdrive
tar zxvpf backup.tar.gz
reboot.
Assuming that you have just a root partition, and a swap partition,
things should go well, if you have a separate boot partition, make sure
to mount that in the right place before you untar the backup. If
everything works, you can remove the backup.tar.gz from your root
directory.
Thoughts?
Thanks!
rick
--
This message has been scanned for viruses and
dangerous content by Green Mountain Network, and is
believed to be clean.
More information about the ubuntu-users
mailing list