delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/03/11:55:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: ericblake AT comcast DOT net (Eric Blake)
To: Matthias Bertschy <matthias AT echotech DOT ch>, cygwin AT cygwin DOT com
Subject: Re: impossible to restore MBR using dd
Date: Tue, 03 May 2005 15:54:41 +0000
Message-Id: <050320051554.17789.42779EC1000829600000457D22007358340A050E040D0C079D0A@comcast.net>
X-Authenticated-Sender: ZXJpY2JsYWtlQGNvbWNhc3QubmV0

> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019