Assistance in setting up CF card


Forum: HD Install
Topic: Assistance in setting up CF card
started by: colinbes

Posted by colinbes on May 22 2004,22:37
I am looking for some assistance in setting up DSL on CF.

My problem is firstly that I know just enough to be dangerous and little else, secondly my development environment is different to target device.

I am needing to set up a CF which will run as secondary master on secondary ide on an embedded pc running at 300MHz and with 128MB Ram (pretty neat).

On my development machine (A normal desktop PC) I am using a usb CF card reader and am booting off the live dsl cd - the system sees the CF card as /dev/sda

I first tried to just do a hd install (seeing as CF is meant to emulate hd on ide) but errors were pretty numerous (and didn't spend too much time).

Unfortunately it appears that frugal script only works with primary master so I can't go this route (my embedded pc only has one ide and I am unable to hook up a CD to it as well as CF - and in any case CF would be secondary master.

I then tried to setup the CF card as a USB thumbdrive but also didn't have much success. Seems to be quite a bit of traffic on this subject and maybe I just need to keep hacking away.

Is there anyone that has been through this process and is able/willing to assist.

Much appreciated!

Posted by Onyx^ on May 28 2004,13:23
*topic bump*This is _exactly_ the setup I am trying to get to work... did you have any success?
Posted by cbagger01 on May 28 2004,21:12
This is what I would do:

Keep your CF card formatted with the default (should be MSDOS FAT filesystem).

Manually copy the \KNOPPIX folder from your CDROM over to your CF drive while running MSWindows or other OS on your other computer.

Follow the FAQ instructions for creating a boot floppy disk.

Insert the CF device and boot floppy into your embedded computer.

It should find the CF device's KNOPPIX filesystem and treat it like a solid state CDROM drive.

Good Luck.

Posted by colinbes on May 30 2004,14:44
In my setup I needed to create seperate partitions on the CF card. While I was at it I created a backup restore directory as well.

One of my problems was that I couldn't format my first partition to DOS format - I didn't look to deep and assumed that this is not on distro (I only had 2 days to get demo together and ship to client) so I formatted all partitions to ext2.

In our application, we only have CF card so everything had to be self contained and booting into ramdisk suited us just fine.

I found that by modifying frugal-install I was able to get this modified script to create the image on CF card along with backup/restore and extensions directory.

So far so good.

Posted by cbagger01 on May 31 2004,01:08
EXT2 filesystem should also work.

Sometimes these flash devices do not like it when they are formatted in a manner that is not suggested by the manufacturer.

Since most CF cards come formatted in FAT, I would stick to FAT for my first attempt.  However, EXT2 should also work.

Posted by Onyx^ on May 31 2004,12:29
Thanks for the responses all ...

cbagger01: I do not have a floppy to boot from in my target system. However I can boot from the CF slot (on primary slave). Therefore can I copy the KNOPPIX folder across then extract the boot floppy image to the compact flash as well and have it boot straight from the CF?

colinbes: you must be doing a very similar project to me :) I have four days to get a demo together...

Quote
Unfortunately it appears that frugal script only works with primary master so I can't go this route (my embedded pc only has one ide and I am unable to hook up a CD to it as well as CF - and in any case CF would be secondary master


Was your modification of the frugal script you mentioned the solution to this problem ?

My CF card is formatted to EXT2 with no (apparent) problem.

I will let you know how I get on...

Posted by colinbes on May 31 2004,14:18
Onyx, modification of the frugal script worked for me. Maybe due to lack of knowledge I was braver than I should have been, but looking at the script I couldn't see why it shouldn't work with necessary tweaking - To make the script for all combinations - well that would be another story. I don't have my script with me (else I would pass it on).

In my setup, I booted livecd from my desktop with a usb-cf reader. I changed frugal script to allow reference to sda as opposed to hda.

Then further down the script where is sets up lilo etc. I changed the two refences to original hda and hda1 to hdc and hdc1 (as my CF card is seen as secondary master on Embedded system. If this is not done, the system will be configured to expect sda and sda1. Not to specific I know, but hope it helps.

cbagger01, I have formatted several different manufacturers cards with ext2 and so far okay, but of course this is no gaurantee. Personally I would prefer to have kept dos partition as it makes it easier for work in the field (I have never gotten linux to work on my tablet pc - DSL neither). But as mentioned, it didn't appear that vfat was avail on live cd (I need to look again). One problem I have picked up is that one of my embedded pc's won't recognize the ext2 formatted CF cards.

Posted by Onyx^ on May 31 2004,14:30
Colinbes, that's fine, I get the gist thanks for the help.

Having never seen frugal script, does work using a similar method to this....?

< Knoppix Compact Flash guide >

the problem I have is in running lilo with the lilo.conf that I have edited so that it looks for hdb (primary slave, the drive where my CF card is on my *target* embedded system).

Posted by TyphoonMentat on May 31 2004,19:57
Yes, the frugal script is based upon that document.
Posted by Onyx^ on June 01 2004,12:05
There is also this useful post at the feather linux forums which is a perl version of the script. I have had some luck getting my flash card to boot now.

< Perl Poor Man's Install Script >

Colinbes, if you have it handy it would be useful to see the lilo.conf that was created by your edited frugal_instal script... ?

Posted by roberts on June 01 2004,17:54
If you search the fourms the answer was posted. < http://damnsmalllinux.org/cgi-bin....nd+lilo >

If you look at the frugal script you will see the all the parts that I added, including embedding lilo.  It is the lilo that is holding you up. As user Fred has posted in above link he manually applied a different lilo.conf.

I see the perl script also copied over the bugs from the orginal frugal.

Posted by Onyx^ on June 02 2004,14:41
I had already seen that post roberts.
Anyway, I have it booting from Compact Flash card fine now.

The CF card i am using (viking 128mb) is b0rked as it does not correctly allow DMA access to it on an IDE channel (i think sandisk / toshiba cards _can_ do this). DSL / Feather / ... see's the CF card on an IDE slot and automatically thinks it is a DMA enabled channel. Trying to read /write info off therefore causes errors  :angry:

Ah well, time to order some new CF cards then I guess.... :)

Posted by TyphoonMentat on June 02 2004,16:35
Couldn't you boot with "knoppix nodma"?
Posted by Onyx^ on June 03 2004,14:39
I tried sending ide=nodma to the kernel but it still detected as dma enabled no matter what i did.

I have ended up ripping out the Feather / DSL libraries and bins and placing them with peeweelinux scripts and installer etc to find quite a nice solution to most of my probs.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.