Hello Alain,

>> how can I use the dd command from/within
>> freedos to save or restore thr MBR?
>>
>> How do I have to name the devices?
>>
>> Think it can't be like the linux/unix syntax:
>>
>> dd if=/dev/sda of=/def/fd0/mbr.dat bs=512 count=1

> fdisk does that, type: fdisk /?

it looks like, but if you type

fdisk /smbr (see Ref [1]) it saves the bootrecord of the partition,
_not_ the MBR.

the 64 bytes between 0x1BE and 0x1FE of my (NOT MB) bootrecord is:

000190  C3 0D 0A 4D 69 73 73 69 6E 67 20 4D 42 52 2D 68  â"oâTªâ-TMissing
MBR-h
0001A0  65 6C 70 65 72 2E 00 00 00 00 00 00 00 00 00 00  elper.
0001B0  00 00 00 00 00 00 00 00 B3 52 CB D2 00 00 00 00          â",Râ.¦â.¥
0001C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001D0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

As you can see, this is an empty partition table

And the bytes between 0x48 0x4C shows me the right partition label, which is
"SDA01"

000040  FF 00 29 73 F8 2C 4C 53 44 41 30 31 20 20 20 20    )s°,LSDA01
000050  20 20 46 41 54 33 32 20 20 20 00 00 00 00 00 00    FAT32

additional you can see it's FAT32 filesystem.

This is definitely the bootrecord of the partition, not the MBR of the disk.
because with that system there is only one fat parttion for freedos.

If yo look to the /? output, the help says

/SMBR [drive#]  Saves the current MBR on <drive#>, into a "boot.mbr" file.

and without a given drive, the current drive is used.

Perhpas the /dump swithc can do such a task, but it seems
to be designed only for debugging purposes.

Anyway: It would really a good thing, if a user can use the
dd command like in Linux/Unix systems, because it's commen
and more flexible than other mbr specialiced tools.

the only problem seems to be: "How to address the first sector 0
and/or the whole harddisk"
Snd additonal it would be good to save the following 63 sectors
too or any other PBR, etc.

T.

[1]
C:\>fdisk /?
[...]
MBR (Master Boot Record) modification:
  /MBR  [drive#]  Writes the standard MBR to <drive#>.
  /BMBR [drive#]     "    "  BOOTEASY MBR to <drive#>.
  /AMBR [drive#]     "    "  MBR stored in the "boot.mbr" file
  /SMBR [drive#]  Saves the current MBR on <drive#>, into a "boot.mbr" file.
  /RMBR [drive#]  Removes the MBR from <drive#>.
[...]
For obtaining information about the hard disk(s):
  /INFO [/TECH] Displays partition information from <drive#>
  /STATUS       Displays the current partition layout.
  /DUMP         Dumps partition information from all hard disks(for
debugging)


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to