On Mon, Mar 07, 2011 at 02:03:15PM +0100, Loïc Minier wrote:
On Mon, Mar 07, 2011, Shawn Guo wrote:
proc umounted /dev/sdb: No medium found
sfdisk: cannot open /dev/sdb read-write
Hmm that's really bad; the only thing that I can think of is that your device goes away for some time after the empty partition table is created, and so the sfdisk call comes too soon; could you try this on your MMC: parted -s /dev/sdN mklabel msdos && sfdisk -L /dev/sdN
$ sudo parted -s /dev/sdb mklabel msdos && sfdisk -L /dev/sdb /dev/sdb: Permission denied
sfdisk: cannot open /dev/sdb read-write
if sfdisk fails when called immediately after parted, it probably means we have to poll for readyness of /dev/sdN before calling sfdisk.