Page 1 of 1

Help with disklabel

Posted: Wed Feb 13, 2013 12:32 am
by Muzer

I installed the image from a while back[1] onto my Pi's USB stick and am now trying to get it integrated into my custom partitioning setup on my SD card.

However, whenever I try to partition my SD card, *WHATEVER* I try to make those partitions, it ALWAYS gives me some sort of error if not when writing to the card, then when reading back from it. For example, look at the following output (transcribed by hand, there may be typos):

3 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 3000000 20756480 4.2BSD 0 0 0 # (Cyl. 5147*- 5891*)
b: 852288 23756480 swap # (Cyl. 5891*- 6103*)
c: 30367744 0 unused 0 0 # (Cyl. 0 - 7531*)
Label disk [n]?y
writedisklabel: Invalid partition format
disklabel: ioctl DIOCWDINFO: Operation not permitted
Label not written

I've tried clearing the label (which appears to be stored in the 512-byte sector after the MBR...) to null bytes using dd, I've tried using various edit modes of disklabel, nothing I've tried works.

What am I doing wrong?


Re: Help with disklabel

Posted: Sat Mar 09, 2013 10:29 am
by skrll
We found a small bug, that is now fixed in latest NetBSD, but I think your real problem is the permissions problem. Are you superuser?


Re: Help with disklabel

Posted: Sat Mar 09, 2013 10:36 am
by skrll
A bit more detail here. You seem to have an old RISCOS FILECORE boot sector as you're triggering ... corn.c#366

Try writing zeros to sector 6 so the old filecore sector is ignored. ... corn.c#332