View previous topic :: View next topic |
Author |
Message |
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 262
|
Posted: Thu Nov 02, 2006 5:16 pm Post subject: |
|
|
As I am constructing a minimalistic Gentoo system I can act as some sort of beta tester.
Hardware: VIA EPIA 5000 (x86 arch: C3), 256 MiB RAM, Compact Flash as boot medium.
Intended purpose: Musicbox
- Plays: CD, DVD, USB storage, NFS and Samba network resources, internet radio stations.
- Supports as many formats as possible (perhaps even inside archives?).
- Provides a sweet little 8" touchscreen GUI (Without Xorg: Qtopia?).
system-1: kernel 2.6.17-gentoo-r8, uclibc, baselayout-lite, busybox (approx. 3 MiB on CF)
TinyGentoo. Worked, but not suitable for further development.
system-2 (current): kernel 2.6.17-gentoo-r8, uclibc, baselayout, shadow, util-linux, grep, sed, gawk, module-init-tools (approx. 7 MiB on CF)
After some trial and error and hacking (disable udevsend, mkdir /var/lib/init.d...) I could boot a stripped down standard Gentoo system, but I had to pull in more and more extra tools. Busybox offers these tools, but its init is not compatible with standard baselayout's inittab. As I need the standard baselayout for some future programs I have to go a different way... keep busybox, but use another init. Sysvinit could do, but why not try something new?
system-3 (intended): kernel 2.6.17-gentoo-r8, uclibc, baselayout, busybox compiled without init, einit, udev, coldplug.
Well, let's see how far I can get...
---
I could also offer support as dev. Started programming with Turbo Pascal 7 and its inline assembler (some $a000 magic) in the early 90s, moved on to C and C++ respectively. Started to read Charles Petzold's brick of book. During my studies I got to know PEARL90, Java and MATLAB and switched to Linux. Picked up basic Bash for everyday scripting and finally tried Python this year. And recently I rewrote our institute's website in XML+XSLT=XHTML.
[/ad]
Only catch: free time is precious. _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Thu Nov 02, 2006 6:54 pm Post subject: |
|
|
@filesystems: seems good, probably something doesn't get killed... i might want to be a bit more agressive about killing processes
i implemented the wait-retry idea from earlier (just commited it, it's in 0.11-cvs-34), haven't tested it in an actual environment (bleedin UML), but it worked in the sandbox...
kktm: that idea is rather good you know! that could work very well... although i wonder how come the remounting r/o doesn't work properly
bastler: i'd love to see some extensive beta-testing. as you probably picked up, einit's design goals are speed, modularity and small size. one note of warning however: last time i tried, uclibc had broken pthreads support (it didn't allow one thread to wait() on a different thread's children, which is vital), so the regular ebuilds won't work on your uclibc box. however, there's a configure flag that should get it to work -- i tested it once or twice on my ipaq (linux 2.6, uclibc) and it worked fine there. of course we could be lucky and someone fixed that bug with uclibc already .
can't hack much myself right now, only feature enhancements and the occasional hack so i know about the time-issue :/ however, there's some feature requests on the wiki that should get you started if you wanted to contribute and get into the code -- just hack along and submit patches if you like but do tell me when you're about to start something bigger.
einit is plain C, no C++, no C# no nothing, so it shouldn't be that hard, but i was told the code isn't the easiest to read (partially that's because my comments suck, but one definite problem with the code is that it isn't running linearly).
btw, if there's any specific questions about the code, just PM me, or IM me (jabber preferred, but i'm on just about any protocol). + i'm sometimes on DALnet and freenode as jyu. _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
KKtm Tux's lil' helper
Joined: 03 Oct 2005 Posts: 119
|
Posted: Thu Nov 02, 2006 9:08 pm Post subject: |
|
|
new unmount seems to work.
at least /sys and / could be seen attempting to unmount and I didn't remark any fs corruptions last boot. good job!
My little wish list:
* Delete network from *dm requirements. Or treat network as started, as soon as net.lo (or whatever the first network device is) is up.
Because last update when replacing einit.xml I had to wait for ~3 minutes before gdm was started, just because eth0 was still waiting for a non-existent dhcp-server.
* Add my eth1-module to einit.xml
Or should I rather include a modules.xml in local.xml and add this module only at my place?
* A nice framebuffer-bootscreen
Maybe I'll find the time to get started on this myself one day. |
|
Back to top |
|
|
brot Guru
Joined: 06 Apr 2004 Posts: 322
|
Posted: Thu Nov 02, 2006 9:31 pm Post subject: |
|
|
I am sorry but for me the unmounting doesnt work
I have XFS, and everytime i reboot i have to check my filesystems again. also, my jfs partition doesnt seem to be checked.
And as far as i understood the needed alsa modules should be loaded by default, but it doesnt seem to work here, i have to create a new module group (i have a soundblaster audigy 2, so nothing too uncommon here).
But after some hours of playing with einit i have to say that einit could really be the init of the future. what works does really work great, and if you keep in mind that its 0.11 then you really created something wonderful
(maybe someone can help me with the unmount/alsa/fsck problems... thanks in advance)
brot |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Thu Nov 02, 2006 9:55 pm Post subject: |
|
|
kktm: glad it seems to work for you! so we definitely made *some* progress here
i'll do as you suggested with the configuration file with the next commit. sorry about those modules you suggested, i seem to have lost track of them ^^8
i had already started on a framebuffer-bootscreen using evas/edje, if you wanted, you could extend that code. if you wanted to extend it, i'll get it up to date so people can hack on it (working with evas/edje to design things really is great, trust me, which is why i chose those libraries )
brot: first of all, thanks for testing, really! (that's to everyone who ever tried it, honestly!)
not sure about those filesystems, einit doesn't have metadata-code for them. do you mean to say that you have to check them manually because they need to be checked but aren't, or that they're always checked while you expect them not to?
the sound-module loader code uses the same way to find modules that gentoo's /etc/init.d/alsa uses, it's kinda weird that they're not loaded... could you post the output of "modprobe -c" somewhere? ( wiki.jyujin.de maybe )
thanks for your enthusiasm towards einit. i'm trying to get stuff done properly, so i never try to over-exagerate with version numbers and releases _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
brot Guru
Joined: 06 Apr 2004 Posts: 322
|
Posted: Fri Nov 03, 2006 1:50 am Post subject: |
|
|
Unmounting works with the new version of einit - i reemerged it and now it works, so there definitely is a progress
To my sound problem: i will look at it tomorrow, maybe i am doing something terribly wrong. Its 2:50 am here, so time to go to bed |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Nov 03, 2006 4:09 am Post subject: |
|
|
mdeininger wrote: | i had already started on a framebuffer-bootscreen using evas/edje, if you wanted, you could extend that code. if you wanted to extend it, i'll get it up to date so people can hack on it (working with evas/edje to design things really is great, trust me, which is why i chose those libraries ) |
I cant wait to see what that looks like, E17 looked so nice... so an eINIT spash could look sick!! _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Lloeki Guru
Joined: 14 Jun 2006 Posts: 437 Location: France
|
Posted: Fri Nov 03, 2006 9:17 am Post subject: |
|
|
KKtm,
Quote: | My little wish list:
* Delete network from *dm requirements. Or treat network as started, as soon as net.lo (or whatever the first network device is) is up.
Because last update when replacing einit.xml I had to wait for ~3 minutes before gdm was started, just because eth0 was still waiting for a non-existent dhcp-server. |
changing <network> in the <alias> tag in local.xml to:
Code: | <network group="net-lo" seq="most" /> | will certainly pour much happiness upon you
Quote: | * Add my eth1-module to einit.xml
Or should I rather include a modules.xml in local.xml and add this module only at my place? |
well, since it's a bit of a hack, and now with the new directory include command, it's a snap to have it locally.
has anyone experienced hcid daemon not stopping on shutdown, thus grinding the whole shutdown process to a halt? killing it in a still open session makes the thing shutdown.
EDIT:
1: well, now ifplugd just happened to do it too. had to SIGKILL it.
2: WOW! just triend to kill hcid again, and the whole computer freezed. and now just starting some daemon (certainly hcid) makes the whole system reboot instantly! insane. there must be something damn wrong in my laptop. disabling bluetooth (bios) for now seems to do the trick...
3: Magnus, could you make --check-configuration (1) use einit=file:foo.xml by default, and (2) have some --file=foo.xml parameter ?
4: the new unmount code seems nice, there seem to be some problem with unmounting /proc and /sys. they both seem to (hard to catch) receive 2 attempts at unmounting, and then, / fails to unmount after 3 attempts. shouldn't / always be remounted ro anyway? maybe a unmount='ro' setting or something like that should be added to filesystems we know will fail to be completely unmounted anyway (like /).
5. bash sessions (among other processes)are not killed, so if I didn't exit them (and all processes using /home), /home failed to unmount (dunno with the new system), thus resulting in a unclean /home.
6. could there be some daemon shutdown timeout, after which a daemon would be sent SIGTERM, and another, after wich it would be sent SIGKILL? (and parameters to allow/disallow/set timeouts per daemon) _________________ Moved to using Arch Linux
Life is meant to be lived, not given up...
HOLY COW I'M TOTALLY GOING SO FAST OH F*** |
|
Back to top |
|
|
Lloeki Guru
Joined: 14 Jun 2006 Posts: 437 Location: France
|
Posted: Fri Nov 03, 2006 3:37 pm Post subject: |
|
|
well, I don't know what's wrong, but even after several reboots (running einit), even emerging udev locked up my computer w/ 100% reproduceability. in the end I booted sysvinit, and the emerge went fine... then I booted back into einit, and the computer rebooted right before I could login. another boot and I could login again. absolutely weird.
these random lockups and reboots seem to only occur since I use einit, and don't seem to happen when I boot sysvinit. I can't even begin to track down what's the cause of it... _________________ Moved to using Arch Linux
Life is meant to be lived, not given up...
HOLY COW I'M TOTALLY GOING SO FAST OH F*** |
|
Back to top |
|
|
brot Guru
Joined: 06 Apr 2004 Posts: 322
|
Posted: Fri Nov 03, 2006 3:40 pm Post subject: |
|
|
maybe something like a errorlog should be implemented so that we can see what has gone wrong ? This would be really helpfull, especially when trying to track down small problems |
|
Back to top |
|
|
KKtm Tux's lil' helper
Joined: 03 Oct 2005 Posts: 119
|
Posted: Fri Nov 03, 2006 5:28 pm Post subject: |
|
|
Ok, there still seems to be that problem with unmounting. It actually tries several times to unmount, but failes sometimes (I saw an error-message on / and /home had to be checked when I was booting this time)
My "network config" looks like this:
Code: | <network group="net-lo:net-eth1:net-eth0" seq="most" /> |
Isn't this what's supposed to be?
If it's not a big deal, I'd be glad to get the code you did on bootsplash. Although I've started university 2 weeks ago and want to give an effort on this, maybe I'll find the time to spend on coding a little bit on this project. |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Fri Nov 03, 2006 5:32 pm Post subject: |
|
|
those lockups ARE very weird, I haven't had that happen to me before when running einit I haven't changed anything that could cause such lockups, either...
that is, if the regular einit thread was to receive a SIGINT for whatever reason, it'd commence with the reboot procedure -- but what would send a SIGINT to einit's secondary process?
as to the suggestions:
rmh: I can't promise much eye-candy. potential eye-candy definitely (e17 is so nicely modular), but i'm not raster when it comes to designing things (which should be apparent if you have a look at einit's homepage )
lloeki:
1./2. this is the weirdest series of errors i've ever seen, specially since i didn't change any code anywhere near the modules used by this!
3: einit= works with --check-configuration if you set it as an environment variable, like this:
Code: | einit=file:foo.bar.xml einit --check-configuration |
the problematic bit is that file: will override ALL files to be loaded, so /etc/einit/einit.xml will not be parsed first. to only change the local.xml, you could use:
Code: | einit -c foo.bar.xml --check-configuration |
i'll definitely look into specifying the einit=file: stuff as --file, though
4. the code actually says to try a complete unmount, then try a remount r/o, then if that fails too to wait a sec and to retry from scratch. if / fails to unmount thrice, that actually means remounting r/o fails too, which is rather grave!
5. weirdness, i'm killing agettys that run the bash session -- you'd think that would kill 'em?
i suppose i'll have to do more hacking to make einit check the process table before and after mode-switches so as to kill stray processes... *nods*
6. i was already looking into that, but it seems a lot harder than one might think. i can't tell wait() to bail out after a few seconds... although i have an idea how to go about this i'll definitely add that -- i noticed that on my box, portmap seems to need a SIGKILL (scary, that was the first sign of a major failing with you, wasn't it? well, if it happens to me, at least i'll have a test-case ^^
EDIT: kktm, you're right, that's what it's suppposed to look like... guess you'll better keep it like that and i'll change the *dm dependencies to net-lo
the evas code is actually in the regular repository. if you check that out, there's a directory src/modules/efl. you can enable compilation of that code using ./configure --enable-efl [still need other options]
the bad part is... err... it may not compile right now because i wasn't being a good boy about keeping it up to date... _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
KKtm Tux's lil' helper
Joined: 03 Oct 2005 Posts: 119
|
Posted: Fri Nov 03, 2006 5:37 pm Post subject: |
|
|
btw: I think the "timeout before turning power off, when there's a problem"-option would be very nice to get closer to the roots of all that problems |
|
Back to top |
|
|
Lloeki Guru
Joined: 14 Jun 2006 Posts: 437 Location: France
|
Posted: Fri Nov 03, 2006 6:24 pm Post subject: |
|
|
well, 1 and 2 are probably something with my system. such hard lockups are 99% kernel things. anyway it may have something to do with einit, maybe the way or the timing with which things get loaded.
Quote: | the problematic bit is that file: will override ALL files to be loaded |
well, I expected it to work that way. even more, from the very beginning I expected einit to parse by default ONLY einit.xml, and include things from there. I find the 'automagically load local.xml' thing a bit weird. now, question, when you include some files, are they parsed first, or last?
for the agettys thing, I can still type in bash sessions until very late. oh, and btw, the ttys should depend on keyboard layout being set, and clock too (i use hwclock, and if ttys start too early, clock jumps occur which may yield unexpected results) _________________ Moved to using Arch Linux
Life is meant to be lived, not given up...
HOLY COW I'M TOTALLY GOING SO FAST OH F*** |
|
Back to top |
|
|
smlgbl Guru
Joined: 10 Feb 2005 Posts: 305
|
Posted: Fri Nov 03, 2006 10:59 pm Post subject: |
|
|
Hi,
besides that I can confirm that there are still unmounting issues, meaning /proc and /sys aso. aren't unmounted, so unmounting / fails, I have to admit, I am kind of shocked. As I hadn't played around with einit while everything is running, but ivman didn't come up again, I guess, because sometimes it has to wait a second or so longer for hald, I wanted to start the service again, without rebooting. So without knowing what I do, I type "erc enable ivman" and I get switched back to tty1 and einit starts all over. Except, that everything is running already, so most things fail. This basically isn't funny, even though I could have checked the manpages and stuff on how to do it properly.
Otherwise. to the mounting I don't see any other service fail that would prevent the unmounting. My half a cent. _________________ samuel.
'Do not let one girding on boast about himself like one unfastening' |
|
Back to top |
|
|
Lloeki Guru
Joined: 14 Jun 2006 Posts: 437 Location: France
|
Posted: Sat Nov 04, 2006 11:24 am Post subject: |
|
|
what's weird is that even in /proc and /sys failed to unmount, we should be able to remount them ro, and then remount / ro... btw Magnus, could there be a last resort remount ro with -l (lazy, see man page) parameter? _________________ Moved to using Arch Linux
Life is meant to be lived, not given up...
HOLY COW I'M TOTALLY GOING SO FAST OH F*** |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Sat Nov 04, 2006 11:28 am Post subject: |
|
|
LLoeki, i sometimes noticed sporadic lockups on my system when trying to rmmod some modules...
the two-config-files thing is to make certain things easier. right now i need that 'till there's conditionals in the config file. it's basically so that the core knows a configuration file, and the default profile to load after that... sort of anyway.
the agettys should actually be killed as soon as nothing depends on them... which is rather early actually? weirdness... but i noticed the same. actually that helped me a lot when having to kill portmap (for whatever reason?)
haader, from the sound of it, you actually started "einit" and not "erc" or "einit-control rc"? einit will usually not switch ttys when merely told to enable something... it's actually:
(to keep in line with /etc/init.d/whatever start)
as a quick-fix, you could put "sleep 1;" in ivmans definition? (really gotta put ivman on my system to test it ^^
i'll put locks in einit so it won't get started twice.
the problem with unmounting is that the kernel only checks for processes that have their CWD below a mountpoint -- if there are any, unmounting fails :/
EDIT: lloeki, lazy unmounting (remount r/o and detaching) currently IS einit's last resort if stuff goes weird, that's why i'm so confused about it failing so much _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 262
|
Posted: Sat Nov 04, 2006 11:39 am Post subject: |
|
|
Downloaded the code of einit-0.10. Will try to improve project management by adding comments. _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Sat Nov 04, 2006 11:54 am Post subject: |
|
|
der bastler wrote: | Downloaded the code of einit-0.10. Will try to improve project management by adding comments. | unfortunately, a lot of code has changed since 0.10, you should rather grab the cvs version but thank you _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
Maxwell Tux's lil' helper
Joined: 10 Dec 2003 Posts: 97
|
Posted: Sun Nov 05, 2006 5:18 pm Post subject: ADSL support? |
|
|
Hi!
I'm searching for an init system for my old pentium 1, but i need two things: ADSL support (pppoe) and the firmware for my usb modem being sent correctly.
Gentoo's baselayout (seome versions) works ok. Can eInit accomplish this also? Anyone used einit with a pentium1?
thanks _________________ Freedom works. Use it!
Linux, by Gentoo |
|
Back to top |
|
|
Lloeki Guru
Joined: 14 Jun 2006 Posts: 437 Location: France
|
Posted: Sun Nov 05, 2006 7:28 pm Post subject: |
|
|
things you ask are not dependend of the init system used, so they will work. not OOTB though, since einit is fairly new, but it just requires the proper config entries. _________________ Moved to using Arch Linux
Life is meant to be lived, not given up...
HOLY COW I'M TOTALLY GOING SO FAST OH F*** |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Sun Nov 05, 2006 7:40 pm Post subject: |
|
|
the only requirement einit has right now is proper pthreads support (or at least "proper enough"), so should work on a pentium1, provided you use a recent kernel (2.6, best with nptl). i recall some 2.4 kernels used to have bugs that prevented glibc from implementing pthreads in a way that allowed all threads of a process to wait on another thread's children to die (which einit relies on, since it's multithreaded and needs to monitor processes).
if you run 2.6 (best with glibc+nptl), it should work. if you know how to load the firmware into your modem using the command-line, you can simply write a small module to do so (you can write regular shell-commands).
if you use an old 2.4 with an old glibc, or you're using uclibc, then you'll have to manually configure and compile einit (there's a command-line switch that enables a work-around, but it's flakey). _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Mon Nov 06, 2006 10:58 pm Post subject: |
|
|
a lil' update: (0.11-cvs-40): I added the "multiline-output" feature (sort of, works okay most of the time), the "broadcast message on shutdown/reboot" (only tested with ptys, but the ttys should get it too), a configurable delay on shutdown if something went wrong (default is 10/15 seconds) and i updated the evas-module (it kinda locks all consoles when used from the console, so... better not use it yet).
i'm also trying to get some design ideas for a bootsplash straight on the wiki ( http://wiki.jyujin.de ). don't look like much, but maybe you'd check 'em out and comment on them?
cheers,
Magnus _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
smlgbl Guru
Joined: 10 Feb 2005 Posts: 305
|
Posted: Tue Nov 07, 2006 12:02 pm Post subject: |
|
|
The definitions for the modules, daemons aso. that are found in einit.xml are not overwritten by what I do in local.xml, is it? I don't like that. I changed some of the definitions for me, but when I update einit, my einit.xml is overwritten. That's why we had the local.xml in the first place, isn't it? But I have to manually delete the service definitions from einit.xml after every update, otherwise my next boot is screwed.
Besides, where can I specify the time to wait on a shutdown failure? Or is it possible to say, like "There where errors in your shutdown sequence. When you're done fixing it, press Ctrl-Alt-Del" or seomething like that instead of a timeout? Then everyone could still decide, if he doesn't care about the unmounting or whatever causes the problem, or whether he wants to investigate the problem. I would actually prefer that very much, because within those 15 seconds, there is not too much one can do. After all you still have to find out what the problem is.
Also, I am still investigating the umount problems I am still experiencing. _________________ samuel.
'Do not let one girding on boast about himself like one unfastening' |
|
Back to top |
|
|
brot Guru
Joined: 06 Apr 2004 Posts: 322
|
Posted: Tue Nov 07, 2006 3:16 pm Post subject: |
|
|
somehow einit stopped working - i know that is has to be a configuration issue, but this shouldnt stop einit from shutting down.
When i select to shut down my pc, einit just hangs on the console 1 and does nothing... Maybe it should try to shut down even if some things fail. |
|
Back to top |
|
|
|
|
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
|
|