Mail Archives: cygwin/2011/01/12/05:08:35
On Jan 11 15:55, Corinna Vinschen wrote:
> On Jan 11 15:51, Corinna Vinschen wrote:
> > On Jan 10 10:40, tomas AT datasupporten DOT se wrote:
> > > Hello.
> > > I'm trying to write a disk image to a compact flash card with dd, but I
> > > get the error:
> > > "dd: writing to /dev/sdj: Permission denied"
> > >
> > > Apart from the CF-card, I also tried a USB-stick with the same results.
> > > I'm logged in as administrator.
> >
> > Please have a look into http://support.microsoft.com/kb/942448 first.
> >
> > [...listening "De-Loused In The Comatorium" while waiting...]
> >
> > Finished reading? Ok.
> >
> > That's quite a serious restriction starting with Vista. If I destroy the
> > filesystem on one of my sd cards under Linux, I can then overwrite it
> > with dd under Cygwin. However, if that dd call created a valid
> > filesystem on the sd card, the next write fails again. For some reason
> > it does not help to unmount the filesystem on the drive via the "Disk
> > Management" MMC snap-in, despite the claim in the aforementioned
> > article.
> >
> > The solution I just checked in to Cygwin is rather complicated, but
> > I really tested this a couple of hours now, and I didn't find any
> > other solution.
>
> I forgot the disclaimer:
>
> Please test the next developer snapshot from http://cygwin.com/snapshots/
Update: I checked in a revised version of the patch.
The code from yesterday tried to lock all partitions at open() time at
once, which is hardly minimal-invasive. It would even try to lock all
partitions if you just overwrite the boot sector.
With the new code, a partition lock is only triggered on-demand. As
soon as a write() call fails with "Access denied", it searches the
partition table for a partition which overlaps with the current write
position and then tries to lock only that partition.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -