Search Results: "reg"

3 September 2006

Marc 'Zugschlus' Haber: DHCP challenges

My notebook’s DHCP setup seems to be a challenge for DHCP servers around the world. Looks like almost no server implements the standard in a decently complete way. My notebook has a wired Fast Ethernet, and a wireless 802.11bg network interface. Of course, both interfaces have their own MAC address. I want the thing to work at least at home, regardless of whether wired or wireless is in use, with preferably the same static IP address, and on the office wired network, again, with the static IP address allocated to me there. Configuring this is considerably harder than I expected. At home, I am using a Linksys WRT54G router with OpenWRT, which has dnsmasq as DHCP server. Unfortunately, dnsmasq does not support the case where multiple MAC addresses are statically assigned to the same IP address: Only the first dhcp-host statement in the configuration file is honored, all others are ignored. So we need to resort to using a dhcp client-identifier. In DHCP request option number 61, the client can send an identifier, which the Server can then use to determine the client’s identity and assign a static IP address. The client identifier, according to RFC2132, is to be treated as an opaque string by the DHCP server. This works fine with dnsmasq, solving the issue at home. But it causes more grief in the office network. My office is the kind of place where a non-Microsoft solution is rarely considered. Thus, our network is fully buzzword compliant and the network infrastructure, including DNS and DHCP servers, is based on Windows Server System. I am the only one using a non-MS operating system in my work environment. When I plugged my notebook into the network this morning, I noticed that I didn’t receive my static IP address but a different one from the dynamic pool. After verifying that the Windows guys didn’t touch the DHCP server in the last days, I began to think what I changed locally and naturally remembered configuring the DHCP client identifier. Removed it for testing, got my normal static IP address, so the client identifier was quickly pinned down as the culprit. After my Windows colleagues decided that it must be a client issue, I began investigating how to configure the Windows DHCP server to honor a client identifier. MS Knowledge Base article #172408, “Custom DHCP Client Identifiers for Windows NT”, is a high hit on Google, but is like three years old and shows that somebody at MS has badly misunderstood the DHCP standard - they think that the Client Identifier is a 4 byte number in little endian order. I couldn’t believe that and investigated further. But it looks like the Windows DHCP server really cannot handle free-form client identifiers at all. I tried coding my free-form identifier in ASCII and entering it as MAC address, big endian, little endian, to no avail. So, I have come to the conclusion that MS has - again - only partly implemented a very important protocol for their network software. “Embrace and extend”, my <censored>, DHCP wasn’t extended at all. Looks like they stopped developing after the first developer box had successfully received an IP address, and shipped the resulting code. Woah. If somebody can tell me how to configure the Windows DHCP server to properly handle a free-form string DHCP client identfier, I’ll be most graceful for that information. I finally resorted to setting the DHCP client identifier of my notebook to the MAC address of the wired ethernet interface, which has at least brought my static IP address at the office back. I hope that the dnsmasq at home will successfully grok this or I am - again - back to square one. All software sucks

Marc 'Zugschlus' Haber: More personal stuff on Planet Debian

To keep non-Debian-related articles from showing up on Planet Debian, my blog used to have a Debian-English category which was subscribed to Planet Debian. This also meant that only English-Language, and Debian-related articles showed up there which made my kind of an irregular contributor. I’m going to change this. Recent Serendipity have the possibility to free-tag articles and generate RSS-Feeds for these tags. After using tags for a few weeks, I am now reasonably comfortable to put them to real use. A new tag planet-debian will be generated and subscribed to Planet Debian. And then I’m going to tag articles that I decide to put up to Planet Debian with this tag. To avoid old articles from showing up again, I’ll refrain from tagging them planet-debian. This also means that the “Debian-English” category is going to disappear and to be replaced by “Debian” (or even other categories). An additional tag “english” is going to appear on english language articles. So you can now choose whether you want to read only my english articles. btw, what’s the stance of Planet Debian about non-Debian articles and/or native language (in my case: German) on the Planet?

Eric Dorland: mozilla-firefox_1.0.4-2sarge11: Fix for Google Maps Regression

