LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 03-02-2010, 05:26 PM   #1
linuxgr
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
Smile Help needed on using "dd" for backup


Hi all,

I am expecting a toshiba netbook in a few days that will not allow me to make recovery disks even if I use an external dvd-writer; it will only give me the option to create a usb drive, 8GB capacity(which I dont have).

I want to delete the hidden recovery partition and recover another way if I need to.

1) I believe if I just copy the files from the hidden partition and then copy them back on another partition or usb drive, it will not boot(am I right?)


2)I was thinking and I need your advice on this(will it work?):

Use dd to make a direct copy of the hidden recovery partition and save it to an .iso file on an external drive like this:

Code:
dd if=/dev/sda2 of=/media/externaldrive/backup.iso
Then if I need to recover, recreate a new partition on the disk (or dd the iso to a big enough USB drive partition) and

Code:
dd if=/media/externaldrive/backup.iso of=/dev/NEWsdax
and then boot to the usb drive or to the newly-created partition.



BTW: Toshiba lets you access the recovery partition by holding 0+pressing the power buttton. I'm guessing this will not work if I delete the hidden partition and then recreate it. Is there some way to fix this?


Thank you and sorry for the long post...
 
Old 03-02-2010, 07:28 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,850

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Well it seems like if you are going to go through the trouble of using dd to make an image and store it, you could just as easily image the partition that holds your OS and keep that for a backup. Then just dd that back to the drive if you ever need to restore the system.

Why make a drive image of a drive image when you can cut out the middle man?
 
Old 03-03-2010, 10:13 AM   #3
linuxgr
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Sure, but here's the problem: when I tried to install linux on another laptop, I resized the partitions with the liveCD and then windows would not boot unless you run chkdsk(stupid). And it does not even go to safe mode. Only option is to use a windows CD(which the netbook does not have) or use the recovery partition to run chkdsk. If I take an image of the actual partition I can not do that and I can not fit one say, 200GB backed up partition on a resized 40GB partition. This time I will try to make resizes through windows, but I need to make a backup first just to be sure nothing will go wrong...
 
Old 03-03-2010, 06:53 PM   #4
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,850

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
It sounds like you might be using the wrong tool for the job here, or at least, not the best. DD is best for full 1 to 1 drive images, but that doesn't seem like what you want to do.

You might want to look into Partimage, with is more like Norton Ghost in that it will only backup what is used in the partition, not the whole thing. So if you have a 200 GB partition with 5 GB used, Partimage will make a <5 GB (Partimage uses compression so the image will be smaller than actual used space), while DD will give you a 200 GB image.

Partimage will also check partitions for inconsistencies and handle them gracefully, which sounds like it would fix your chkdsk issue.
 
Old 03-04-2010, 12:58 PM   #5
linuxgr
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you all for your answers, I will start experimenting immediately....
 
Old 03-05-2010, 06:33 PM   #6
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,737

Rep: Reputation: 184Reputation: 184
Not sure if any of that will work. Who knows what windows does. Sometimes it looks for data at a particular spot and if the data isn't there you are done for. Such as copying a recovery partition, deleting it, then trying to use the backup it to restore. Bet you hose your windows installation.

Best bet, make a clone of the whole drive, or the entire windows installation. Bit for bit, so each bit restores to the original location where windows looks for it. Master boot record, mt spaces, swap file, recovery and all.

DD will do that.
Code:
dd if=/dev/hda of=myimage.iso
That will be an exact .iso of /dev/hda
http://www.linuxquestions.org/questi...ommand-362506/
 
Old 03-06-2010, 01:50 PM   #7
linuxgr
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
teckk, you're absolutely right, window$ always find their way to keep you buzy and frustrated....

Here's what I finally did: First of all, I used the Toshiba utility to create a backup on a borrowed 8GB usb drive(although it only needed about 6.4GB). For reasons I do not have the knowledge to understand, simply copying those files to a computer and back to the usb, or creating an iso of those files(tried both), the usb won't boot even if you flag it as bootable. Using DD however and moving the image back and forth seems to get the job done. Now I could freely do changes to the partitions without being afraid...

I could not take the whole disk image first because I simply do not have the space to store such a file and second because my purpose is to simply repair Windows if it breaks down. Re-copying the image would also delete my linux configuration and bring me back to 0. After all, the recovery image gives you the option to delete everything and then recreate the disk in its original state.

Finally, I used Easeus partition manager to resize and create partitions instead of gparted, this way Windows can now boot with no problems and I can move on to installing linux and grub.

Thanks all for your help and I hope this page will help somebody else with the same problem.
 
Old 03-06-2010, 02:31 PM   #8
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
linuxgr - do us all a favor and click on the 'thread tools' above your original post #1 and click on the solved option.

Thanks for posting your ultimate solution.

oops - realized when I posted this you had already marked as solved - thanks again

Last edited by minrich; 03-06-2010 at 02:33 PM.
 
  


Reply

Tags
dd, netbook, recovery, toshiba


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 06:58 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM


All times are GMT -5. The time now is 02:39 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration