Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Dec 2003 16:13:00 -0600
From:      David Kelly <dkelly@HiWAAY.net>
To:        FreeBSD_Questions FreeBSD_Questions <freebsd-questions@freebsd.org>, Cybertime Hostmaster <hostmaster@cybertime.net>
Subject:   Re: IDE to CF issue
Message-ID:  <AC995A86-3339-11D8-9FAB-000393BB56F2@HiWAAY.net>
In-Reply-To: <004501c3c683$db107490$0fce75d8@cybertime.net>
References:  <004501c3c683$db107490$0fce75d8@cybertime.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Dec 19, 2003, at 5:00 PM, Cybertime Hostmaster wrote:

> I have been trying to get FreeBSD onto a CF, and had an assortment of
> issues.

[...]

> Anyone have an idea where to start?

Others have been slow to respond so I'll kick in altho its been 9 
months since I've done what you are attempting, and then it was 4.8 or 
4.7, not 5.1.

I wrote my CFs using a USB-to-CF adapter. That might make a difference. 
disklabel(8) has morphed into bsdlabel(8) with 5.x. The CF was then 
used as the primary storage device for running FreeBSD on a Soekris 
NET4501 SBC.

There are some CF memory cards which do not support multi block 
transfers. There is a way around this problem that I think you could 
find in the mail archives at http://www.soekris.com/. Also pretty sure 
you'll find more FreeBSD people using CF media there than here.

For starters I'd triple check to make sure /dev/ad2 is the correct 
device for your interface. Just because your friends use ad2 doesn't 
mean its right for you. IIRC ad8 is a likely candidate. Don't remember 
this was the name used in 4.x but in 5.x usbdevs(8) should list your CF 
card if its connected via USB. Also if using usb you need usbd(8) 
running.

Next, /dev/ad2c should be the "entire media surface" partition. Is my 
impression that if a BSD label is not on the media most device drivers 
fake a partition table. The scripts I wrote (which I don't have access 
to) for a former employer nuked the first 32k or 64k of a CF card with 
/dev/null then used disklabel to create new paying careful attention to 
make sure I changed both on-media and in-core labels. Most CF cards 
have a FAT filesystem and partition table on them to start with.

Brief experiments converting my script to work with bsdlabel(8) failed. 
Wasn't being paid to do 5.x so I didn't pursue it further.

Know you are saying that you have a filesystem image that you are 
trying to lay on a CF card. That works OK as long as all of your CF 
cards are identical and from the same batch. Two CF cards of same 
model, size, and "manufacturer" are not necessarily the same inside.

If you can create your own disk/bsd label on the media, then newfs(8) 
it, then you will be 90% done.

We were placing about 40MB of data on 256MB cards. I found it much 
faster to script disklabel(8) and newfs(8) then tar(1) or restore(8) 
our content than to block copy filesystem images. The first wrote 
little more than 40MB, the other had to write 256MB.


--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC995A86-3339-11D8-9FAB-000393BB56F2>