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


> Hello,
> 
> Cygwin version: 1.5.12

Can't you upgrade?  coreutils-5.3.0-5 is out, and requires a newer version of cygwin.  Perhaps with the latest versions you may pick up a bug fix along the way that helps solve your problem.  Also, see http://cygwin.com/problems.html to give us more information so we can help you better.

> For safety reasons, I would like to restore only the first 446 bytes of 
> the MBR to keep the existing partition table.
> 
> The command line to use would normally be:
>     dd if=boot.MBR of=/dev/sda bs=446 count=1
> -->    dd: writing '/dev/sda': No space left on device
>           1+0 records out
>           0+0 records in
> (I also tried with bs=512 and I get the same output)

Hmm - writing just 446 bytes to raw devices is not very safe.  /dev/sda is a block-special device for a reason, and writing anything more or less than a full block at a time on a block-special device is not guaranteed to work.  Maybe that is your problem?  Also, according to `stat /dev/sda', the IO block size of an NTFS raw device is 1024, so even bs=512 may be equally dangerous.


> PS: If I do only:
>     dd if=//./physicaldrive0
> --> dd is wrinting things on the command line.
> 

That's to be expected.  The of= flag is necessary to tell dd to put the output in the named (device) file, rather than on stdout.

--
Eric Blake
cygwin coreutils maintainer



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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