[Soekris] gentoo on soekris

Nick Rout nick at rout.co.nz
Sat Aug 2 07:48:26 UTC 2003


I am more than familiar with installing gentoo on a standard desktop
:-) I have been running it as my desktop for quite a while now, scored a
few converts in my local linux users group and helped organise and run
a gentoo specific installfest for the LUG.


I have also built a gentoo boot-cd specifically for running distcc for
the purpose of the installfest. emerge livecd-ng gives you a system
for building custom boot cd's. It basically sets up a chroot system,
builds what you want into it, then deletes all the excess stuff like
emerge gcc, man pages, and a lot else. You can end up with a bootable
non-X system with sshd, distccd, pretty much a bootable rescue disk, the
sort of thing you could install gentoo on from scratch, at around 50M. I
am sure it could be much smaller, I was doing a "quick & dirty".

The livecd-ng scipt is modular, in that it has a number of stages:
fetch          Fetch required sources
 build          Build a bootable LiveCD tree (requires 'fetch')
 delete         Remove chroot directory (to allow 'build' to work)
 kernbuild      Perform only the kernel building steps (requires
'build') 
initrd         Generate the bootable LiveCD initrd (requires
'kernbuild') 
clean          Prepare chroot for CD by removing extraneous
data 
cloop          Create compressed loopback filesystem
isogen         Generate the final bootable LiveCD ISO image (requires
'prep')

You could use theses scripts to create a small system, then transfer it
to CF, skipping the cd-specific stuff. Of course you miss out on being
able to build any more packages, because emerge and gcc are gone.
However if you refine an embedded system as you want it, you may be
happy with that.

It would be nice to build a generic script to do all that, but probably
beyond me.




 On Sat, 02 Aug 2003 01:56:00-0400
KF<dotslash at snosoft.com> wrote:

> Nick Rout wrote:
> 
> >Excellent. Got a howto?
> >
> I sort of cheated. I first booted the system using the instructions 
> located here: http://www.innercite.com/~mike/soekris/
> This allowed me to access the flash card as /dev/hda. I took a gentoo 
> stage3 (you can use stage 2 or 1 also but thats alot of compiling)
> cdrom from: 
> http://distro.ibiblio.org/pub/linux/distributions/gentoo/releases/1.4_rc4/x86/x86/stages/
> and copied its contents to a random directory on my filesystem.
> Next chroot to this location with "chroot /path/to/random/directory". 
>  You then have access to emerge and other gentoo utilities. You can
>  now 
> roll your own gentoo that fits within your disk limits. My disk is 256
> mb and I currently have 50 meg left. After building the system you
> will want to set aside some scratch space for nfs mounting later. You
> will want to move a few large directories to this scratch space like 
> /usr/lib/gcc-lib and /usr/portage. This will help trim some of the 
> uneeded  disk hogs out of your way. Below is the shell script I use on
> the soekris when I want to access portage and emerge.
> 
> soekris root # cat mounts.sh
> portmap
> echo mounting gcc-lib
> mount -t nfs 192.168.1.124:/nfsroot/gcc-lib/ /usr/lib/gcc-lib
> echo mounting kern src
> mount -t nfs 192.168.1.124:/nfsroot/kernel /usr/src
> echo mounting portage
> mount -t nfs 192.168.1.124:/nfsroot/portage /usr/portage
> echo mounting misc
> mount -t nfs 192.168.1.124:/nfsroot/misc /root/misc
> mount | grep nfs
> 
> Next you will want to place this chroot dir in your /etc/exports so
> that it can be accessed by the debian nfs boot setup that you are
> using from above. Just mount the chroot via nfs and copy away.
> Obviously you need to fdisk the card first. Simply cp -r everything
> but /proc (if its still mounted) to the compact flash card. Next on
> the soekris mount /dev/hdaX and "chroot /path/to/flashcardmount" . You
> need to edit lilo.conf and run lilo. Most importantly is the kernel...
> I did not use the gentoo kernel that comes with emerge. Instead I used
> the vanilla source for 2.4.18 and the same .config from the
> innercite.com site by mike. You MUST do one thing to the kernel config
> and that is enable devfs. Gentoo HATES to not have devfs. Because of
> devfs  you will need to put tts/0 in /etc/securetty or you will pull
> your hair out for 3 days because you can't login on the console. =] Oh
> yeah /etc/make.global needs to have all the i586 changed to i486 for
> best optimization maybe?
> 
> That should be a good run down until such time as I can write a proper
> doc on how to do things...
> 
> If you are not familiar with gentoo follow this doc for general
> install questions. 
> http://www.gentoo.org/doc/en/gentoo-x86-install.xml
> 
> -KF
> 
> 
> _____________________________________________________________________
> Soekris Engineering, technical discussion mailing list
> [un]subscribe: http://lists.soekris.com/mailman/listinfo/soekris-tech
> 
> 





More information about the Soekris-tech mailing list