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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-02-2010, 05:26 PM
|
#1
|
|
LQ Newbie
Registered: Mar 2010
Posts: 4
Rep:
|
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...
|
|
|
|
03-02-2010, 07:28 PM
|
#2
|
|
Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,817
|
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?
|
|
|
|
03-03-2010, 10:13 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2010
Posts: 4
Original Poster
Rep:
|
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...
|
|
|
|
03-03-2010, 06:53 PM
|
#4
|
|
Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,817
|
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.
|
|
|
|
03-04-2010, 12:58 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2010
Posts: 4
Original Poster
Rep:
|
Thank you all for your answers, I will start experimenting immediately....
|
|
|
|
03-05-2010, 06:33 PM
|
#6
|
|
Senior Member
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,648
Rep: 
|
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/
|
|
|
|
03-06-2010, 01:50 PM
|
#7
|
|
LQ Newbie
Registered: Mar 2010
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
|
03-06-2010, 02:31 PM
|
#8
|
|
Member
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 545
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:31 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|