Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 , 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/