Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21st February 2008, 10:10 PM
stairway27 Offline
Registered User
 
Join Date: Feb 2008
Location: Minnesota, USA, Earth
Posts: 3
Restoring from tar with changed partitions

Thanks in advance for anything you might be able to contribute.

Short version: If I want to do a full restore from tar backups, but my partitions for root, boot, and swap change, what all do I need to edit, besides /etc/fstab and /boot/grub/grub.conf, to get everything working, including swap and hibernate?

Longer story:
I have a new Dell XPS M1330 that I've been working on configuring for about a week. Sparing the details of attempting to retain most of the Dell stuff, I decided to try backing up my satisfactory and stable Fedora 8 install before wiping the drive and starting over. Using System Rescue CD, I mounted my /, /boot, and /home partitions and create tar files from them.

In my new partition scheme, there is no /boot (I needed one more partition for other purposes, so I had to sacrifice this one.) So, basically, the whole partition scheme is changed. I figured I was clever enough to find all the details and get my system working as it was before. Um… I found I'm not that clever.

My new scheme is:

/dev/sda6 = /
/dev/sda7 = swap
/dev/sda8 = /home
(no boot)

I did a fresh install of Fedora 8 to these partitions. Then I rebooted into System Rescue CD, and..
* mounted /dev/sda8 as /f8 & restored the home.tar into - No issues here.
* mounted /dev/sda6 as /f8 & restored root.tar into it.
* backed up the new /boot to my usb drive
* restored boot.tar into /f8/boot. Files looked good
* modified /f8/boot/grub/grub.conf to look for images in /boot
* modified /etc/fstab: removed the entry for /boot, and figured the labels would work for all else

On my initial reboot, GRUB gave me a GEOM Error. So, I used System Rescue CD to mount and edit grub.conf again, replacing the labels for / with /dev/sda5. Rebooting yield more errors, so I replaced the labels in /etc/fstab with /dev entries. I also ran grub with the following sequence of commands:
# grub
grub> root (hd0,5)
grub> setup (hd0)
grub> quit

After this, I was able to boot, but noticed that swap didn’t work, because it was complaining about the volume label.

How do I change the configuration so swap will find the right partition? Is there anything else I need to edit besides fstab and grub.conf? And why the heck didn't the partition labels work for / and swap?

Thanks all,

</CR>
-----
Running Fedora 8 on Dell XPS M1330
Check the Blog, If You Dare

Last edited by stairway27; 21st February 2008 at 10:17 PM.
Reply With Quote
  #2  
Old 21st February 2008, 10:35 PM
clay247's Avatar
clay247 Offline
Registered User
 
Join Date: Oct 2007
Posts: 113
I think you messed up when you tar -xf root.tar over /

Does that work guys?

/sbin/fdisk -l

should tell you were swap is, and then edit /etc/fstab
__________________
FC7 x86_64 : AMD 64 X2 4000+ : GA-MA69G-S3H mobo using all integrated devices ATI integrated crossfire x1250 (fglrx from ATI/AMD) x86_64 yum channels, livna i386 packages for Firefox, plugins(video related, java)
Reply With Quote
  #3  
Old 21st February 2008, 10:41 PM
stairway27 Offline
Registered User
 
Join Date: Feb 2008
Location: Minnesota, USA, Earth
Posts: 3
Quote:
Originally Posted by clay247
I think you messed up when you tar -xf root.tar over /

Does that work guys?

/sbin/fdisk -l

should tell you were swap is, and then edit /etc/fstab
Everything restored from tar exactly the way I expected it to, including into /. How would this have "messed up"?

I did edit /etc/fstab with the new swap partition. One thing I'm concerned about is the hibernate configuration, since it uses swap, and my swap space is working, but I had to change fstab to use the raw device (/dev/sda7) instead of a label. Where's the config for hibernation stored?

Thank you!
__________________
-----
Running Fedora 8 on Dell XPS M1330
Check the Blog, If You Dare
Reply With Quote
  #4  
Old 21st February 2008, 10:45 PM
clay247's Avatar
clay247 Offline
Registered User
 
Join Date: Oct 2007
Posts: 113
When you made the tar of / did you exclude /dev /proc whatever, I have never done things this way, just wondering.
__________________
FC7 x86_64 : AMD 64 X2 4000+ : GA-MA69G-S3H mobo using all integrated devices ATI integrated crossfire x1250 (fglrx from ATI/AMD) x86_64 yum channels, livna i386 packages for Firefox, plugins(video related, java)
Reply With Quote
  #5  
Old 21st February 2008, 10:58 PM
stairway27 Offline
Registered User
 
Join Date: Feb 2008
Location: Minnesota, USA, Earth
Posts: 3
I booted from a LiveCD and did this:

# mount /dev/sda6 /mnt/ext
# cd /mnt/ext
# tar zcvf /mnt/usb/root.tar.gz *

I did not exclude /dev or /proc or anything else. Since the filesystem was "offline" (not being used as the actual root fs) I assumed the full backup would be ok. Not true? Interesting idea...
__________________
-----
Running Fedora 8 on Dell XPS M1330
Check the Blog, If You Dare
Reply With Quote
  #6  
Old 21st February 2008, 11:09 PM
dshaw256 Offline
Registered User
 
Join Date: Mar 2006
Location: Virginia
Age: 59
Posts: 246
I think you are ok, stairway27. I did the same thing a couple of months ago ... I had to replace a bad drive and I ended up changing my partitions on the new one. I had to change fstab, I had to use the raw device rather than the label, and I had to change the grub configuration.

I also had to change the "splashimage" line in grub.conf to point to the correct device to get the pretty pictures back.

Since you only had the one filesystem mounted, your backup is probably fine. In any case, I don't believe you can write to /proc, even if it was backed up somehow. But if you were to do it with everyhing mounted, you'd have to do something like:

tar cvpPzf /mnt/usb/root.tar.gz / --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt

...to get rid of the unwanted stuff.
__________________
Dave Shaw
Registered Linux user #412525
Dell Latitude D610 / FC13
dshaw256@centurylink.net

no problem is so bad that a moron with root can't make it much worse
Reply With Quote
  #7  
Old 22nd February 2008, 04:08 AM
GrapeShot Offline
Registered User
 
Join Date: Jul 2007
Location: Virginia
Posts: 252
If you want to get your labels back (such as BOOT for your / parttition), you will need to use the e2label command

e2label device [newlabel]
Reply With Quote
  #8  
Old 22nd February 2008, 03:50 PM
lmo Offline
Registered User
 
Join Date: Mar 2007
Posts: 1,047
The initrd does need to be fixed for all references to partitions that changed.

There is a way do do that without mkinitrd, using a technique similar to this post:
http://forums.fedoraforum.org/forum/...6&postcount=11

Or use mkinitrd.
Reply With Quote
Reply

Tags
changed, partitions, restoring, tar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Restoring MBR? 601210 Using Fedora 19 19th September 2008 05:38 AM
Converting primary partitions into logical partitions lpsavoie Using Fedora 2 16th September 2008 04:14 PM
Problem with partitions (they changed names!) joe.pelayo Using Fedora 24 19th February 2008 04:17 PM
Could not allocate partitions as primary partitions Plankton Installation and Live Media 9 9th May 2006 06:30 AM
restoring GRUB vazel Installation and Live Media 7 27th January 2006 09:56 PM


Current GMT-time: 14:17 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat