Hibernation woes -- follow up

Derek Broughton news at pointerstop.ca
Sun May 11 18:36:50 UTC 2008


Ted: Note that all of what follows is really only a good idea if you can't
get NoOp's idea of a swap _file_ to work.  I think that's probably the best
method.

Ted Hilts wrote:

> I have freed up one of 5 hard drives (approx. 250 GB) on the dual boot
> Ubuntu/XP system.
> 
> I did the following backup on Ubuntu:
> sudo -s -H;cd /;tar -cvzf /media/sdd1/backup-Fri02May2008.tgz
> --exclude=/proc --exclude=/lost+found
> --exclude=/media/sdd1/backup-Fri02May2008.tgz --exclude=/mnt
> --exclude=/media/cdrom --exclude=/media/cdrom0 --exclude=/media/floppy
> --exclude=/media/floppy0 --exclude=/media/sda1 --exclude=/media/sda2
> --exclude=/media/sdb1 --exclude=/media/sdc1 --exclude=/media/sdd1
> --exclude=/media/sde1 --exclude=/media/sdf1 --exclude=/media/sdg1
> --exclude=/media --exclude=/Mted-cic2ext --exclude=/Mted-CICERO
> --exclude=/Mted-CICERO-D --exclude=/Mted-CICERO-F --exclude=/Mted-market
> --exclude=/Mted-molly --exclude=/sys /
> 
> One of my questions -- given the above backup -- is: Can I use this
> empty hard drive to install my present Ubuntu using the backup?

I guess - at least you don't seem to have excluded anything you
shouldn't :-)

> So the hard drive I would prepare would be: /media/sdc1
> 
> Another question: Would there be a boot problem because using this hard
> drive as I understand (from away back in time) the boot system and the
> active hard drive would be on SDA (or from the perspective of XP, the C
> drive.) I am not sure how grub would handle this situation (3 instead of
> 2 boot systems with one on a currently "none active" hard drive.
> 
There'd be some concerns.  Grub doesn't care about the concept of "active"
drives, so you should just be able to add an option to
your /boot/grub/menu.lst to boot to (hd2,0).  You essentially copy the boot
stanza for the current partition, and change all references for (hd0,2)
(that is, /dev/sda3) to (hd2,0) (which is /dev/sdc1).  Do this _before_
copying all the files, because eventually you'll want to run grub-install
off the new partition, to get the new menu.lst file.

> Here is my /etc/fstab:
> ted at Ubuntu:~$ cat /etc/fstab
> 
> Also, if I can use this tar backup on /media/sdc1 what would be the
> command lines to prepare Ubuntu on /media/sdc1???????????

Just change the /boot/grub/menu.lst as described above, copy the files (you
don't _have_ to use the tar method - you could copy them directly), then
try to boot to the new partition.  If it works, then run "sudo
grub-install /dev/sda" from the new partition (this will make sure that
when you later delete the old partition, you won't lose the ability to
boot, because it's looking for the menu.lst file on that partition).
-- 
derek





More information about the ubuntu-users mailing list