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 Message-ID: <427792FB.87D459C6@dessent.net> Date: Tue, 03 May 2005 08:04:27 -0700 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: impossible to restore MBR using dd References: <42778C30 DOT 4000909 AT echotech DOT ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com 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. > http://sourceware.org/ml/cygwin/2001-01/msg00193.html > 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. Brian -- 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/