Gentoo Archives: gentoo-hardened

From: KrispyKringle <krispykringle@g.o>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Gentoo Hardened on a Compact Flash or USB Memory Stick
Date: Tue, 27 Jul 2004 04:36:50
Message-Id: 4105DBD9.60605@gentoo.org
In Reply to: [gentoo-hardened] Gentoo Hardened on a Compact Flash or USB Memory Stick by Gnubie
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Gnubie wrote:
5
6 | Hello all,
7 |
8 | I'm new to Gentoo and the way I look at it, it's the best distro that
9 | will fit with my plan to make a customize Linux distribution that will
10 | entirely run either on compact flash or USB memory stick.
11
12 Are you trying to set up an embedded device (like a Soekris-type network
13 device) or just a portable bootable disk?
14
15 If the latter, I don't really see the point of hardened (you could just
16 go with a read-only media like CD and use the flash card for your home
17 directory). Also, booting from CF is a lot harder than from CD.
18
19 If the former, this is actually a pretty fun project. You can have a
20 fully working installation with ssh, thttpd (or boa, or maybe even
21 Apache), and ordinary user-space stuff in 60MB or less. Considering the
22 price of CF cards, I'd say that's fine, but if you intend to get a lot
23 smaller, you should check out the busybox software distribution and
24 uClibc (at http://www.busybox.net/ and http://www.uclibc.org/).
25
26 Bear in mind that these size estimates don't take into account the size
27 of your portage tree.
28
29 There are a number of generic howtos on embedded linux (that's the term
30 I'd search for) that apply equally well to the Gentoo distribution. If
31 you have specific hardware (especially the popular Soekris), you can
32 often find customized distributions for it. If not, the basic
33 methodology (unless, as I said, using custom software to strip the size
34 even smaller) is to simply install the base system, remove things one by
35 one that you don't need (just remember what they were in case it turns
36 out that you diid need them) and compile a custom kernel. Like I said,
37 this should get your installation easily below the size of a 128MB flash
38 disk.
39
40 What you may want to do to save space regarding the portage tree and to
41 saave time--if you are compiling on, say, a 100MHz 486 as in the
42 Soekris--is cross-compile software for the embedded system on your
43 desktop. This allows faster compiles, and also allows you to save space,
44 etc. You can even set up a chroot environment or a User Mode Linux
45 installation to simulate the root filesystem of the embedded device, and
46 simply copy over the new image as needed.
47
48 Final tip: try to make the flash disk as read-only as possible. Flash
49 disks have relatively low tolerance for successive writing; they wear
50 out, supposedly, after a few hundred thousand.
51
52 Tell us how it goes. Good luck.
53 - --
54 Dan ("KrispyKringle")
55 Gentoo Linux Security Coordinator
56 -----BEGIN PGP SIGNATURE-----
57 Version: GnuPG v1.2.4 (Darwin)
58
59 iQEVAwUBQQXb2bDO2aFJ9pv2AQKVPwf+IJaU3PKdh8uUPgnii2jU/HJQ/j/sRWAy
60 FZStZ/4E7Rg9Dc9u0fsCBJK3Uu2JSnSXezKjhDayCxT30cZcQwJcrhi417exmRCm
61 gWDZ3Ieb0Jf/10UavUPxeEn31joDYgYyS3rfRFoe19AiG8cgjuoqDT9GfE9PZi3C
62 TQkwVbxZAox4bhu4Xrq2JJz2dTGFNSAHBbrSBGaSLpQRguhUPYiv7YzVYKfcySHb
63 DIE/DD/x7JFnycLuEg3axPPbCme9WQekFWmD7ZCy4MjuhHh/sqQeG8Ix14ZDXWh9
64 +vYR1Efqgv+lbE6aipJ0Pdy6KhfPZ4WDnvSaH3RFZ83CFkZeQvK7Vg==
65 =908T
66 -----END PGP SIGNATURE-----
67
68 --
69 gentoo-hardened@g.o mailing list