LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-07-2013, 10:16 AM   #1
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Rep: Reputation: 0
Backup using DD


I made a backup of /dev/sda <- Is a IDE hard disk.
I did:
dd if=/dev/sda of=/media/external/sda-backup.img

Then
I restored the backup image to a new CPU Server. This server have a SATA disk.
So, I did this:
dd if=/media/external/sda-backup.img of=/dev/sdc

But it doesn't boot.
It says something like it can't find root device /dev/VolGroup00/LogVol00

...
...etc,etc
..
Booting has failed.




Why?

Last edited by manuel19; 06-07-2013 at 12:53 PM.
 
Old 06-07-2013, 03:34 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Was sda mounted when you did the "backup"? Did you do sync first? The size of /dev/sda and the file should be the same (+/- one disk cluster).

Code:
parted /dev/sda unit kB print |grep '^Disk'
ls -lk /media/external/sda-backup.img
 
Old 06-08-2013, 12:08 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Things that come to my mind.

Grub configuration.
Location or /boot
fstab
kernel support for devices
LVM issue

Not sure what is the most easy path but telling us more about this original system's OS would help.
 
Old 06-08-2013, 12:59 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
probably because it doesn't exist, the new machine might label it something else
what i would do is boot from a live rescue cd that gives you a root shell
Code:
# mkdir /rescue
# mount /dev/sd{x}{y} /rescue
# for dir in {proc,sys,dev}
> do
> mount --bind /$dir /rescue/$dir
> done
# chroot /rescue
where {x} is the letter such as /dev/sdA or /dev/sdB
and {y} is the partition number such as /dev/sda1 or /dev/sda2

you can see what the active OS thinks your drives and partitions are with
Code:
# fdisk -l
this will create a chroot environment in which your installed os on the hard drive is 'in charge' so to speak, from which you can make the necessary fixes to your grub configuration, and re-install grub

when you are done, reboot and you should be good to go.

Last edited by frieza; 06-08-2013 at 01:01 PM.
 
Old 06-10-2013, 07:39 AM   #5
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Original Poster
Rep: Reputation: 0
Thanks for your replies!

I fix the issue.
The problem was in the initrd drivers. Once you change your hard disk to another motherboard, the initrd most be rebuild. Then it will work.
Thanks.
 
Old 06-10-2013, 07:44 AM   #6
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Original Poster
Rep: Reputation: 0
Not I have another question.

When you make a backup using DD to a 10GB Disk, then restore that image to another disk with 100GB, it keep showing the disk is 10GB.

I mean, when you restore a DD image, when you restore the image to another disk, it keep showing the size of the source.

How can I restore the image and then, show the real size in the destionation disk?

Last edited by manuel19; 06-10-2013 at 07:51 AM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Rsync Backup for Windows, Linux Knoppix, and Other Smart Technologies in Handy Backup by Novos LXer Syndicated Linux News 0 12-24-2011 11:43 AM
how can backup a remote server(only folder needed) with ftp ,daily backup? ahjafari Linux - Newbie 1 10-26-2011 04:04 PM
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 08:52 AM
LXer: Automatic backup for sporadically connected clients with Box Backup LXer Syndicated Linux News 0 08-29-2008 08:40 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:22 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