This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: impossible to restore MBR using dd

Matthias Bertschy wrote:

>     dd if=boot.MBR of=/dev/sda bs=446 count=1
> -->    dd: writing '/dev/sda': No space left on device

This is the proper form of the command, as far as I know.  I don't know
why it's giving you the error, but I suspect that reading and writing
the raw disk is not something that's thoroughly tested.

> I decided to try the following:
>     mount -s -b -f //./physicaldrive0 /dev/hd00
>     dd if=boot.MBR of=/dev/hd00 bs=446 count=1

Check the Users Guide.  You cannot use mount to do any sort of device
mapping.  The message you're referring to is more than 4 years old.  I'm
afraid that things do change over time.

> I even tried directly:
>     dd if=boot.MBR of=//./physicaldrive0 bs=446 count=1
> -->   dd: opening '//./physicaldrive0': Invalid argument

dd is a posix program, and expects posix paths.  You will almost never
get what you want by trying to feed a NT style path to it.  /dev/sda is
what you want.

>     QUESTION1: Does anyone know how to write into MBR from Windows XP
> using Cygwin's dd ?

Can you successfully read the first sector from /dev/sda at least?

>     QUESTION2: I am doing somathing wrong since dd sees
> //./physicaldrive0 as a directory ?

It's not surprising that it does weird stuff.  See above about not using
NT paths with posix programs.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]