Gentoo Archives: gentoo-embedded

From: Natanael Copa <natanael.copa@×××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] ADSL router + firewall + PoPToP....
Date: Wed, 28 Jun 2006 13:50:59
Message-Id: 1151502573.28440.99.camel@localhost
In Reply to: Re: [gentoo-embedded] ADSL router + firewall + PoPToP.... by Marcelo Coelho
1 On Wed, 2006-06-28 at 14:28 +0100, Marcelo Coelho wrote:
2 > > Its designed for routers, firewalls, small servers without harddisk.
3 >
4 > I need the disk for p2p temp files... But the idea of having all the
5 > software in ram is very appealing...
6
7 I have been playing with the thought of a hybrid. You load all runtimes
8 (binary executables) into RAM and run them from RAM. But you mount
9 a /var partition on disk (maybe an encrypted partition?). You have your
10 software on readonly cdrom, your configuration on floppy/usb and your
11 data (/var) on disk, mounted as noexec.
12
13 > Also, the usb ports come from a
14 > pci card that i bought so i think (never tested it) that it won't boot
15 > from usb, only floppy.
16
17 There are floppy images on the iso image for booting from both cdrom and
18 usb. usb.flp has drivers needed to load the system from usb.
19
20 > >They are slow. For fast boots, i'd try to make initng work. (but its big)
21 >
22 > I don't mind, i still have space :)
23
24 I want to save space but dont expect to reboot so often. We are solving
25 different problems. :)
26
27 > But i still have a problem: my ADSL modem is USB, and when i boot the
28 > pc the modem requires a firmware to be downloaded into it.
29
30 Do you have the firmware (and drivers) in gentoo portage? what ebuilds?
31
32 > The normal
33 > baselayout doesn't do that (or the pc takes too long and the modem
34 > times out or maybe a bug??) in due time, so it's a question that i
35 > have to cover, nevertheless, i'll try your baselayout.
36 >
37 > Do i have to install anything besides the source package?
38
39 busybox should be enough.
40
41 > > You can probably reuse parts of it. The source package is here:
42 > > http://tanael.org/alpine/baselayout-alpine/baselayout-alpine-0.9.6.tar.gz
43 >
44 >
45 >
46 > Thanks!!
47 >
48 >
49 >
50 > 2006/6/28, Natanael Copa <natanael.copa@×××××.com>:
51 > > On Wed, 2006-06-28 at 13:56 +0100, Marcelo Coelho wrote:
52 > > > What about a bootchart? Is there one available?
53 > >
54 > > no sorry.
55 > >
56 > > > My system is a normal stripped down gentoo install (for now). I'm
57 > > > making some scripts to make the build process automatic in a build
58 > > > host and create a tarball with it. My pc doesn't boot from cd-rom...
59 > > > :(
60 > >
61 > > Does it boot from usb?
62 > > http://tanael.org/alpine/v1.1/usbdrive/
63 > >
64 > > Does it boot from floppy? there are floppy images on the iso that will
65 > > load the kernel from floppy, cdrom drivers and then load the rest from
66 > > cdrom.
67 > >
68 > > > (When i'm satisfied with the results i'll post an how-to at
69 > > > gentoo-wiki. :) ). So what i want is stability and boot up speed.
70 > > > I don't test initng for a while, and when i did i didn't had good
71 > > > results, but for what i want it _may_ be good enough, but if the boot
72 > > > time is similar to your baselayout, i'll use it instead...
73 > >
74 > > They are slow. For fast boots, i'd try to make initng work. (but its
75 > > big)
76 > >
77 > > Might be that its fast enough for you if you dont need the
78 > > coldplugging.
79 > >
80 > > > In the mean time, what you want to say with "But its designed to load
81 > > > binary packages to ram
82 > > > during boot, LEAF style." ?
83 > >
84 > > It means that is pulls in runtime packages during boot to a tmpfs. All
85 > > runtimes (binary pacakges) are loaded into ram during boot instead of
86 > > the classical livecd approch where you mount a squashfs or uninonfs on a
87 > > cdrom.
88 > >
89 > > The drawback is long boot times (you need to install all your packages
90 > > every time you boot)
91 > >
92 > > The benefit is you prevent delays caused by cdrom spinning up
93 > > (everything is in ram so responsetimes should even be faster than from
94 > > disk) and you can do (security) updates without rebooting.
95 > >
96 > > Its designed for routers, firewalls, small servers without harddisk.
97 > >
98 > > >
99 > > > Thanks!
100 > > >
101 > > >
102 > > >
103 > > >
104 > > > 2006/6/28, Natanael Copa <natanael.copa@×××××.com>:
105 > > > > On Wed, 2006-06-28 at 07:46 -0400, Ned Ludd wrote:
106 > > > > > On Wed, 2006-06-28 at 11:09 +0200, Natanael Copa wrote:
107 > > > > > > On Wed, 2006-06-28 at 09:53 +0100, Marcelo Coelho wrote:
108 > > > > > > > > no not at all. the baselayout-lite one does not depend on bash what so
109 > > > > > > > > ever and includes pretty much no init/conf scripts. You get to hack on
110 > > > > > > > > your own init scripts, which is a trivial task.
111 > > > > > > >
112 > > > > > > > Well, i have to use a different baselayout. The boot time is far too
113 > > > > > > > long to be acceptable and there is a problem with hotplug (an error
114 > > > > > > > appears that the firmware isn't available). But i don't know if it's
115 > > > > > > > easier to make my init scripts or use initng.
116 > > > > > >
117 > > > > > > I have made a baselyaout with a stripped down version of runscript that
118 > > > > > > will run the many init.d script from gentoo out of the box.
119 > > > > > >
120 > > > > > > Let me know if you are interested and I'll send you the sources
121 > > > > >
122 > > > > >
123 > > > > > Does not depend on bash?
124 > > > >
125 > > > > no
126 > > > >
127 > > > > > Works with ash? :)
128 > > > >
129 > > > > yes :)
130 > > > >
131 > > > > or... I'm actually using dash currently because coldplugging takes like
132 > > > > 3 minutes with ash and 5 seconds with dash. (its fixed in next release
133 > > > > of busybox so I'll drop dash)
134 > > > >
135 > > > > > If so I think we would all be interested in moving fwd in that
136 > > > > > direction. Feel like putting together an updated baselayout-lite ebuild?
137 > > > >
138 > > > > I have one already. But its designed to load binary packages to ram
139 > > > > during boot, LEAF style.
140 > > > >
141 > > > > rsync://tanael.org/alpine-portage/sys-apps/baselayout-alpine/
142 > > > >
143 > > > > You can probably reuse parts of it. The source package is here:
144 > > > > http://tanael.org/alpine/baselayout-alpine/baselayout-alpine-0.9.6.tar.gz
145 > > > >
146 > > > > I kind of immitate runlevels, (using rc0.d, rc1.d etc) but the big
147 > > > > difference from normal sysv is that *all* runlevels or "boot stages" are
148 > > > > executed.
149 > > > >
150 > > > > I had to patch some of the init.d scripts. Typically it was replacing:
151 > > > >
152 > > > > if [ expr && expr ] ...
153 > > > >
154 > > > > with:
155 > > > >
156 > > > > if [ expr ] && [ expr ] ...
157 > > > >
158 > > > > If we could get the init.d script writers to try to not be too bashish,
159 > > > > it would be great.
160 > > > >
161 > > > > If there is interrest I could dump my patches somwhere.
162 > > > >
163 > > > > If you want to see it in action, try:
164 > > > > http://tanael.org/alpine/v1.1/iso/alpine-1.1.3_beta8-060622-i386.iso
165 > > > >
166 > > > > Its 125Mb
167 > > > >
168 > > > >
169 > > > > --
170 > > > > gentoo-embedded@g.o mailing list
171 > > > >
172 > > > >
173 > > > --
174 > > > gentoo-embedded@g.o mailing list
175 > > >
176 > >
177 > > --
178 > > gentoo-embedded@g.o mailing list
179 > >
180 > >
181 > --
182 > gentoo-embedded@g.o mailing list
183 >
184
185 --
186 gentoo-embedded@g.o mailing list

Replies

Subject Author
Re: [gentoo-embedded] ADSL router + firewall + PoPToP.... Marcelo Coelho <marcelocoelho@×××××.com>