LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-18-2003, 05:02 PM   #1
csDraco_
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93

Rep: Reputation: 15
boot record backup "dd if=/dev/hda1 bs=512 count=1 of=myfile"


I'm trying to back up and restore win2k partition with linux, using dd for the boot record and tar -cvzf for the files.

"dd if=/dev/hda1 bs=512 count=1 of=myfile"
will this create a backup of my fat32 partition's boot record?
 
Old 04-18-2003, 11:40 PM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
Others may want to share their views as well on this. But for me I would consider using dd for the entire partition. Yes, I would think the command you presented would back up the boot table if hda1 is the Win partition. I am not sure about NTFS vs. FAT32 though. But I do not think it will have much value though if you use you tar for the backup and restore of the file system. My own experiences have shown that it will backup all files as desired, however, when they are restored they are not restored in the identical location and order. For NT and Win2K, I have always needed to run the system recovery CD and let it repair the system after the restore operation is complete. Then clean up anything else manually. I have not seen this problem with Win95/98 except dome minor issues regarding some directories. I would consider the use of tar here as an excellent data backup program for archival purposes. For a system backup though, I consider it only better than nothing at all.

So depending on what you are looking to achieve as to whether it will be suitable for the task. For instance, my notebook has a 30 GB hard disk and I have 4 operating systems installed. It took many, many hours to configure and test it. For my data requirements I backup to a normal CDRW disk, easily, using the tar command. However, for disaster recovery I use a 40 GB external hard disk and the dd command on the entire hda drive to create a 30 GB file image of the entire hard disk. Process is done through the firewire port and it takes 30 minutes. I have had to restore the system twice using it and the process works great. Limitation is that the restore medium has to be identical to the original medium since it is a sector by sector backup. But for 4 different OS's using 3 different file systems it is the most practical.

Perhaps my own observations will be of some assistance to you.
 
Old 04-19-2003, 04:17 PM   #3
csDraco_
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93

Original Poster
Rep: Reputation: 15
Thanks for sharing your technique

I would rather backup the endire drive with dd just like you did, but I dont wont my image file to be in Gb(s) ... especialy if I only wont to store an image of a fresh install and just that one partition.

What I'm getting at here is this (when restoring a win2k partition with fat32), and using linux only:
- create a new fat32 partition, and format it - done
- restore all system files simply by untaring them - done
- recreate the boot record, so that this partition is bootable, without the use of win2k console command fixboot - how?

Here's the description of the M$ fixboot command "Fixboot writes a new boot sector that makes the drive bootable"

As a linux replacement command to "fixboot C:", I found "dd if=boot_sector_backup bs=512 count=1 of=/dev/hda1"

Will dd'ing that boot sector on a partition of the same size but on a different drive, or the same drive but a differnet physical location still work?
 
Old 04-19-2003, 06:06 PM   #4
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
You may not know until you try. The boot sector that is being written back, may contain sector info for the boot process. I suspect that the file will have been moved to a different location by using tar.

In any event, the worse case scenario would be to boot the WinXP/2K CD and allow it to fix the partition.

On some of the systems that I sell to my customers. When they have three or more identical workstations or servers, I use Linux and the tar command to create a recovery CD. The CD is bootable, and contains a single tarball of the installed system, complete with drivers and all provided software. Prep the hard disk, boot the CD, restore the tarball and reboot. If Win2K then the Win2K CD is required to fix whatever Microsoft does, then boot it. I stick with FAT32 for this purpose. NTFS is probably doable, but write support in Linux may not be as reliable as I require. I have not experienced any problems myself, only in consideration of the warnings from the authors of the code.

Good luck, I would be very interested in knowing how it turns out.
 
Old 04-20-2003, 01:10 PM   #5
csDraco_
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93

Original Poster
Rep: Reputation: 15
Sure, when I'll try this agin I'll post my findings in this thread
 
  


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
Utterly fascinating boot sector problem: "Differences: (offset:original/backup)" Bert Linux - Software 4 07-01-2013 05:29 PM
lilo says, "L 01 01 01" and fdisk says, "Unable to seek on /dev/hda1" clausawits Linux - General 3 12-31-2007 09:33 PM
Kernel panic under 2.6.7 "VFS cannot load /dev/hda1 fs" Nichole_knc Slackware 5 10-24-2004 05:38 PM
cupsd, many "modprobe: can't locate device /dev/usb.." at boot bit7 Linux - Software 1 01-16-2004 08:42 PM
dump + restore to backup linux ; "Couldn't find matching filesystem: LABEL=/" on boot markus1982 Linux - General 4 09-21-2002 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:51 AM.

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