Restore to new partition almost worked, but not quite...

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Restore to new partition almost worked, but not quite...

Postby locutus on Mon Mar 09, 2009 10:54 pm

I'm learning backup using CLI tar.gz (worked fine) and restoring (not so much).

I have root on sda1, /home at sda2. I backed up both, separately, to sda10. Then I tried restoring to sda11 & sda12. The operation seemed to go fine but when I booted into sda11, it used sda2 for /home instead of sda12. How do I link sda11 as root to sda12 for /home?

And separately, I thought Partimage was simply a front end to what could be done on CLI. But Partimage requires partitions to be unmounted to work whereas tar doesn't seem to care. What's the difference?
Resistance [to Linux] is futile.
Image
User avatar
locutus
Level 4
Level 4
 
Posts: 406
Joined: Mon Dec 04, 2006 4:54 pm
Location: Ontario, Canada

Linux Mint is funded by ads and donations.
 

Re: Restore to new partition almost worked, but not quite...

Postby garda on Mon Mar 09, 2009 11:43 pm

Let's start with this part:
I thought Partimage was simply a front end to what could be done on CLI. But Partimage requires partitions to be unmounted to work whereas tar doesn't seem to care. What's the difference?

No difference in practice, as far as I can tell. That is why prefer to backup and restore using the CLI instead.

As for booting up to the restored installation, you have to change the fstab and menu.lst on sda11 (the new root partition) accordingly. And that is another reason why I prefer using the CLI from the Live CD to restore backups.

This editing must be performed because the fstab still points to sda2 for use as home partition.
User avatar
garda
Level 5
Level 5
 
Posts: 744
Joined: Sat Aug 30, 2008 2:55 am
Location: /root

Re: Restore to new partition almost worked, but not quite...

Postby Fred on Mon Mar 09, 2009 11:57 pm

locutus wrote:
I'm learning backup using CLI tar.gz (worked fine) and restoring (not so much)... I have root on sda1, /home at sda2... How do I link sda11 as root to sda12 for /home?

Assuming you backed up correctly and restored correctly there are 2 additional things you would need to do to have a workable system again.

1.) Correct /boot/grub/menu.lst to reflect the new location of your root partition.

2.) Correct /etc/fstab to reflect the new location, (mount points), of your / and /home folder.

Hope this helps a bit.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Restore to new partition almost worked, but not quite...

Postby Fred on Mon Mar 09, 2009 11:58 pm

ooops, sorry garda, I didn't see your post before I responded. :-)

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Restore to new partition almost worked, but not quite...

Postby locutus on Tue Mar 10, 2009 12:06 am

Fred wrote:1.) Correct /boot/grub/menu.lst to reflect the new location of your root partition.

Did that already...
2.) Correct /etc/fstab to reflect the new location, (mount points), of your / and /home folder.

...and this one is easy enough; should've thought about that myself.

Thanks garda;
Thanks Fred.
Resistance [to Linux] is futile.
Image
User avatar
locutus
Level 4
Level 4
 
Posts: 406
Joined: Mon Dec 04, 2006 4:54 pm
Location: Ontario, Canada

Re: Restore to new partition almost worked, but not quite...

Postby Fred on Tue Mar 10, 2009 12:22 am

locutus,

One thing I didn't mention specifically is where the grub kernel looks for the stage 2 and menu.lst files.

You would need to use the commands:

sudo grub
root (hd0,10)
setup (hd0)
quit

to get the system to look in sda11 for the rest of the boot files. Otherwise the system won't boot without you helping it along.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA


Return to Newbie Questions

Who is online

Users browsing this forum: baldrick.777 and 22 guests