**** BEGIN LOGGING AT Tue Feb 13 03:00:01 2007 Feb 13 03:24:06 how/when is the /etc/rc.d/rc.halt script run? Feb 13 03:52:49 my rc.reboot and rc.halt scripts are not running when i type 'reboot' and 'halt' in a telnet session Feb 13 03:53:40 they are located in /unslung Feb 13 03:56:31 scant: yes. Feb 13 03:57:23 shutdown via "halt" or "reboot" on the Linksys firmware is more like a controlled crash. Feb 13 03:58:19 The device was designed for abrupt and brutal shutdown, so little attention was paid to a nice sequenced shutdown. The rc scripts only run when you shutdown/reboot from the web GUI (and maybe, but not sure, the power button) Feb 13 03:58:51 mwester: hi Feb 13 03:59:02 At the command line, you can type "DO_Halt" (I think), or "DO_Shutdown" (commands located in /usr/sbin IIRC). Feb 13 03:59:43 But in general, you should design your solution so that it can recover at startup rather than depend on orderly shutdown. Feb 13 03:59:49 mwester: so when i mount, i should set some flags via hidden files, remove them via rc.halt and rc.reboot, and when i startup if they are there, do some stuff to control the crash Feb 13 04:00:28 That's one approach. In general flags are a bad idea, they tend to have concurrency issues. Feb 13 04:00:36 mwester: what i'm missing is, what to do if crashed, i don't know any thing about crash control, is there a scandisk? Feb 13 04:00:47 fsck Feb 13 04:00:55 do i need to do more than fsck? Feb 13 04:01:31 hopefully not, but there are some types of problems that fsck cannot fix. but you are unlikely to run into those by normal powerdown or shutdown Feb 13 04:02:00 if file flags are a bad idea, what is a good idea to detect crashes? Feb 13 04:02:22 Don't detect the crash, rather detect the problem caused by the crash. Feb 13 04:02:48 i wouldn't know how to do that, can you explain further? Feb 13 04:04:37 to begin, i want to detect 'reboot and 'halt' in a telnet session Feb 13 04:04:46 Can't do that. Feb 13 04:05:37 i want to detect reboots and halts when the DO_Reboot and DO_Halt scripts aren't run Feb 13 04:05:51 You can't do that with the Linksys firmware. Feb 13 04:06:11 On a normal Linux system, halt and reboot signal the init process to begin an orderly shutdown. Feb 13 04:06:32 On the Linksys implementation, the reboot command never returns -- it calls into the operating system and initiates the reboot. Feb 13 04:07:36 The linksys halt command simply sends a kill signal to all processes, waits about one second, then executes a command the sets a GPIO signal that kills the power to the device. Feb 13 04:07:53 if i'm doing custom mounts, i need to use the DO_Reboot command or run fsck at every boot? Feb 13 04:07:56 Hence my characterization of the Linksys/Unslung halt/reboot as "controlled crashes" Feb 13 04:08:05 Yes. Feb 13 04:08:19 Or rather, be prepared to do fsck at every boot. Feb 13 04:09:24 why aren't file flags a good idea, the mount script is only called once, and they are removed only if DO_Reboot or DO_Halt is run, if more than one DO_Reboot or DO_Halt is run then there would be a remove that fails, but that's ok, because the drives should still unmount Feb 13 04:09:39 * mwester remembers that his first attempt to build Unslung resulted from an attempt to solve such a problem -- attempting to "hook" the shutdown sequence to make Unslung play nicely with a UPS when battery low... Feb 13 04:10:59 The flags would be stored separately from the external filesystem itself, thus you cannot be sure that the state of the filesystem matches what the flags say. Feb 13 04:11:21 You might be correct *most* of the time, so it's a good heuristic. But you can't guarantee it. Feb 13 04:11:43 And it's often unnecessary. The filesystem will tell you if it was shutdown uncleanly. Feb 13 04:12:06 what could easily happen is power out while removing, but then your back at not knowing, and doing a sanity fsck Feb 13 04:12:44 if my mounts are 'dirty' then when they are mounted fsck will be run internally? Feb 13 04:13:58 Check the linux docs for info on this; no fsck is not run automatically. You'll have to figure out how to detect that the drive is not clean, and then arrange to run fsck on the drive. Feb 13 04:14:24 Most linux systems have code in the startup scripts that handles this, so they might form a good example. Feb 13 04:14:55 thx **** BEGIN LOGGING AT Tue Feb 13 04:20:15 2007 Feb 13 04:21:32 does fsck work for ext3? Feb 13 04:22:41 i don't think fsck is on unslung Feb 13 04:22:44 fsck is usually a wrapper that invokes the correct fsck. to do the work. Feb 13 04:23:07 On Unslung, I think you have to invoke the "fsck.ext3" directly, IIRC Feb 13 04:23:16 Look in /sbin for *fsck* Feb 13 04:23:31 i get a segmentation fault when i run it Feb 13 04:23:40 fsck.ext3 Feb 13 04:23:58 oh, i think i need to give it some parameters Feb 13 04:24:16 Yep, it needs the device name of a not-mounted partition Feb 13 04:27:15 it says the superblock can not be read Feb 13 04:27:39 is that normal for a ext3 fs bad block scan? Feb 13 04:31:52 i'll repartition, it's a blank drive Feb 13 14:02:05 stupid newbie question. How do I tell a program to run in background from an SSH session? I've tried appending & but it dies when I close the ssh session. Command is Feb 13 14:02:06 python /opt/lastfmproxy-1.1/main.py& Feb 13 15:03:00 hi Feb 13 15:03:22 is there currently a way to install debian in a stable way ? Feb 13 15:03:23 [2007-02-11] debian-installer rc1 is currently broken. This problem will be resolved with the releae of rc2, hopefully in about three weeks. Feb 13 15:03:42 Is there another way to install it ? Feb 13 18:15:33 My slug currently runs OpenSlug but I want to install Debian on it. Am I right in assuming that I will need to put the device in update mode (using a paper-clip or whatever) and then flash the new firmware that way Feb 13 18:16:53 You should be able to use the "reflash" command in OpenSlug, I would think. Feb 13 18:17:18 mwester: sounds good to me :) Feb 13 19:40:11 hello! I've got a question about ghostscript package included in optware. Feb 13 19:42:02 is anybody reading? Feb 13 19:42:23 ask question. wait for answer. :-) Feb 13 19:43:17 i get an error messags like this: AFPL Ghostscript 8.50: ./src/interp.c(295): Fatal error -20 in gs_interp_init! Feb 13 19:45:02 I'm using FreeWRT, a fork of OpenWRT. I also tried recompiling ghostscript (crosscompiling), what resultet in a sligtly smaller packageg, but the error was the same Feb 13 19:49:22 does anybody have a clou what might be wrong?... Feb 13 20:06:51 Well, seems nobody is using Ghostscript on their routers. BTW: it's a WL-500GP Feb 13 20:08:48 If anyony reads this later and knows an answer, I'll be very happy to know it. Write it here, I will look it up in the archives. Feb 13 20:09:07 Thanx in advance. Feb 14 01:42:01 I'm stuck. Trying to install UnSlung onto my nslu2, but my blank (no partition table) USB flash drive is not recognized by the built-in firmware ("Not Installed"). Feb 14 01:42:25 When I partition the drive in Linux, it does show up, but the FAQ says I should format with the NSLU2. Feb 14 01:42:30 any ideas? Feb 14 01:47:15 Flash the Unslung firmware onto the NSLU2, then boot it up and format the USB flash drive with the Unslung firmware. Then telnet into the device and continue with the unslinging process. Feb 14 01:47:42 The native Linksys firmware refuses to format anything less than 10Gigabytes in size. Feb 14 01:52:21 mwester, ahhh! interesting. I hadn't read that anywhere in the wiki (about the 10 gigs). Feb 14 01:57:05 mwester, in fact the Unslung README, which I'm following, says under 4) If you want to use a flash disk ... ensure it is at least 256 MB and formatted via the Linksys web interface Feb 14 01:57:16 I'll try your suggestion now... Feb 14 02:03:06 Yeah, there's actually two things wrong with that line: it should say the "Linksys web interface using Unslung", and it should read "at least 512 MB". Feb 14 02:18:32 mwester, this is frustrating. Running on unslung firmware now, and I can indeed press the 'Format Disk' button. Status changes to 'Formatting...' for a while, but when I refresh after a few minutes, says 'Not Formatted' again. Feb 14 02:18:52 How big is the USB device? Feb 14 02:19:01 1gib Feb 14 02:19:08 flash Feb 14 02:19:14 Is it a "U3" device? Feb 14 02:19:22 what is U3? Feb 14 02:19:29 I have it connected to Port 2, maybe I should try port 1. Feb 14 02:19:45 Everything surrounding the nslu2 and the various firmwares seems to be quite 'fragile' to me :-)) Feb 14 02:20:17 U3 is a means of pre-formatting flash devices, wherein the flash device appears to be a CDROM - doesn't work with Linux Feb 14 02:20:33 Sandisk and some others are now using that on their flash devices. Feb 14 02:20:42 mwester, magic! It now says 'Formatted (EXT3)' Feb 14 02:20:58 I did this 2-3 times before never worked, now it did, after a series of reboots and trying again and again. Feb 14 02:21:27 Re: fragility - yep, there are many "rules" associated with the Linksys firmware that we must "bend" but cannot break, and if bent in the correct fashion, without deviation, we gain access to the internals... Feb 14 02:21:29 I continue with the README... Feb 14 02:21:58 If you are accustomed to Linux, you'll find the SlugOS (aka OpenSlug) release to be far more standard. Feb 14 02:22:23 hmm, not sure. There seem to be lots of restrictions all over the place. Feb 14 02:22:40 Before I tried Debian, but then I read about problems with 2 drives, which I would have (1 flash with Debian, 1 HDD). Feb 14 02:23:00 now I try Unslung. I really only need openssh on top of the original capabilities. Feb 14 02:23:30 I think unslung should give me that. But my patience is getting less and less. If no breakthough by tomorrow morning, I'll buy a MacMini instead :-)) Feb 14 02:26:17 Debian is, if I recall correctly, not considered officially released, so it is by definiition not yet stable. Feb 14 02:26:44 Unslung is hampered by it's most significant feature: compatabiliity with the Linksys firmware. Feb 14 02:27:10 OpenSlug 3.10 is currently, IMO, the most stable and easiest of all the firmwares available. Feb 14 02:39:59 mwester, ok, first of all thank you very much! After hours of frustration (at least I guess that's how you learn in IT), you helped me with your hint that unslung README # 4) was a bit misleading. Feb 14 02:40:18 I can telnet into my unslung device, currently running ipkg install openssh. Feb 14 02:40:33 If I'm in good spirit, maybe tomorrow I try your OpenSlug suggestion. Feb 14 02:40:52 at least I'm pretty good now going back and forth between firmwares, using the sercomm util, etc. Feb 14 02:43:23 mwester, what do you think. Can I go from unslung to openslug by just using the web interface to upload the openslug firmware? Feb 14 02:43:42 If all fails, I go back to the original Linksys firmware first, then to openslug. Feb 14 02:43:47 afair nope Feb 14 02:44:12 you can use the other tool Feb 14 02:44:45 osas, why not? at least I can see the 'Upgrade File' option in the web interface. Feb 14 02:44:50 I can't remember the name now :p long time since I flashed Feb 14 02:45:09 I remember that I had some issues ... Feb 14 02:45:10 If I just upload the openslug firmware there it should reboot into openslug, shouldn't it? Feb 14 02:45:13 search the wiki Feb 14 02:45:17 yep Feb 14 02:45:18 will do Feb 14 02:45:29 but using the other tool, is safe Feb 14 02:45:50 * osas is having three slugs Feb 14 02:52:10 osas is correct; the upgrade web page in unslung is not functional (never was intended to be, the bug is that it is still present). Feb 14 02:54:58 wspraul: BTW, this page might be helpful as well: www.nslu2-linux.org/wiki/Unslung/KnownProblems Feb 14 02:56:10 mwester, interesting, thanks. Hadn't come across that page yet. Feb 14 02:56:31 I will probably try OpenSlug tomorrow as you suggested. **** ENDING LOGGING AT Wed Feb 14 02:59:57 2007