New mozilla-firefox packages to fix JavaScript regressions (#385452 and #385248) that caused 1.0.4-2sarge10 to crash when using Google Maps.

Please test these packages so they can swiftly be added to the security archive.

2 September 2006

Simon Richter: Xen and the art of uninterrupted service

I still have a small question regarding Xen: when migrating a guest from one physical machine to another, I need to migrate its IP address along with it. This is not a big deal when moving within a single network, but what happens when I need to move across the globe? The easiest thing I can think of would be extending the network bridge on the new machine with a tunnel that goes to an agent on the old machine; for that to happen, the old box would have to replace the guest with the agent as soon as the migration is complete. The agent would probably be provided by the guest (or at least the configuration, as the agent needs to know the network parameters)

Michael Janssen: Late at night when the wires in the walls

After my iBook problems last week, I tried to install Debian on the thing. I have narrowed down the problem to something with the hard drive inside, because the machine seems to run fine and go through most of the installation without any trouble, but once I start using the hard drive, it completely freezes. I successfully ran the hardware test disc which came with it a couple times in extended mode, but I'm not sure that it uses the hard drive in it's tests long enough for it to exhibit the problem. The failure seems to be somewhat random in nature, occuring at different times in the install process. Now I have the unhappy decision of trying to save this laptop which is more than 3 years old, or to attempt to buy a new one. Right now I am leaning toward buying a new one.

Honeywell seems 1.5 times as long this week, mostly because I'm making up for a day which I missed a couple weeks ago. Things have settled down there in terms of software failure, so I'm back at the normal coding which I am doing. The code uses Ogre, which is a handy 3d engine, making it much easier than learning something like OpenGL, and as a bonus adding portability. I am considering building some play applicaitons with the toolkit at home just because it would be fun.

Tonight I need to build a couple presentations covering some papers which were in CVPR this year to present at a reading group at Honeywell. It would be fine except that I am completely unaware of any of the recent history of vision research, so it makes it much harder to build the presentations. I hope I can finish them in a reasonable amount of time so I can watch Eureka tonight.

The TiVo Diet is still working out as expected. I discovered that I don't really have anything to watch on Sunday or Monday of the week. I'm getting much more productive work done than I used to. One downside of the diet is that I tend to not want to just sit and veg at the end of the work day - I think it frustrates [info]ceilingsarecool a bit because I'm always going off to the office to do something on the computer.

I recieved and watched the Studio 60 on the Sunset Strip yesterday. Being an Aaron Sorkin fan, I am excited for another of his shows to broadcast. Judging by the pilot, it should be a decent show.

Sidenote: Planet Debian seems to like one of my weekend weeviews a little too much, and is regrabbing it for the front page every so often. I can't figure out why this is happening, so any help would be greatly appreciated. Otherwise, in a couple more posts it should be off the RSS feed.

Adam Rosi-Kessel: Explosive-Sniffing-Dog

Via Dylan Thurston: Witness Stand. Important reminder regarding grammar.

1 September 2006

Roland Mas: Gforge in Debian, July 2006

Following about a month of irregular activity, I just uploaded three source packages (along with related binary packages, of course) to Debian unstable: gforge (4.5.14-9), gforge-plugin-scmcvs (4.5.14-3), and gforge-plugin-scmsvn (4.5.14-2). I hope unstable will give them more exposure than experimental did. Plans for the future: I ll focus on getting these packages into testing, without too many changes if possible. I haven t managed to get dbconfig-common to work reliably (or at all) with PostgreSQL so far, so I ll consider the migration to its infrastructure as a nice option, but not a blocker. The problem is that it would make the install scripts simpler and (hopefully) more reliable if it worked. Again, help would be very much appreciated. (And yes, I will be submitting bug reports when I get some time to do some more thorough testing of dbconfig-common.)

Jesus Climent: No smoking policy.

Ever since my mother died I started smoking. Not much, not regularly. But as today, my 100000th birthday, I quit. No more nicotine for me. It will be hard, but I need to make it.

Erich Schubert: Busy with life

Today, I've been quite busy with "real life". First of all, I retrieved keys for my new room (see below), and was busy half of the day with packing stuff. Around noon, I had to go to a funeral. A friend of mine has died, most likely from cancer (maybe smoking-related, I don't know). He was very active for a NPO helping people with the internet. We'll really miss him there, too. In the afternoon I packed more of my stuff together, bought some new things; then took a break to go dancing - I started taking a Balboa class today - and finally took most of my stuff to my new room. Until around midnight I was cleaning the room, fighting the "malfunctioning" doors of the huge wardrobe and moving stuff in. Tomorrow I'll probably spend my first night in the new room. Picture of the plain room This is a shot of the new room. I don't have a wide angle lense, so that is the best I could do (I have the lens on my Amazon Wishlist, but it's horribly expensive...). It's the plain room, nothing of my stuff in there yet. The first thing I did was putting up some nice yellow curtains, to add some color. The flash makes some funny light effects with the mirrors of the wardrobe on this picture. ;-) The room isn't huge, but it's well done. The bed fits in behind the door, a desk will fit next to the bed, and there is this huge wardrobe. The mirrors on it make the room appear larger and brighter. Now with some sunny colors this will be a room I can enjoy. I'll probably post another picture when I've added some more color to the room. I have a couple of nice computer artworks printed out to hang to the walls. Oh, and the linux sourcecode poster. ;-) (No, I probably won't put that one up. It's mostly gray. It wouldn't match the room. It will be interesting how my life will change the next months. I'll be doing a lot more dancing - I intend to join a Boogie sports club, learn Balboa and Boogie and train Lindy Hop - and since I'll be living closer to the city, I expect to go out more. And I hope the people I'll live with in that house are fun, so we'll be spending some time together. We have a pool table and a dart board in the living room, and a perfect spot for placing a projector. Also since I've passed my final exams, I'll now focus on my final thesis. My topic is about semantic wikis [wikipedia.org], at my university and a research institute. The last months, I had been rather bored with university life; the thesis will likely set the course for the next few years of my life: research, entrepreneurship or just working at some larger company.

