LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-06-2010, 12:07 PM   #16
jblythe
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0

unix1adm: Did you find a satisfactory solution to your problem. I am in a VERY similar situation. Some time ago (over a year ago), I screwed up an install and started looking into bare metal backup/restore solutions. I use DriveImage/Norton for my XP environments and was hoping to find something similar, quick, and easy to use. There is nothing better than having the piece of mind of being able to completely restore a fresh clean snapshot from an ideal image in a few minutes, rather than the hours of doing a reinstall + configure. Anyways, I tried Acronis, and saw mondorescue, and others. Spent many hours researching... until I kind of gave up. (My systems were working, and nothing was "jumping out" at me. There didn't seem to be an obvious solution out there.)

Now I have a problem. My hard drive is failing on a critical machine, and I would LOVE to be able to swap out a fresh drive and restore (rather than spend the hours and hours doing a complete reinstall, configure and incremental data restore).

Did you find an Acronis equivalent for linux? Did you try mondorescue? Did amanda work? Do you have any advice? Anyone else got any thoughts or suggestions?


PS: I am running openSUSE 11.0 on a Pentium 4 2.80 GHz, 2GB dram, with an IDE Maxtor 120GB 7200 RPM DiamondMax Plus. (I have extra similar hard drives.) The motherboard is an ECS model (I can get the precise model if needed.) There is no dual-boot nonsense, or funky virtual machine stuff. Just a straight, vanilla, no-nonsense, out-of-the-box, openSUSE three-partition install.
 
Old 01-06-2010, 09:50 PM   #17
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
clonezilla on a usb stick is pretty effective for backing up and restoring the whole disk. This may have been mentioned before.
 
Old 01-07-2010, 08:17 AM   #18
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
I am still looking into this. the system i am going to use has not come in yet. I was going to try a few programs and see which one works best then try a few restores / builds etc.

This is for my home environment so its as time allows.

I will certainly update this with what I find to be a good solution and anything I learn along the way when I make some progress. Holidays put this on the back burners for me but its a new year and time to get going again on it.
 
Old 01-07-2010, 09:19 AM   #19
jblythe
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
exvor: Thanks for the great advice! I don't think I can use a USB stick because of the nature of the motherboard/BIOS, but Clonezilla looks like the clear choice. I'll let you'all know if I run into troubles.

unix1adm: Looks like Clonezilla is the clear choice here. I posted a similar comment on another thread and got the same response. See here:
http://www.linuxquestions.org/questi...format-779902/

I'll be attempting to use Clonezilla to create and store the backup image on another network machine, and then restore to a fresh drive using the image on the other network machine. I have a Windows XP machine and Linux machine available, so I hope one of these will serve. It depends on the flexibility of Clonezilla, I guess.

I love the idea of using a USB stick drive, but certain limitations of the hardware/motherboard/BIOS may force my hand.

Anyway, if I have any significant problems or gotchas, I'll post my experiences here.

Cheers!
 
Old 01-07-2010, 08:10 PM   #20
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
You can run clonezilla from a cdrom or even from a partition. I think its too big for a floppy.
 
Old 01-11-2010, 02:41 PM   #21
jblythe
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
First the good news:

SUCCESS !!


I used Clonezilla v1.2.2-31 to save an image to a samba machine, turned off the hardware, swapped out the hard drive with the new one, powered up, and restored. After reboot, I was rocking openSUSE like the good old days (no more disk fail messages, which were plaguing the old drive). It was that easy. No learning curve with Clonezilla, I simply accepted the defaults, and everything went smooth as clockwork.


Now the bad/great news:

BEWARE !!


I ran into a major pain-in-the-butt problem when restoring. Bad news for me because I thrashed around all day Sunday attempting to resolve the issue without success. Great news for everyone else, because I resolved the issue this morning, and will explain the problem/solution to you all right now.

As you know, I am running openSUSE 11.0 on this old machine (which is critical to my operations here, tweaked to perfection, and chock full of good data). The Maxtor drive started experiencing a hard drive fail (the OS was warning me of bad sectors and imminent failure), so I need to move everything onto a new hard drive. I had a spare Western Digital device at the ready (identical in specifications, but a different make/model).

After the save/restore with Clonezilla, during boot, the boot process failed with an error to the effect:
Code:
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 cannot be found....
(I'm sorry, I do not remember the exact phrase). The boot process would offer a fallback option, but no choice taken would make any difference, and the boot failed. I tried the openSUSE install disk repair option, and thrashed around trying every possible option. That did not help at all. After a google search, I found this was a common problem when moving an openSUSE install to a new physical drive, but had a difficult time finding an explicit solution. The most useful resource was here:
http://forums.opensuse.org/install-b...hdd-names.html

Here is my solution

It seems that openSUSE is a little funky in the way in which it installs and configures the boot menu and fstab files, choosing to identify drives by a unique ID generated from the drive's information (through a combination of manufacturer name, model, and serial number), and this was causing my problem. All that gobbledygook (scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2) is referencing the old Maxtor drive, and was stopping me from installing on the new Western Digital drive. A different drive will have different ID info, even if the drive is same in every other respect. I even believe the same manufacturer and model would have a unique serial. Restoring to the exact same drive from which the image is made will work (naturally), no problem. Trying to restore to any other drive will fail. I don't know why the good people at openSUSE chose to identify drives this way, but this is the way it is.

The solution is simply this:

BEFORE you use Clonezilla to create an image, you must prepare the source system by removing explicit references to the hard drive. This can be done as follows:
  • Back up the system with Clonezilla (just in case you screw something up - there is never a problem restoring to the same exact hard drive). This will be for temporary purposes, and is not intended to be the final image.
  • Boot your old source system
  • Edit the menu.lst file:
    • Open a root shell, cd to //boot/grub/
    • kwrite (or the editor of your choice) menu.lst

If you're like me, you should see something like this:

Code:
# Modified by YaST2. Last modification on Wed Aug 26 13:18:00 PDT 2009
default 0
timeout 4
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 resume=/dev/sda1 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.25.20-0.5-pae

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.25.20-0.5-pae
Modify the disk references, so the file will read something like this:

Code:
# Modified by YaST2. Last modification on Wed Aug 26 13:18:00 PDT 2009
default 0
timeout 4
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/sda2 resume=/dev/sda1 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.25.20-0.5-pae

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/sda2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.25.20-0.5-pae
The key is replacing the root= references to /dev/sda2.
  • Save the edited menu.lst file.
  • Edit the fstab file:
    • cd //etc/
    • kwrite (or the editor of your choice) fstab

If you're like me the first three lines should read something like this:

Code:
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 /                    ext3       acl,user_xattr        1 1
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part3 /home                ext3       acl,user_xattr        1 2
Again, modify the disk references so these lines read something like this:

Code:
/dev/sda1 swap                 swap       defaults              0 0
/dev/sda2 /                    ext3       acl,user_xattr        1 1
/dev/sda3 /home                ext3       acl,user_xattr        1 2
  • Save the edited fstab file.
  • Check nothing catastrophic happened by rebooting your system. Everything should boot just like before. If not, you can always restore...

If everything works, NOW you are ready to create/migrate your disk image to a new hard drive. Run Clonezilla, save the disk image, power down, swap the hard drives over, restore to the new hard drive, and boot.

Again, this is no doubt an openSUSE only issue, so hopefully I have helped other souls with this little post.

Thanks, again! And a very Happy New Year to you all...
 
Old 01-11-2010, 06:10 PM   #22
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Reason you were having trouble is because the disk ID is different when you use different hardware. You could have resolved this issue by just using non hardware id for partitions,, which it looks like you found out . I never fully understood why alot of distros are doing it this way, I would assume its for the people who like to move there hardware around alot or something.

Last edited by exvor; 01-11-2010 at 06:11 PM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu 8.04 update: Happy to be back in a Linux environment (revised) LXer Syndicated Linux News 0 06-16-2009 04:51 PM
Connecting 2 linux computer back to back with cross cable. michalng Linux - Networking 8 02-11-2009 07:00 AM
LXer: Back up and restore your Firefox environment with FEBE LXer Syndicated Linux News 0 07-30-2007 09:18 AM
Going back to a dual-boot environment: can I do it without reformatting? The MJ Linux - Software 3 07-13-2006 01:58 AM
LXer: Dual booting Linux and AIX Linux in a clustering environment LXer Syndicated Linux News 0 05-16-2006 06:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration