[nflug] Disk Image/Restore

Cyber Source peter at thecybersource.com
Tue Jul 25 11:21:25 EDT 2006


joshj at linuxmail.org wrote:
> When we last left our adventurers...
>
>> joshj at linuxmail.org wrote:
>>> When we last left our adventurers...
>>>
>>> > Heres a dumb question, does the drive that i am copying the image to
>>> > (using dd) have to be formatted? Im going to guess it doesnt but I
>>> > just want to make sure.
>>>
>>> Nope. "dd" copies from the drive byte-for-byte. So filesystem and 
>>> all is
>>> copied. It will even copy the MBR. A coworker of mine used it to copy
>>> winxp from drive to drive. It booted without incident.
>>>
>>> You can use dd to backup the MBR and then replace it before doing
>>> something
>>> risky (aka: reinstall windows):
>>>
>>> dd if=/dev/hda of=mbr.img bs=512 count=1
>
> <snip>
>
>> Only if you were doing an entire drive would it copy the mbr. If the
>
> My bad. I thought he was copying the whole drive.
>
>> partition being copied was on the 2nd, 3rd partition persay, the mbr 
>> would not be copied. The "fdisk /mbr" command simply blanks the mbr 
>> anyway. It is a safe thing to do just to be sure. If this is a brand 
>> new drive, never having anything installed on it, it is probably not 
>> needed. 98 does not need anything on the mbr to boot.
>
> Win98 must have some kind of "boot loader" (or equivilant) on the 
> first 512 of the HD otherwise there would be nothing to pass control 
> to the
> kernel, right?
>
> -Josh
>
>
>
>> _______________________________________________
>> nflug mailing list
>> nflug at nflug.org
>> http://www.nflug.org/mailman/listinfo/nflug
>>
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
>
No, again this is done in the partitioning. As long as the partition is 
made bootable (in fdisk on Linux, type a, then partition number). You 
will see an asterisk next to the partition number. You can put boot 
instructions anywhere, like install grub to a partition rather than the 
mbr, etc.. As long as your BIOS is set to hit the drive, then it sees 
the bootable partition, 98 takes over from there. Actually so does xp, 
etc.. I know this because we reuse drives all the time with different 
things on mbr's, etc.. If we say, put xp on a drive that previously had 
grub on the mbr, we could ghost, dd, tar the xp copy onto the drive and 
then it would fail to boot UNTIL we blank the mbr. You can do this in xp 
by booting with the cd and I think it's fixmbr from the rescue console 
(providing xp had an administrative password or you know it, plenty of 
hack tools out there to provide this and you actually NEED an 
administrative password for the administrator account to get to the 
rescue console). Then after you can install grub on the mbr and within 
grub's xp stanza, it nicely hands off to xp as though it's the only 
thing there (chainloader +1) and if it's on another drive, xp needs to 
be the first so you use the mapping in grub's stanzas "map (hd0) (hd1)" 
"map (hd1) (hd0)" because you know windows has to be the first and only 
drive on a box right? ;)
_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list