30 August 2006

Erich Schubert: Ubuntu forums

Yes, I've been quite unfair to Ubuntu forums. While I'd still prefer if they (= not Canonical; Ubuntu forums is just affiliated) would enable some searching for non-registered users, I have to accept that they only have limited hardware resources. And of course I'd like to see them using Opensource Software for their forum. When they enabled searching apparently they were flooded with requests. This goes so far that there are even rumors about a DDoS launched against their search functionality (the mails I received from UbuntuForum admins did not contain this claim). UbuntuForums definitely is a huge forum. The front page says "Threads: 243,764, Posts: 1,440,895, Members: 160,228, Active Members: 121,548". Well, 1.4 million posts definitely is a load of data to search in. I don't know if phpBB and similar opensource forums can handle these numbers (I have very little trust in any PHP solution, as you might now, and I dislike phpBB a lot). However I believe they're more likely to receive support by their developers for modifying the forum to handle such numbers. If they actually perform worse (which I don't know. Has anyone resources on the performance of different forum solutions with huge user and post numbers?) Maybe they're just hidding limitations of vBulletin now, too. I could imagine they need to replace the built-in search functionality (which I guess is MySQL-based) with e.g. a lucene based search. This should also allow better distribution of the system onto multiple computers. Anyway, I didn't mean to flame the Ubuntu community that much. It's just that the forum lost the one essential function for me this way - searching if the answer to my question is somewhere in there. (And yes, I know that registering isn't hard, and that they don't even verify the email address.)

Martin F. Krafft: Using LVM snapshots for filesystem recovery

This morning, I found myself in Gunnar's position and was looking at an empty /home directory because of the following mount failure:
piper:~# mount /dev/mapper/vg0-home
mount: Unknown error 990
Starting XFS recovery on filesystem: dm-0 (logdev: internal)
Filesystem "dm-0": xfs_inode_recover: Bad inode magic number, dino ptr =
  0xffff810028a6bd00, dino bp = 0xffff81002851d140, ino = 33629
Filesystem "dm-0": XFS internal error xlog_recover_do_inode_trans(1) at
  line 2352 of file fs/xfs/xfs_log_recover.c.  Caller 0xffffffff88307729
I am used to XFS giving me hard times, but this time at least I didn't have much to worry as it happened at home, I have plenty other machines I can use instead, and all data was backed up. Since this is on a Debian unstable machine, I had the latest xfs_repair available, and told it to do its thing, but it refused:
piper:~# xfs_repair /dev/mapper/vg0-home
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
Great. Catch-22. I decided to have a go at fixing it, but as much as I pretended to grok xfs_db, I did not manage to get the filesystem into a consistent state. I thus fired off an email to the mailing list (which has not arrived there 4 hours later) and started pv to dump the raw data to another machine for later use or debugging. Watching the progress meter of pv from time to time, it occured to me that my /home is in fact on LVM. I put it on LVM way back when LVM was new and cool and I wanted to gather experience with it. I've never actually done anything with it, but today it saved my little bits of remaining sanity. Why? Because LVM can take snapshots of volumes. It took me a while to put the pieces together, but in the end, a snapshot would enable me at least to run a test-round of xfs_repair -L and assess the damage, and if it wasn't all that bad, I could just run the repair process on the actual volume again. With the encouragement and knowledge of Christian Aichinger and Daniel J. Priem on IRC, I hence proceeded to give it a try. First I had to extend the volume group to make room for the snapshot data, and since I had no disks handy, I just used a loop device based on a sparse file:
dd if=/dev/zero of=/srv/loop bs=1 count=1 seek=5368709120
losetup -f /srv/loop
pvcreate /dev/loop0
vgextend vg0 /dev/loop0
lvcreate -s -n home-snapshot /dev/vg0/home -L 5G
(Thanks to Ian Nicholls for spotting the error: I was using pvcreate instead of that last lvcreate previously). Now /dev/vg0/home-snapshot was a copy-on-write snapshot of the original volume, and I could do whatever I wanted with it, as long as I did not exceed the 5G size allotted for the copied data blocks that I modified. Using mount and xfs_repair, I could verify that the problem also shows up with the snapshot. Thus, I ran xfs_repair -L on the snapshot and finally was able to mount the snapshot to inspect the /lost+found directory. Fortunately, it wasn't all that full, nor was there anything important in there, so I sighed, removed the snapshot (lvremove) and unleashed xfs_repair -L on the original volume, which is now again mounted under /home. Finally, remove the loop device from the volume group (vgreduce). If you are like me and forgot to do so before rebooting and now find your LVM volumes not starting anymore, look into the --removemissing option. I like this method. I knew the filesystem was corrupted, but I did not know to what extend. Had corruption been worse, I could have waited for the XFS guys to help me out. But seeing the low damage, I was able to decide to just purge the journal and accept the damage. If this had happened on a more important machine (i.e. without recent backups), I would have proceeded a bit differently: once the snapshot was mounted, I'd have run xfs_dump on it to save the data. I would also have used more space for the snapshot and not removed it until the parent volume was repaired and mounted. It's unlikely that xfs_repair will produce different results when run on a volume and its snapshot, but better be safe than sorry. All this said, I just want to point out that the above method is filesystem independent and hence would work for any filesystem out there. I've never been a big fan of LVM, especially without RAID to build on (striping across physical media multiplies your chance of data loss), but this method is a good reason for using LVM regardless: use a volume group instead of your physical disk, and logical volumes instead of partitions, but don't span disks (unless you have to). Then, if stuff goes bad, you can hook in another disk, extend the volume group with it, and work on snapshots.

Lars Wirzenius: Debian Inquirer: A Royal Mess: Debian Fights Queen

Queen Elizabeth II and the Debian project threaten religious warfare! D-Inq has today uncovered a conflict between the Debian Project and the queen of England and other places. The row is over the King James Version of the Bible. "It's all mine! Mine! Mine!" the monarch told D-Inq in an exclusive interview. "Keep yer dirty fingers off it or I'll sick the SAS on you." In the UK, the monarch owns the copyright for the KJV Bible, but the Debian project wishes to distribute it freely. The SAS, UK's elite fighting force and the Queen's personal mob, is already gearing up. Instead of their usual arsenal of guns and bombs, they're opting to use a new kind of weapon, the DD Attitude Readjustment Tool, or DART. The Debian Project is undaunted. "We've seen worse, this is a pedestrian transport in a big grassy place in comparison" says a Debian flame war veteran, Steve, 22, from Portland, Oregon. "The SAS is nothing compared to a vigorous discussion about firmware freeness. It's not even as bad as someone spoiling the next episode of B5." Things might get more difficult, though. There are rumors that MI5 has already infiltrated Debian's discussion forums. Worried analysts imply that some of the recent, divisive developments within the project are the result of agent provocateurs. "The new Python policy is one", says Lars W, an analyst who wishes to remain nameless. "No sensible person would have done things like that", he continues. While both sides ramp up their fighting forces, local constabulary in many English towns has already started to confiscate and deport machines running Debian to Libya. Time will tell when they will return.

Uwe Hermann: LinuxBIOS Symposium 2006 Europe

For everybody who might be interested in this kind of stuff: the LinuxBIOS project's annual LinuxBIOS Symposium will take place October 1st-3rd, 2006 in the nice German city Hamburg. In the light of the recent discussions about "sourceless firmware" and similar issues in Debian, some people might be interesting in helping with (or at least getting informed about) a practical project related to this - a free (GPL'd) BIOS replacement. It's quite likely that some OLPC people will be there, too, as the OLPC (One Laptop Per Child) project employs LinuxBIOS on their hardware... Deadline for workshop and talk proposals is September 10th (if you should plan to give a talk), and a preliminary agenda is already available online. The registration process has also recently started (deadline is September 11th). See this post for the full announcement. Now, if I manage to somehow gather a reasonably large amount of Euros, I'll probably be there.

29 August 2006

Erich Schubert: Trying to get compiz working on Debian

I'm trying to get compiz working on Debian. The xorg packages in experimental include AIGLX, so I hoped this would be rather easy... and indeed, just a small tweak to xorg.conf ("Composite" "enable") and I seem to have everything I need:
> glxinfo
[...]
direct rendering: Yes
 [...] GLX_EXT_texture_from_pixmap, [...]
