Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Building a Compact Flash system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
DaemonTW
n00b
n00b


Joined: 20 Jan 2005
Posts: 7
Location: Australia

PostPosted: Thu Jan 20, 2005 11:44 pm    Post subject: Building a Compact Flash system Reply with quote

I'm currently working on a project where I want to run Gentoo off a compact flash card (using a direct IDE interface). As this is something I'd like to update every few months, so I've started out with using Catalyst to build the distribution and it works perfectly from a CD. This so far has been excellent, Catalyst is easy and works like a charm!

Now what I'm planning to do is of course set this up on a compact flash card so there's no moving parts in the system (it's a 300Mhz geode system). Looking at how the catalyst image works, it's of course trying to find a mount point for the CD.

So far I've formatted the CF card with ext2 (to avoid writes as much as possible), installed grub and copied the squashfs file over to the card. It's almost working, but as mentioned above the linuxrc from genkernel tries to find and cd and fails.

Has anyone else modified the linuxrc file to suit? Is their any other suggestions you have for what I'm trying to do? What I hope to do is automate how the card is built, so that in the future different systems and updates can be done with minimal fuss. I'll make sure that I keep this thread (or on the gentoo wiki) updated so that others may also use my setup.

I haven't as yet tried using things like the gentoo-embedded platform or busybox to reduce the size yet, but a basic system with all the drivers, networking utilities, audio utilities and my custom software is under 40Mb as a squashfs file!
_________________
Administrator / Developer
TechWatch
www.techwatch.com.au
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Fri Jan 21, 2005 2:43 am    Post subject: Reply with quote

I don't have an answer to your question, but nonetheless have a
start-point. Our public library just got a copy of "Linux
unwired
" (O'Reilly publishing) by R. Weeks, E. Dumbill &
B. Jepson
. Page 131 has a section entitled "Running Linux off
[of] a CF Card
". It doesn't discuss Gentoo much, so I don't
think that it directly answers your question, but it does have a
lot of pointers (URLs) to getting a wireless access-point running
off of a CF card.
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Jan 24, 2005 4:14 pm    Post subject: Reply with quote

Have a look at the Flash Linux home page.

Quote:
It's a customised Linux distribution designed to be run directly off a USB key or other (similar) forms of bootable flash memory. It should work within the contraints of 256Mb of (flash) memory although larger devices may also be used.


It might be just what you need.

I am going to test this on the same setup (ide cf reader) too, but don't have the cf card as yet :roll:
Back to top
View user's profile Send private message
DaemonTW
n00b
n00b


Joined: 20 Jan 2005
Posts: 7
Location: Australia

PostPosted: Mon Jan 24, 2005 11:34 pm    Post subject: Reply with quote

gentsquash: Thanks for the heads up on the book, might see if work will purchase it for me.

richard.scott: Although the project is similar, my aim for this compact flash distro is pretty customised but their work on different filesystem usages will be interesting.

I've been busy over the last few days, but currently rewriting the linuxrc file completely. When the system was running on a laptop hard drive I had the boot time to just under 1m30s, which was from the time I hit the power button to the time my application started running. Hopefully a rewrite of the init scripts will improve this slightly, but a 300Mhz Geode processor isn't exactly quick.

Hopefully I have it working this week sometime, then I'll tidy up my scripts (I really need to learn BASH properly sometime) and post them here for others to use.
_________________
Administrator / Developer
TechWatch
www.techwatch.com.au
Back to top
View user's profile Send private message
polle
Veteran
Veteran


Joined: 28 Feb 2003
Posts: 1498
Location: Belgium

PostPosted: Tue Jan 25, 2005 3:51 am    Post subject: Reply with quote

maybe another interesting link:

http://silent.gumph.org/content/4/1/011-linux-on-cf.html
Back to top
View user's profile Send private message
DaemonTW
n00b
n00b


Joined: 20 Jan 2005
Posts: 7
Location: Australia

PostPosted: Tue Feb 01, 2005 12:40 pm    Post subject: Reply with quote

System is nearly complete now, and I've just got a few last minute glitches to fix. Once this is done I'll tidy up the settings I use and post them here.

Basics are:

1. Create livecd-stage1 with Catalyst
2. Create livecd-stage2 with Catalyst, which compiles with my custom linuxrc (made a few changes to the Catalyst files but looking at a cleaner solution)
- During stage is also copies across my files (using the root-overlay) and configuration changes (customised a fair chunk of the /etc/init.d that is required to run to the bare minimum).
- Also runs a final script while it's chrooted to generate ssh keys etc
3. Format CF card with EXT2 and loaded Grub
4. Copied over the livecd.squashfs file, kernel and initrd file to the CF card
5. Boot!

Currently it's taking up 33Mb of the Compact Flash card, which includes programs I have like alsa libraries, alsa-util, iptraf, nmap etc and a few other "nice to diagnose problems with" utilities.

As a note I had to disable the dma access on the IDE controller for the CF card to work, from time to time it would either have a huge delay in doing something or timeout. All I have done so far is pass ide=nodma to the kernel in the grub.conf.

I have one last problem with ALSA that I can't quite figure out yet. If I use alsaconf the sound works. But, using the /etc/modules.d/alsa and /etc/modules.conf it creates doesn't work when the machine reboots (I copy them into my root-overlay and rebuild) as it can't load the module.

Does alsaconf modify anything other than the /etc/modules.d/alsa and run anything besides modules-update?
Edit: Found it, modprobe.conf is also modified.
_________________
Administrator / Developer
TechWatch
www.techwatch.com.au
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum