[uClinux-dev] Re: Not getting a good CF-image with Snapgear-3.3...

Evert evert at poboxes.info
Mon Apr 3 11:39:28 UTC 2006



David McCullough wrote:
> Jivin Evert lays it down ...
>> Hi all!
>> David McCullough wrote:
>>> Jivin Evert lays it down ...
>>>> Hi all!
>>>>
>>>> I'm trying to build a usable Snapgear install, but am running into 
>>>> problems at the end when the CF-image is being assembled. Looks like the 
>>>> mbr generated is not complete/valid.
>>> This would be more appropriately posted on the uClinux-dev list.
>> Thanks for the tip. I will continue my quest there!  :-)
>>
>>>> Here's some output:
>>>>
>>>>> dd if=/dev/zero of=mbr.img bs=512 count=1
>>>>> 1+0 records in
>>>>> 1+0 records out
>>>>> echo -e "1,121343,L,*\n,,61,-" | sfdisk -uS -C 490 -H 8 -S 32 mbr.img
>>>>> Warning: mbr.img is not a block device
>>>>> Disk mbr.img: cannot get geometry
>>>>>
>>>>> Disk mbr.img: 490 cylinders, 8 heads, 32 sectors/track
>>>>>
>>>>> sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
>>>>> mbr.img: unrecognized partition table type
>>>>> Old situation:
>>>>> No partitions found
>>>>> New situation:
>>>>> Units = sectors of 512 bytes, counting from 0
>>>>>
>>>>>  Device Boot    Start       End   #sectors  Id  System
>>>>> mbr.img1   *         1    121343     121343  83  Linux
>>>>> mbr.img2        121344    125439       4096  61  SpeedStor
>>>>> mbr.img3             0         -          0   0  Empty
>>>>> mbr.img4             0         -          0   0  Empty
>>>>>
>>>>> sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
>>> This is the problem I guess,  everything else looks about right.  Why I
>>> don't understand is that the error is complaining that it got what
>>> it wanted :-)
>>>
>>> What version of sfdisk do you have installed ?  Can you try a different
>>> version ?
>> I use the following version:
>> sfdisk version 3.08 (aeb at cwi.nl, 040824) from util-linux-2.12r
> 
> Thats the same version I have on my system.
> 
> Are you running a 64bit OS by any chance ?

Nope. Regular 32-bit system on a P4 processor.


>> This is the one that comes with Gentoo Linux (stable). Are there any known 
>> problems with this version? If so, which newer (or older?) version should I 
>> go for instead?
> 
> Try running the commands by hand,  try strace on them and see what is being
> returned.

Which would be the exact command that generates the error?
Is it:
echo -e "1,`expr $(CYLS) \\* $(HEADS) \\* $(SECTORS) - $(CONFIG) - 1`,L,*\n,,61,-" | sfdisk -uS -C $(CYLS) -H $(HEADS) -S $(SECTORS) mbr.img


> Could be a problem with the fdisk source and the way it implements
> llseek.  You could use the source from uClinux-dist/user/fdisk to 
> see if you find why it is going bad.

Hmm... I can give that a try, but I'm not sure whether my debugging skills are sufficient enough for it...   :-/


Regards,
   Evert




More information about the uClibc mailing list