OpenGL renderer string: Mesa DRI Radeon 20060327 AGP 8x TCL
OpenGL version string: 1.3 Mesa 6.5.1
[...]
So I build a recent compiz (post 0.0.13, from git), and also grab a patch which supposedly adds AIGLX support. After restarting my Xserver and logging into gnome I see this: Compiz screen corruption Quite disappointing. Some window borders are drawn, some background, then all drawing is stopped. Looks to me as if the driver freezes. CPU load is 0%, I can switch to the text console, but when I switch back the screen completely freezes. I still see my text console contents, but can neither switch back to text console or to the X server. The only way to get my system into a usable state again is to login via ssh and killall -9 Xorg. It's very plausible, that this is an issue with my graphics card. It's an Radeon Mobility FireGL 7800 M7 (RV200 series). Apparently not the best of their products: the official ATI Linux driver doesn't support it. But the opensource driver works fine, I have 3D acceleration at 1600x1200. Anyway, if someone has more success with compiz without using Xgl or proprietary drivers, I'd welcome pointers. [Update: if I recall correctly, the results with Xgl on this machine were the same, some window borders were drawn, but it was otherwise unusable] I don't care about wobbly windows and similar gimmicks - but I'd like to benefit from off-screen rendering for faster desktop switching.

Erich Schubert: Keeping your users out.

Today I was trying to find some information in the Ubuntu forums. I'm seriously annoyed. There was one thread that seemed relevant, but it has some 310 pages. Yes, thats over 3000 posts. Unfortunately, Ubuntu (and I consider this arrogant behaviour) doesn't allow you to search the forum or access attached images if you are not registered. I can understand things like spam protection. But WTF do you require registration for searching? I mean... I was trying to find out if the Ubuntu community could help, and all I get is "register first"!? Thats pure harrasment of non-registered users. I don't think I'll bother to remember another username and password just for their crappy forums. I hate forums anyway. And the size of that thread just shows that forums don't scale well. Especially if you can't search. [Update: yes, I've been a bit harsh here. The front page says that they're experiencing speed issues, and thus have disabled search within the forum. Actually I can't believe that search requests make such a huge load (especially compared to me browsing a 30-page thread...) - but maybe their search function is just implemented badly? I wouldn't be surprised if they do some huge SELECT to search, and don't have an index optimized for text searching. Maybe they shouldn't be using a closed source software for running their forum. I guess they could just fix the search functionality then. If opensource software doesn't meet their requirements, they're bound to get some support by the community to make the software meet them, if vBulletin actually is better in some points. IMHO vBulletin sucks. And given the speed issues "it is what the admin prefers" might miss some important point - that at some point you can't just keep getting a larger CPU]

28 August 2006

Jordi Mallach: Thank you for the problem report you have sent regarding Debian.

Our user manuals encourage all newcomers to the Free Software community to file bugs when they find incorrections and bugs in a package. Of course, there's always some people who take it too far (!). Get prepared, DeFuBu challengers!

Lars Wirzenius: Random thoughts: Thoughts, random

These thoughts are somewhat more random than usual. I have an urge to start a business. This is going to require reduction in my Debian commitments. To begin with, I'll unsubscribe from -devel and -project, and probably -vote. I hope I won't need to drop any packages. Who knows, not reading the might even re-motivate me on doing Debian stuff. I might even start taking the new Python policy seriously and disregard that it seems to make everyone stupid. Tallinn, Estonia, is pretty. Or at least the Old Town is, I haven't visited anything else. The two Italian cats I met in Tallinn were very pretty, too. Coming up with names for programs and companies is quite difficult at times. I want something that Google can easily find; I don't want to repeat the SeX mistake again. My photography hobby is rather dormant. It's so dormant, I can't even justify buying a new camera. This doesn't motivate me to work on Lodju, my photo organizer, unfortunately. It'd be cool to find someone who would really like to work on it. There's a few basic decisions I've made that prevent me from jumping on the F-Spot bandwagon. It's raining. It's finally raining. This summer is finally complete. Just in time for autumn. "Getting Things Done" might actually work for me. It feels weird, though, to seriously read self-help books where the author keeps reminding the reader on every second page about his twenty years of management consulting experience. If it had been a web page, I'd have closed the tab. I need to seriously think about having more fun. All work and no play makes liw a raving, raging, violent lunatic.

Axel Beckert: Goodbye Woody, Welcome Sarge (Penultimate Part)

Since security support for Woody ceased recently, and with Kazehakase I’ve found a reasonable successor in Sarge for Galeon 1.2.x, I’ve dist-upgraded my 10 years old Pentium I ThinkPad bijou to Sarge this weekend. Even the XFree86 4, which made so much hassles in Woody by not regcognising nor configuring the graphics card correctly, worked fine from scratch. Well, at least after installing xfonts-base and xfonts-75dpi — the -transcoded versions somehow gave only the error message “default font ‘fixed’ not found”. So goodbye Galeon, goodbye GNU Emacs 20, goodbye XFree86 3.3. I hope, I won’t miss you. Only my desktop gsa at home still runs Woody, but will be dist-upgraded soon, too. What though still stayed on my laptop from Woody is Siag Office, since there is no adequate replacement for such a nice office suite with such a low resource footprint. But it has also an impact on the talks I hold. I held all talks with a patched version of lynx (e.g. with LSS support) as presentation tool on that laptop because initially I didn’t get X running on that box. What started as a makeshift became my hallmark… But I didn’t manage to get Sarge’s lynx patched so that it gives me the same output as my old version did. So either I would have to reoptimise the layout of my talks for a new lynx version or just start with something new. Madduck recently showed me python-docutils, which he uses for presentations. Maybe I’ll use that although I have a severe aversion against Python. So it may also be that I’ll stick with WML, but get some new ideas from python-docutils how to use HTML for presentations. Update: Found out that the interesting part of his presentation technic wasn’t python-docutils but S5: A Simple Standards-Based Slide Show System which in entirely written in XHTML, CSS and JavaScript. S5 is really cool stuff, one of the first cases of useful use of JavaScript, and will surely be used for my next presentation — with Debian Sarge and Kazehakase on a Pentium I ThinkPad. ;-)

