**** BEGIN LOGGING AT Sun May 06 02:59:56 2007 May 06 16:13:08 anyone here use UPS with their slug? May 06 16:53:32 * joshin uses FedEx May 06 17:21:26 * mwester uses Postal Service, much cheaper than either UPS or FedEx. mwester also uses a Belkin UPS to power his two production slugs. May 06 17:49:12 For packages, FedEx ground is often cheaper than UPS or USPS May 06 17:59:09 i've found ups to be cheaper. May 06 17:59:32 either way, would a 6V gel cell work to power a slug by? May 06 18:09:50 Probably. You could toss a diode in the circuit to drop the voltage to get a bit closer to the 5v it wants. May 06 18:10:48 joshin: do you use a UPS with your slug? May 06 18:12:17 I have a 4 NiCad cell adapter in-line with my slug to handle short term outages on my slug that is flash memory only. My slug with a disk attached is connected to a regular UPS. I have a dedicated UPS for the slugs but need to pick up a new battery for it. May 06 18:12:55 joshin: so you don't use one of the power-on always mods? May 06 18:13:07 Nope. May 06 18:13:37 I'm looking for someone who has tried one of the always power-on mods... May 06 18:13:55 If power goes out long enough to drain the batteries, either I have bigger issues to deal with or I'm away from the house and don't much give a darn. May 06 18:14:28 scant: what does using a UPS have to do with the power-on mod? May 06 18:15:12 joshin: i'm all about a UPS, but if there is no way to turn the slug back on when power comes back up, I find UPS sort of useless since ext3 is resiliant May 06 18:15:35 joshin: the always power-on mod i think allows the slug to power up when power turns back on... May 06 18:15:41 scant: Unslung or other firmware? May 06 18:16:02 mwester: i use unslug, why? May 06 18:16:20 Unslung and UPS software don't work well together May 06 18:17:04 mwester: like for everyone? May 06 18:17:24 You'd have to "roll your own" shutdown procedure, as there really is no shutdown process that the UPS software can hook into for that final handshake with the UPS as the device powers off. May 06 18:18:05 mwester: what about DO_Shutdown May 06 18:18:22 THat would involve modifying the Linksys busybox code, as the poweroff is hardcoded into the halt command (which does not do a shutdown in the normal sense; it sends a kill signal to all processes, waits about 1 sec, then powers off. May 06 18:18:42 DO_Shutdown just calls the Linksys halt, but it doesn't actually shut everything down. May 06 18:18:57 It can be done, I'm convinced, but I gave up. May 06 18:19:09 mwester: does modifying the busybox code involve recompiling the kernel? May 06 18:20:42 Technically no, it can be done by building a custom version of busybox. May 06 18:21:15 But it's easier to build the latest Unslung alpha code, which has entirely replaced the busybox, and modifying the more standard stuff. May 06 18:21:52 I guess it depends on what you want to do with it; there are alternatives, but none that I found palatable (sp?). May 06 18:22:30 The power-on mod is certainly high on the list of things that's required, though. May 06 18:23:02 The idea (for the lurkers on the channel) is that the SLUG begins a shutdown when it gets a battery-low signal from the UPS. May 06 18:23:28 After all the disks are unmounted, the final pre-poweroff step is to tell the UPS to turn off power. May 06 18:23:54 Then, when AC power returns, a well-behaved UPS powers up, and with the power-on mod, the SLUG does too. May 06 18:24:32 Problem is that there is no way to intercept the shutdown after the disks have been unmounted and before the final SLUG power-off in order to signal the UPS to power off. May 06 18:24:49 mwester: I'm still confused, as to why, a script similiar to DO_Shutdown can't be run that tells the UPS to shutdown as a last step May 06 18:24:59 It can. May 06 18:25:06 But the disks are still mounted. May 06 18:25:52 So you will have an unclean shutdown. And that leads to all the problems of running chkdsk at boot (which doesn't seem to happen reliably on the device) May 06 18:26:17 And since the whole point of the UPS is to protect the disks, that seems illogical to me. May 06 18:26:17 why can't we call the UPS to shutdown after the disks are unmounted? May 06 18:26:33 Because the disks aren't unmounted in DO_Shutdown. May 06 18:27:12 where is the DO_Shutdown script located? May 06 18:27:24 It's an exectuable in /usr/sbin May 06 18:27:30 oh May 06 18:27:52 It calls the rc shutdown scripts in /etc/, and somewhere in that chain the /etc/halt utility is run. May 06 18:28:26 The problem fundamentally is that the startup/shutdown of the Linksys firmware is not done in the traditional way with "init". May 06 18:28:35 my DO_Shutdown calls rc.halt May 06 18:29:11 Yep. May 06 18:29:14 rc.halt calls /sbin/halt-test, I don't know what that is May 06 18:29:25 Doesn't do anytihing, IIRC May 06 18:30:15 halt-test calls /usr/sbin/umount_flash and /usr/bin/Set_Led and /sbin/halt May 06 18:31:34 Yep. If you are running unslung, you are running from the root drive, which is still mounted when /sbin/halt executes. /sbin/halt never returns, and does not signal init in the traditional form. May 06 18:31:57 mwester: i'm sorry, I don't know a lot about linux and shutdown/startup May 06 18:32:19 Neither did I until I tried to get my UPS working on Unslung. :) May 06 18:32:29 mwester: my rc.halt is diverged to /unslung/rc.halt, which unmounts my drives and my flash May 06 18:33:03 That's actually how I ended up doing the 6.8 release of Unslung -- I badgered the original developers with enough questions... May 06 18:33:15 mwester: since unslung does a dirty power off anyway, why not just unmount my regular drives, my flash, and before I call halt-test tell the ups to turn off May 06 18:33:52 You're running from the drives, you can't just unmount them. May 06 18:34:27 mwester: what do you mean? May 06 18:34:45 mwester: i umount my drives in my rc.halt and rc.reboot diversion scripts in /unslung May 06 18:35:31 Try it - you can't unmount the root drive you are running from. The best you can do, if there's nothing else writing to it is remount it read-only, which is what a proper shutdown is supposed to do. May 06 18:35:47 BTW, do you have a serial console? May 06 18:36:09 You'll find that more than useful to trace startup/shutdown sequences and such. May 06 18:36:18 mwester: no serial console May 06 18:36:29 mwester: i have an odd setup May 06 18:36:41 mwester: I have a flash drive as my root drive, and two hard disks May 06 18:37:23 That minimizes the impact of an unclean shutdown. May 06 18:37:36 I'm so confused... May 06 18:37:49 mwester: are you saying with unslung, all shutdowns are unclean? May 06 18:37:56 Yes. May 06 18:38:29 mwester: but for me, it's just the root flash drive that's shutdown uncleanly? May 06 18:38:32 I've been thinking about fixing that, but it makes it less "Linksys-compatible" May 06 18:38:49 Dunno, I would certainly hope that only the root flash drive is affected. May 06 18:39:59 mwester: so in my halt diversion script, after i unmount my data hard drives and before i unmount my flash drive, i could call the UPS to shutdown May 06 18:40:16 Yep. May 06 18:40:44 mwester: with that setup, in terms of clean and unclean shutdowns, i still have an unclean shutdown with my root flash drive, but i would have anyways, right? May 06 18:41:09 Yes, it would be no worse than the standard shutdown. May 06 18:41:32 mwester: so UPS should work with unslung if the root drive is standalone May 06 18:42:35 Er, depends on definition. I say "no" because it doesn't meet what I consider the reasons for using a UPS. But if done correctly, it will be no worse than the Linksys code. May 06 18:43:15 mwester: that's what i'm going for, no worse than what i have now May 06 18:43:26 BTW, see the wiki article on running RAID on Unslung for some other comments on the situation; the authors encountered the same problem with shutdown, which ended up breaking the mirroring each time the device was rebooted. May 06 18:43:53 Gotta run; I'll be around -- good luck! May 06 18:43:54 mwester: i tried raid on my setup, it was too compilcated and i couldn't get it to work, so now i use rsync May 06 18:44:07 mwester: thanks for the dialog May 06 18:44:54 (I dropped the RAID idea as well, and also do rsync -- but no flash device, just two 250GB disks...) May 06 18:45:29 mwester: talk to you when you get back i have more questions, haha May 06 18:45:51 which version of monotone is recommended to use in OE ? May 06 19:03:13 caplink811 :) May 06 19:03:36 ~good boy May 06 19:03:36 aw, gee, caplink811 May 06 20:29:22 mwester: are you back? **** ENDING LOGGING AT Mon May 07 02:59:56 2007