I'm about to do this but don't want to find out several months down
the line that it won't work. How do I make a copy of the Master Boot
Record?
Copying the MBR is easy.
dd if=/dev/hda bs=446 count=1 of=filename
Change it to bs=512 if you want to copy the MBR and the partition table.
Yes of course. Just use tar.
http://markhobley.yi.org/linux/howto/xpbackup.html
Mark.
--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/
Just DD it !
--
Best Regards:
Baron.
> Instead of forking out money to buy proprietary disk imaging tools to
> restore Windows every now and then (cue Windows jibe), would it work
> to just use Linux to copy a fresh Windows install out, to be copied
> back (rm -rf Windows partition, cp -r fresh install) when things break
> down or bloat up?
>
Use a tool called ntfsclone to backup individual Windows partitions which
are formatted ntfs. I described one common usage here:
http://groups.google.com/group/alt.os.linux.suse/msg/837b44f62c139745
>
> I'm about to do this but don't want to find out several months down the
> line that it won't work. How do I make a copy of the Master Boot Record?
>
You are correct to worry that the tools you select will work when you need
them. One way to take the guess work out of equation is to practice in
advance using them. Practice requires a system where mistakes will not
have drastic consequences (i.e. you must have good backups, etc.)
There's more to the problem than just copying the MBR; you probably want
the ability to restore a blank disk using backups and simple tools to
yield a bootable copy of the source disk. To do this you need backups
of all partitions and have the ability to setup the bootloader. There are
many ways to backup/restore. It doesn't lend itself to a "one size,
fits all" approach. Simple methods (say, dd) may suffice, but IME
understanding what you're doing pays dividends later on. It may take a
bit of research and reading to understand your options. I started by
reading the "Hard Disk Upgrade Mini-Howto." Here is a brief outline of the
approach and some background information.
First, the "job" of the MBR is two-fold:
1. It holds the primary partition tables, partitions 1-4.
2. It holds the bootloader code. I use the grub bootloader.
You need to know the rules for partition disks in the PC world. I
explained them here:
http://groups.google.com/group/comp.os.linux.misc/msg/d3544c061662cacf
There are tools which setup partitions, including fdisk and cfdisk. Setting
up the bootloader requires a little bit more understanding and practice,
but "practice makes perfect." As I said, I use the grub bootloader because
it is a very flexible bootloader. In dual boot situations with Windows, I
have found that the chainloader syntax works fine. This grub configuration
stanza works:
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1
BTW, IME, Windows likes to be installed on the first partition.
To summarize, you'll need to understand the following:
1. The rules for partitioning disks.
2. The tools that you'll be using to backup and restore partition data.
3. The syntax and nomenclature used by the bootloader.
--
Douglas Mayne
Others have covered the basic issues - I'd suggest you look at partimage,
too.
Doesn't make a disk image, and doesn't copy ACLs.
--
-eben QebWe...@vTerYizUonI.nOetP royalty.mine.nu:81
Answer: two spoonfuls in my cup, please.
Question: how much should I use? (why top-posting is bad)
http://www.fscked.co.uk/writing/top-posting-cuss.html
I will second partimage.
I have a colleague that is using partimage in conjunction with
ntfsresize / sfdisk / parted to completely automate the process of
deploying circa 100 computers a year. They also use it to back up
computers that are being worked on or other wise need to be preserved.
I will suggest that if possible you start with a clean (as in
defragmented) and happy (run chkdsk) NTFS file system before you run the
utilities if you can.
Grant. . . .
You can tar and restore, no problem, so a disk image is not required. But you
are right about Access Control Lists. Sorry, I thought this was a single user
home computer, so I just assumed that you were not using these.
I always restore onto FAT32, so the Access Control Lists are not
relevant to me. I don't know how reliable NTFS tools are, but people do
use them.
Have Microsoft published the NTFS specifications yet? I am sure that
they are supposed to be doing that following a lawsuit against them.
[Snip...]
> they are supposed to be doing that following a lawsuit against them
Right, your honor. After we first bleed FAT VLFN dry (watch linewrap):
http://blogs.computerworld.com/linux_companies_sign_microsoft
_patent_protection_pacts
Anybody STOOOPID enough to trust M$ with ANY of their data deserves the
fleecing they will most certainly receive.
Fool me once; shame on M$. Fool me twice; shame on me.
--
Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
Pardon any bogus email addresses (wookie) in place for spambots.
Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
I toss GoogleGroup posts from gitgo (http://improve-usenet.org).
Makes me wonder how long they'll keep farting around backing up MS until
they just give it up and run Linux.
> Instead of forking out money to buy proprietary disk imaging
> tools to restore Windows every now and then (cue Windows
> jibe), would it work to just use Linux to copy a fresh Windows
> install out, to be copied back (rm -rf Windows partition, cp
> -r fresh install) when things break down or bloat up?
That's pretty much what I do using ntfsclone.
http://en.wikipedia.org/wiki/Ntfsprogs
http://www.linux-ntfs.org/doku.php?id=ntfsprogs
> I'm about to do this but don't want to find out several months
> down the line that it won't work.
It works fine. I have saved _and_restored_ Windows systems
that way many times. I'd guess I've done between 50 and 100
restores during that past couple years when testing windows
installers for various things.
> How do I make a copy of the Master Boot Record?
dd
--
Grant