27 August 2006

Russell Coker: Linux on the Desktop

I started using Linux in 1993. I initially used it only in text-mode as I didn't have enough RAM to run XFree86 on my Linux machine. I ran text-mode Linux server machines from 1993 to 1998. In 1998 I purchased my first laptop and installed Linux with KDE on it. I chose KDE because it had the greatest similarity to OS/2 which I had used as my desktop OS prior to that time. At the same time I purchased an identical laptop for my sister and gave her an identical configuration of Linux and KDE.<br /><br />Running a Linux laptop in 1998 was a lot harder for a non-technical person than it is today. There was little compatability with MS file formats and few options for support for Internet connections and third-party hardware and software (most things worked but you needed to know what to do). One advantage of using Linux in this regard is that the remote support options have always been good, I was able to fix my sister's laptop no matter which country she was in and which country I was in. Her laptop kept working for more than 5 years without the need for a reinstall (try that on Windows).<br /><br />It was when VMWare first became available (maybe 2000) that I converted my parents to using Linux. At first they complained a bit about it being different and found VMWare less convenient than the OS/2 <span style="font-style: italic;">Dos box</span> for running their old DOS programs. But eventually they broke their dependence on DOS programs and things ran fairly smoothly. There were occasions when they complained about not having perceived benefits of Windows (such as the supposed ability to plug in random pieces of hardware and have things all work perfectly). The fact that using OS/2 and then Linux has given them 14 years of computer use with no viruses and no trojans tends to get overlooked.<br /><br />Of recent times the only problem that my parents have experienced is when they bought a random cheap printer without asking my advice. The printer in question turned out to not work with Fedora Core 4, but when Fedora Core 5 came out the printer worked. Waiting 6 months for a printer upgrade isn't really a serious problem (the old printer which had worked 6+ years was still going strong).<br /><br />My parents and my sister now have second-hand P3 desktop machines running Fedora. P3 CPUs dissipate significantly less heat than P4 and Athlon CPUs, this significantly reduces the risk of hard drives dying when machines are left on in unairconditioned rooms as well as saving money on electricity. For the typical home user who doesn't play 3D games there is no real need for a CPU that's more powerful than a 1GHz P3. This of course means that there is less need for me to reinstall on newer hardware which also means more reliability.<br /><br />I always find it strange when people claim that Linux isn't ready for the desktop. I provide all the support for three non-technical users of Linux on the desktop and it really doesn't take much work because things just work. Corporate desktops are even easier, in a company you install what people need for their work and don't permit them to do anything different.<br /><br />It seems to me that Linux has been ready for the desktop since 1998.

26 August 2006

Scott James Remnant: Upstart in Universe

upstart is a replacement for the init daemon, the process spawned by the kernel that is responsible for starting, supervising and stopping all other processes on the system. The existing daemon is based on the one found in UNIX System V, and is thus known as sysvinit. It separates jobs into different “run levels” and can either run a job when particular run levels are entered (e.g. /etc/init.d/rc 2) or continually during a particular run level (e.g. /sbin/getty). The /etc/init.d/rc script is also based on the System V one (and is in the sysv-rc package), it simply executes the stop then start scripts found in /etc/rcN.d (where N is the run level) in numerical order. Why change it? Running a fixed set of scripts, one after the other, in a particular order has served us reasonably well until now. However as Linux has got better and better at dealing with modern computing (arguably Linux’s removable device support is better than Windows’ now) this approach has begun to have problems. The old approach works as long as you can guarantee when in the boot sequence things are available, so you can place your init script after that point and know that it will work. Typical ordering requirements are: This worked ten years ago, why doesn’t it work now? The simple answer is that our computer has become far more flexible: We’ve been able to hack the existing system to make much of this possible, however the result is chock-full of race conditions and bugs. It was time to design a new system that can cope with all of these things without any problems. What we needed was an init system that could dynamically order the start up sequence based on the configuration and hardware found as it went along. Design of upstart upstart is an event-based init daemon; events generated by the system cause jobs to be started and running jobs to be stopped. Events can include things such as: In fact, any process on the system may send events to the init daemon over its control socket (subject to security restrictions, of course) so there is no limit. Each job has a life-cycle which is shown in the graph below: The two states shown in red (“waiting” and “running”) are rest states, normally we expect the job to remain in these states until an event comes in, at which point we need to take actual to get the job into the next state. The other states are temporary states; these allow a job to run shell script to prepare for the job itself to be run (“starting”) and clean up afterwards (“stopping”). For services that should be respawned if they terminate before an event that stops them is received, they may run shell script before the process is started again (“respawning”). Jobs leave a state because the process associated with them terminates (or gets killed) and move to the next appropriate state, following the green arrow if the job is to be started or the red arrow if it is to be stopped. When a script returns a non-zero exit status, or is killed, the job will always be stoped. When the main process terminates and the job should not be respawned, the job will also always be stopped. As already covered, events generated by the init daemon or received from other processes cause jobs to be started or stopped; also manual requests to start or stop a job may be received. The communication between the init daemon and other processes is bi-directional, so the status of jobs may be queries and even changes of state to all jobs be received. How does it differ from launchd? launchd is the replacement init system used in MacOS X developed as an “Open Source” project by Apple. For much of its life so far, the licence has actually been entirely non-free and thus it has only become recently interesting with the licence change. Much of the goal of both systems appears initially to be the same; they both start jobs based on system events, however the launchd system severly limits the events to only the following: Therefore it does not actually allow us to directly solve the problems we currently have; we couldn’t mount filesystems once the “filesystem checked” event has been recived, we couldn’t check filesystems when the block device is added and we certainly couldn’t start daemons once the complete filesystem (as described by /etc/fstab) is available and writable. The launchd model expects the job to “sit and wait” if it is unable to start, rather than provide a mechanism for the job to only be started when it doesn’t need to wait. Jobs that need /usr to be mounted would need to spin in a loop waiting for /usr to be available before continuing (or use a file in a tmpfs to indicate it’s available, and use that modification as the event). This is not especially surprising given that Apple have a high degree of control over both their hardware and the actual underlying operating system; they don’t need to deal with the wide array of different configurations that we have in the Linux world. Had the licence been sufficiently free at the point we began development of our own system, we would probably have extended launchd rather than implement our own. At the point Apple changed the licence, our own system was already more suitable for our purposes. How does it differ from initng? Initng by Jimmy Wennlund is another replacement init daemon intended to replace the sysvinit system used by Linux. It is a dependency-based system, where upstart is an event-based system. The notion of a dependency-based system is interesting to talk about at this point. Jobs declare dependencies on other jobs that need to happen before the job itself can be started. Starting the job causes its dependencies to be started first, and their dependencies, and so on. When jobs are stopped, if running jobs have no dependencies, they themselves can be stopped. It’s a neat solution to the problem of ordering a fixed boot sequence and the problem of keeping the number of running processes to a minimum needed. However this means that you need to have goals in mind when you boot the system, you need to have decided that you want gdm to be started in order for it, and its dependencies, to be started. Initng uses run levels to ensure this happens, where a run level is a list of goal jobs that should be running in that run level. It’s also not clear how the dependencies interact with the different types of job, a dependency on Apache would need the daemon to be running where a dependency on “checkroot” would need the script to have finished running. Upstart handles this by using different events (“apache running” vs. “checkroot stopping”). Again while interesting, Initng does not solve the problems that we wanted to solve. It can reorder a fixed set of jobs, but cannot dynamically determine the set of jobs needed for that particular boot. A typical example would be that if the only dependency on the job that configures networking is the mount network filesystems job, then should that job fail or notbe a goal (e.g. because there are no network filesystems to be mounted) the result is that network devices themselves will not be configured. You could make everything a goal, and just use the dependencies to determine the order, however this is less efficient than just ordering the existing sysv-rc scripts (which
can be done at install time). Another example is that often you simply don’t know whether something is a dependency or not without reading other configuration, for example the mount network filesystems may be a dependency of everything under /usr or may just be a dependency of anything allowing the user to login if it just mounts /home. The difference in model can be summed up as “initng starts with a list of goals and works out how to get there, upstart starts with nothing and finds out where it gets to.” How does it differ from Solaris SMF? SMF is another approach to replacing init developed by Sun for the Solaris operating system. Like initng it’s a dependency-based system, so see above for the differences between those systems and upstart. SMF’s main focus is serive management; making sure that once services are running, they stay running, and allowing the system administrator to query and modify the states of jobs on the system. Upstart provides the same set of functionality in this regard, services are respawned when they fail and system administrators can at any time query the state of running services and adjust the state to their liking. Will it replace cron, inetd, etc? The goal of upstart is to replace those daemons, so that there is only one place (/etc/event.d) where system administrators need to configure when and how jobs should be run. In fact, the goal is that upstart should also replace the “run event scripts” functionality of any daemon on the system. Daemons such as acpid, apmd and Network Manager would send events to init instead of running scripts themselves with their own perculiar configuration and semantics. A system administrator who only wanted a particular daemon to be run while the computer was on AC power would simply need to edit /etc/event.d/daemon and change “on startup” to “on ac power”. What about compatibility? There’s a lot of systems administrators out there who have learned how Linux works already and will not want to learn again immediately, there’s also a large number of books that cover the existing software and won’t cover upstart for at least a couple of years. For this reason, compatibility is very important. upstart will continue to run the existing scripts for the forseeable future so that packages will not need to be updated until the author wants. Compatibility command-line tools that behave like their existing equivalents will also be implemented, a system administrator would never need to know that crontab -e is actually changing upstart jobs. Does it use D-BUS?
“To D-BUS people, every problem seems like a D-BUS problem.”
—Erik Troan
The UNIX philosophy is that something should do just one job, and do it very well. upstart’s one job is starting, supervising and stopping other jobs; D-BUS’s one job is passing messages between other jobs. D-BUS does provide a mechanism for services to be activated when the first message is sent to them, thereby starting other jobs. Some people have taken this idea and extended it to suggest that all a replacement init system need do is register jobs with D-BUS and turn booting into a simple matter of message parsing. This seems wrong to me, D-BUS would need to be extended to supervise these services, provide means for them to be restarted and stopped; as well as deal with being process #1 which means cleaning up after children whose parent’s have died, etc. It seems far simpler to arrange for D-BUS to send an event to init when it needs a service to be started, and focus on being a very good message passing system. The IPC mechanism used by upstart is not currently D-BUS because of various problems, however it’s always been expected that even if init itself doesn’t communicate with D-BUS directly, there would be a D-BUS proxy that would ensure messages about all init jobs and events would be given to D-BUS and D-BUS clients could send messages to init to query and change the state of jobs. What is the implementation plan? Because this is process #1 we are changing, we want to make sure that we get it right. Therefore instead of releasing a fully-featured daemon and configuration to the world, we’re developing it in the following stages:
  1. Principal development; at the end of this stage the daemon has been implemented and can manage jobs as described.
  2. Replacement of /sbin/init while running the existing sysv-rc scripts. This is the shake-down test of the daemon, can it perform the same job as the existing sysvinit daemon without any regressions?
  3. /etc/rcS.d scripts replaced by upstart jobs. These consitute the majority of tasks for booting the system into at least single-user mode, and contain many of the current ordering problems and race conditions. If the daemon solves the problems here, it will be a success.
  4. Other daemon’s scripts replaced by upstart jobs on a package-by-package basis; this will be an ongoing effort during which upstart will continue running the existing sysv-rc scripts as well as its own jobs. During this time the event system may be tweaked to ensure it truly solves the problems we need.
  5. Replcement of cron, atd, anacron and inetd. This will happen alongside the above and result in a single place to configure system jobs.
  6. Modification of other daemons and processes to send events to init instead of trying to run things themselves.
The current plan is that we will be at least part of the way into stage #3 by the time edgy is released, with that release shipping with upstart as the init daemon and the most critical rcS scripts being run by it to correct the major problems For edgy+1 we hope to have completed stage #5 and be at least part of the way into the implementation of stage #6. From the start of development of edgy+2, no new packages will be accepted unless they provide upstart jobs instead of init scripts and init scripts will be considered deprecated. What state is it in now? The init daemon has been written and is able to manage jobs as described above, receiving events on the control socket to start and stop them. This has now been uploaded to the Ubuntu universe component in the upstart package for testing before it becomes the init daemon. We welcome any experienced users who want to help test this; install the package and follow the instructions in /usr/share/doc/upstart/README.Debian to add a boot option that will use upstart instead of init. If your system boots and shut downs normally (other than a slightly more verbose boot without usplash running) then it is working correctly. Other types of events will be added as required during development and testing. Currently only a basic client tool (initctl) has been written, compatibility tools such as shutdown will be written over the next week or two before it replaces our sysvinit package.

Next.

Previous.