Search Results: "tb"

3 September 2006

Marc 'Zugschlus' Haber: Why translate Debian stuff to German?

Disclaimer: I am not comfortable with technical documents in my native language, German. I generally find German translations of technical stuff clumsy, overly complicated and badly worded. I might have a “special” feeling for the language, but some output of translators is just too bad to tolerate.For example, I constantly keep stumbling over the german translation of the Debian security team FAQ, which I consider horrendously badly done. Especially the use of the german word “Gutachten”, which basically means “opinion” in the legal sense (as the document produced by an expert called by a court of law) to translate “advisory” is a very very bad choice. My toes curl when I read the german version.In April 2005, I suggested to the German translation team to review the translation of the security team FAQ. I might not have chosen the right wording for that request, but besides a lot of flamage and “the translation is just fine”, I received the usual “send a patch”. Which I did in April 2005.No answer. In October 2005, I asked again, and received answer from the translator that my patch was just too intrusive. Well, a bad translation was rewritten, and the bad translation is still being used.Consequences for me? I’m not going to bother any more about German translations. English is just fine, and when somebody needs a German translation, I’m going to translate the stuff myself. Pointing people to the official German translations is just too embarrassing. A pity.

Marc 'Zugschlus' Haber: about bug reporters reporting bugs against reportbug

The last days, Debian suffered a bug in the reportbug package which made it fail in postinst. This bug was promptly fixed, but reported like THIRTEEN times as a bug in the BTS. If I were reportbug maintainer, I’d have gone ballistic at this ignorance of bug reporters. Guys, all of you who have reported this bug are running Debian unstable, an unreleased development version of your distribution. Is it asking too much to follow basic etiquette to look in the BTS whether a fatal bug might already been reported? I mean, THIRTEEN nearly identical reports?

Marc 'Zugschlus' Haber: No more sl-modem-modules for me

A few months ago, I have reported about getting the winmodem in my hp compaq nc 8000 to work. Aside from the abysmally slow performance, the dependency on out-of-tree, non-free modules has been cause of grief since it has almost constantly forced me to keep an outdated kernel version around just in case that I would need the modem. Fortunately, this is over now since more recent kernel versions (I suspect somewhere in the 2.6.16 era) support my winmodem natively without out-of-tree modules. All I need to get only on a POTS line is sl-modem-daemon, which is reasonably painless.

Russell Coker: RAID etc

On a closed mailing list someone wrote:<br /><span style="font-style: italic;">2 X 120gb ide drives installed as slaves on each ide channels. ... Presto. A 230'ish GB storage NAS for all my junk.</span><br /><br />I'm not going to write a long technical response on a closed list so I'll blog about it instead.<br /><br />Firstly I wonder whether by "junk" the poster means stuff that is not important and which won't be missed if it goes away.<br /><br />If P is the probability of a drive not dying in a given time period (as a number between 1 being certain death and 0 an immortal drive) then the probability of serious data loss is P^2 for the configuration in question.<br /><br />If P has a value of 0.5 over the period of 7 years (approximately what I'm seeing in production for IDE drives) then your probability of not losing data over that period is 0.25, IE there's a 75% chance that at least one of the drives will die and data will be lost.<br /><br />If the data in question really isn't that important then this might be OK. About half the data on my file server consists of ISO images of Linux distributions and other things which aren't of particularly great value as I can download them again at any time. Of course it would be a major PITA if a client had a problem with an old distribution and I had to wait for a 3G download to finish before fixing it, this factor alone makes it worth my effort in using RAID and backups for such relatively unimportant data. 300G IDE and S-ATA disks aren't that expensive nowadays, if buying a pair of bigger disks saves you one data loss incident and your time has any value greater than $10 per hour then you are probably going to win by buying disks for RAID-1.<br /><br />As another approach, LVM apparently has built-in functionality equivalent to RAID-1. One thing I have idly considered is using ATA over Ethernet with LVM or GFS to build some old P3 machines into a storage solution.<br /><br />P3 machines use <a href="http://www.coker.com.au/energy/computer-power.html">38W of power</a> each (with one disk, maybe as much as 70W with 4 disks but I haven't checked) and should have the potential to perform well if they each have 4 IDE disks installed. That way a large number of small disks could combine to give a decent capacity with data mirroring. Among other things having more spindles decreases seek times when under heavy load. If you do work that involves large numbers of seeks then this could deliver significant performance benefits. If I had more spare time I would do some research on this, it would probably make for a good paper at a Linux conference.

2 September 2006

Russell Coker: root-kits on robots

<a href="http://www.365tomorrows.com/08/18/rootkit/">This story</a> on <a href="http://www.365tomorrows.com/">365tomorrows.com</a> on the topic of rootkits is interesting (note the OSs involved). Also it made me wonder about the other possibilities for a root-kitted robot, the mind boggles at how it might determine whether you need an enlargement to some body part...<br /><br />365tomorrows is a good site, they post a short sci-fi story every day and it's all free (paid for by merchandise and AdSense). When you read the storys make sure you check out the AdSense links, it's sometimes rather amusing when Google gets some unusual interpretations of sci-fi storys and supplies adverts to match, I don't think that AdSense was designed to work well with fiction.

1 September 2006

Martin Zobel-Helas: Starting with Sarge r4 preparation early

After Sarge r3 is pushed out to the mirrors now, i thought it might be a good idea to start with the preparation of Sarge r4 early, thus i already started accepting packages into proposed-updates again.
Release of r4 is currently scheduled around October 16th, but that may vary a bit, depending on packages uploaded to proposed-updates and on the DSAs issued in the mean time. Happy hacking… :-)

Andrew Pollock: [opinion] A ramble about alternative energy and world affairs

Well John Howard said he wanted to start a nuclear debate in Australia. Seems it has already started on Planet Linux Australia. I figure I might as well have a meandering blog post about alternative energy and current world events, since I've just been immersing myself in the best news I can obtain with my crappy cable package in a country not renowned for its awareness of world affairs. Firstly, since there's been talk about nuclear power, I'd like to offer my thoughts on Iran, and how it's sounding like Iraq all over again. People are getting in a flap about Iran enriching uranium. Iran says that they don't want "the bomb", they only want nuclear power to meet their energy demands. Now if this is true, then surely should applaud a country that sits on a chunk of the Middle East's oil reserves looking to use something other than oil for its energy needs. I for one don't know if you need to "enrich" uranium to use it for a nuclear reactor, or whether it's good enough "as is". But let's just assume that Iran's intentions are as they have said, then it's going to be Iraq all over again. The US said Iraq had weapons of mass destruction. The US is saying Iran is enriching uranium for the purposes of making a bomb. So far the former claim hasn't been proven, so what's to say the latter is true either? Let's say the nuclear debate in Australia determines that it'd be a good a thing for Australia to go nuclear. How is Australia enriching uranium for electricity generation any different to Iran doing it? (Other than Australia is in the Coalition of the Willing, and Iran is in the Axis of Evil). Speaking of Iran being in the Axis of Evil, how is Iran supplying weapons to Hezbollah fundamentally any different to the US supplying weapons to Israel? Oh, and is anyone allowed to criticise Jewish people without being called anti-Semitic? Since when is invading a neighbouring country considered okay? I am so glad Australia is an island nation. These countries with land borders, sheesh... Anyway, back to alternative energy. I'm a greenie, (with a lowercase "g") so I'm open to nuclear power, but it does frighten the willies out of me, with things like Chernobyl. I'd never heard of a Pebble Bed Modular Reactor until Paul wrote of it. It certainly sounds safer than previous methods of nuclear reaction. But of alternatives. Wind, for example, doesn't need to be big and arguably ugly. These guys in the UK have made a very sexy and quiet wind turbine. I don't know how it stacks up in terms of cost or output to the traditional three-bladed wind turbines like what I've photographed in Southern California, but they're supposed to be quiet, which is apparently one of the (many) arguments that landowners like farmers have against wind generation in general. This Australian company has come up with a very small, but less sexy wind turbine, that I believe to be fairly cheap. Finally, in terms of generation, and I've written about this before, but I find the Tower of Power to be a fascinating concept in natural energy generation. Where am I going with this ramble? No idea. I do think rapidly developing countries like China should completely leapfrog over the era of oil and move to renewably generated electricity. Maybe they can get the manufacturing costs down of the equipment, and it'll be less of a big deal in terms of cost for the rest of the world to adopt it. Whew. What a ramble. Don't start me on flushing toilets with drinking water.

31 August 2006

Martin F. Krafft: News from the NetBSD cabal

I thought this mail about the current state and future of NetBSD (via /.) was an interesting read, and one relevant to Debian not only because of our Debian NetBSD port. In particular, it felt good to be able to say "yeah, we've got that" to some of the points Charles raised. However, I also had to concede that we're short in some of the other points. I won't put numbers to these claims because it's not as black and white as this. What would be really great is if one of the Debian long-timers would sit down and reply to Charles with his/her experience! Having worked a bunch with the NetBSD crowd in the past, I really would hate to see this project go down. The NetBSD kernel, while not up to the task to provide the desktop experience, still makes for rock-solid servers, and some parts of it sparkle with technical excellence (like the virtual memory management, for instance). Maybe, just maybe a possible future for NetBSD would be to produce Debian NetBSD in a joint venture? NP: Shpongle / Tales of the Inexpressible

Russell Coker: first significant project goes live

One advantage of not being a permanent employee is that I am free to do paid work for other people. This not only gives a greater income but also a wider scope of work.<br /><br />I've just completed my first significant project since leaving Red Hat. The <a href="http://www.inumbers.com/">Inumbers</a> project provides an email address for every mobile phone. If you know someone's mobile phone number but don't have an email address then you can send email to NNN<span style="font-weight: bold;">@inumbers.com</span> where NNN is the international format mobile phone number. The recipient will receive an SMS advising them how to sign up and collect the email.<br /><br />It was fun work, I had to learn how to implement SRS (which I had been meaning to do for a few years), write scripts to interface with a bulk SMS service, and do a few other things that were new to me.

30 August 2006

Russell Coker: SRS development

I've been working on a mail forwarding system which required me to implement <a href="http://www.openspf.org/srs.html">SRS</a> to allow people who use <a href="http://www.openspf.org/">SPF</a> to be customers of the service (as I use SPF on my domain it's fairly important to me). Reading the web pages before actually trying to implement it things seemed quite easy. All over the web you will see instructions to just set up an /etc/aliases file that pipes mail through the <span style="font-weight: bold;">srs</span> utility.<br /><br />The problem is that none of the srs utility programs actually support piped mail. It seems that the early design idea was to support piped mail but no-one actually implemented it that way. So you can call the srs utility to discover what the munged (cryptographically secure hash signed) originator of the email should be but you have to do the actual email via something else.<br /><br />This wasn't so much of a problem for me as I use my own custom maildrop agent to forward the mail instead of using /etc/aliases (Postfix doesn't support what I want to do with /etc/aliases - dynamically changing the email routing as you receive it isn't something that Postfix handles internally).<br /><br />However I still have one problem. Sometimes I get two or three copies of the SPF header from Postfix when it checks them.<br /><br />In my <span style="font-weight: bold;">main.cf</span> file I have a <span style="font-weight: bold;">smtpd_recipient_restrictions</span> configuration directive that contains <span style="font-weight: bold;">check_policy_service unix:private/spfpolicy</span> and the Postfix <span style="font-weight: bold;">master.cf</span> file has the following:<br /><br /><pre><br />spfpolicy unix - n n - - spawn user=USER argv=/PATH/spf-policy.pl<br /></pre><br /><br />Does anyone have any ideas why I would get multiple SPF checks and therefore multiple email header lines such as:<br /><pre><br />Received-SPF: none (smtp.sws.net.au: domain of SRS0=MUyCQ6=CO=coker.com.au=russell@inumbers.com does not designate permitted sender hosts)<br />Received-SPF: none (smtp.sws.net.au: domain of SRS0=MUyCQ6=CO=coker.com.au=russell@inumbers.com does not designate permitted sender hosts)<br />[some other headers]<br />Received-SPF: pass (inumbers: domain of russell@coker.com.au designates 61.95.69.6 as permitted sender)<br />Received-SPF: pass (inumbers: domain of russell@coker.com.au designates 61.95.69.6 as permitted sender)<br />Received-SPF: pass (inumbers: domain of russell@coker.com.au designates 61.95.69.6 as permitted sender)<br /></pre><br /><br />The email went through one mail router and then hit the destination machine, but somehow got 5 SPF checks along the way. Also the pair of identical checks had no lined between them and the set of three identical checks also had no lines between them. So multiple checks were performed without any forwarding. It seems that a single port 25 connection is giving two or three checks. Both machines run Postfix with SPF checking that is essentially idential (apart from being slightly different versions, Debian/unstable and RHEL4).<br /><br />Any advice on how to fix this would be appreciated.

29 August 2006

Martin Zobel-Helas: package list frozen

The package list for Sarge r3 has been frozen today, though we still wait for one package from one architecture to be uploaded. I hope it makes it before dinstall. Lets see….
FINALLY!

27 August 2006

Clint Adams: Supersize me?

In general, I avoid (inter)national fast food chains. Prior to Friday, I hadn't been in a McDonald's since February 2005. I remember because of Ari's immemorable gesticulation and utterance. It was somewhat of a shock then on Friday when I went to (and ate from) McDonald's, Burger King, and Taco Bell (in that order), all before dinner time. In order to atone for this, I guzzled fresh fruit of the blackberry, plum, and apple varieties, and chased that down with some , , , , , , and, of course, fifteen pounds of . I may have eaten even more on Saturday, and on Sunday my hands became once again stained with the sticky, sweet blood of the ovaries of the blackberry plant. Bless you, ovaries. Blovaries.

Uwe Hermann: Testing stuff with QEMU - Part 1: SELinux support in Debian unstable [Update]

Here's a quick HOWTO to get you started with the QEMU emulator, the Debian installer (etch beta 3), and SELinux. If you execute the following steps you'll be left with an SELinux-enabled Debian unstable QEMU image, but not with a complete working and perfectly configured SELinux system. A more detailed article about SELinux will probably follow... Basic Debian unstable install in QEMU:
  1. Install QEMU:
    apt-get install qemu
  2. Download the latest Debian etch installer ISO image (etch beta 3, currently):
    wget http://cdimage.debian.org/cdimage/etch_di_beta3/i386/iso-cd/debian-testing-i386-binary-1.iso
  3. Create a QEMU image which will hold the Debian installation:
    qemu-img create -f qcow /path/to/debian.img 5000M
  4. Boot directly from the ISO image and install Debian into the QEMU image (I won't go into the details of the installation itself; Wolfang Lonien has nice HOWTOs for that: part 1, part 2, video):
    qemu -hda /path/to/debian.img -boot d -cdrom debian-testing-i386-binary-1.iso
  5. After the installation is done, configure the system, tweak /etc/apt/sources.list if needed, and then dist-upgrade to the latest stuff:
    apt-get update && apt-get dist-upgrade
  6. That's about it for the basic Debian install, you can now shutdown the OS and QEMU (type "halt" in the emulated Debian, wait for the shutdown to complete, press CTRL+ALT+2 to switch to the QEMU console, and type "quit").
Creating a QEMU overlay image: QEMU has a nice feature called overlay images which allows you to "clone" an image, where the new (overlay) image will only store the "diffs" to the original one, thus saving lots of space. This also allows you to remove the overlay image at any time and restart from the original image (which is nice for testing stuff which may break).
  1. Create an overlay image based on the previously installed Debian image:
    qemu-img create -b /path/to/debian.img -f qcow /path/to/debian_selinux_overlay.img
  2. Now boot into the new overlay image:
    qemu -hda /path/to/debian_selinux_overlay.img
Basic SELinux setup: SELinux / sestatus screenshot
  1. SELinux wants to label all the files on your system (all inodes actually), so your filesystem(s) need the so-called extended attributes (xattr) and "security labels" (both are kernel options) which most modern file systems now support. For ext3 (for example) you need these config options:
    CONFIG_EXT3_FS=y
    CONFIG_EXT3_FS_XATTR=y
    CONFIG_EXT3_FS_SECURITY=y
    Luckily the Debian kernels are xattr-enabled by default so we don't have to do anything at all here.
  2. Install the basic SELinux packages and the source package of the SELinux reference policy:
    apt-get install checkpolicy policycoreutils selinux-policy-refpolicy-src
  3. I noticed a bug in the current Debian packages (the setfiles utility is in the wrong place, see #384850), but there's a simple workaround:
    ln -s /sbin/setfiles /usr/sbin/setfiles
  4. Now we can (re-)label the file system:
    cd /etc/selinux/refpolicy/src/policy
    make relabel
    This will build the reference policy from source and relabel your file system (this will take a while).
    There might be some warnings (and maybe you'll notice further bugs), but they seem not to be critical.
  5. We can now (almost) enable SELinux, but before we can reboot we need to work around another bug (#384852), otherwise SELinux will not be enabled when we reboot:
    ln -s /etc/selinux/refpolicy/src /etc/selinux/targeted
  6. Now reboot the emulated Debian system, and at the GRUB console add the kernel option selinux=1 to enable SELinux in the kernel (press "e" to edit the boot options).
  7. You'll get tons of SELinux log messages while the system boots, that's normal at this point, don't worry.
    Then you can type "sestatus", which should print some information on the running SELinux system. If it says "SELinux status: disabled" something went wrong.
Congratulations! You now have a QEMU image with minimal SELinux support and you can start playing with it, tweaking the policy, finding and reporting bugs, reading tons of documentation on how SELinux actually works etc. etc. As SELinux is (half?) a release-goal for Debian etch, it would be nice if many people could test it before the release, and this is one method to do so without breaking your production systems. Update: You don't really need user_xattr support for SELinux, only xattr support (for security.selinux xattrs) for the filesystem you use, which is available per default in Debian kernels (thanks Russell Coker).

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.

Russell Coker: the waste of closed lists

As I mentioned in my first post the amount of effort I'm prepared to invest in posting to a small group of people is limited. I don't think that I am the only person with this opinion.<br /><br />I also believe that the number of people who refuse to post to open lists is quite small, and that on many lists they aren't the people who contribute much. I believe that they are outweighed in both number and contributions by the people who want open lists and who are unwilling to spend a large effort on posting to a closed list.<br /><br />When posting to an open list you have to be concerned about your online reputation. Some lists are closed because of having NSFW content that people don't want known by their colleagues and managers, I guess that this makes sense for some lists.<br /><br />IMHO the only good reason for closed lists is for discussion of truly sensitive information. This ranges from security problems in software that have not yet been fixed to medical and psychiatric problems. There are many lists which should not be publicly archived, but for general discussion of computers there is no such motivation.<br /><br />For a list with a primarily technical focus on answering basic questions secrecy does no good, it merely protects people who want to post off-topic messages and create pointless arguments about issues that they don't understand.<br /><br />My solution to some of these problems is to use this blog to comment on such things. I expect that my solution will also be adopted by other people on some of the closed lists that I use.<br /><br />Also it has occurred to me that blogging about issues may improve the quality of list discussion. If instead of responding to a message in point-form you write an article about the general issue then it may reduce the level of personal dispute. I think it would be difficult to have a flame-war by blog.<br /><br />Finally while on the topic I have to mention that I don't believe in anonymous posting to technical forums. Any content that is worth having should come with someone's name attached. IRC nicks etc are OK, but the person writing the content should be identifiable.

Russell Coker: more on anti-spam

In response to my last entry about anti-spam measures and the difficulty of blocking SPAM at the SMTP protocol level I received a few responses. Brian May pointed out that the <span style="font-weight: bold;">exiscan-acl</span> feature of <span style="font-weight: bold;">Exim</span> allows such blocking, and Johannes Berg referred me to his web site <a href="http://johannes.sipsolutions.net/Projects">http://johannes.sipsolutions.net/Projects</a> for information on how he implemented <span style="font-weight: bold;">Exim</span> SPAM blocking at the SMTP level.<br /><br />It seems that this is not possible in Postfix at this time. The only way I know of to do this in Postfix would be to have a SMTP proxy in front of the Postfix server that implements the anti-SPAM features. I have considered doing this in the past but not had enough time.<br /><br />Also a comment on my blog criticises SORBS for blocking <a href="http://tor.eff.org/">Tor (an anonymous Internet system)</a>. As I don't want to receive anonymous email and none of the companies I work for want to receive it either this is something I consider a feature not a bug!

Russell Coker: big and cheap USB flash devices

It's often the case with technology that serious changes occur at a particular price or performance point in development. Something has small use until it can be developed to a certain combination of low price and high performance that everyone demands.<br /><br />I believe that USB flash devices are going to be used for many interesting things starting about now. The reason is that 2G flash devices are now on sale for under $100. To be more precise 1G costs $45AU and<br />2G costs $85AU.<br /><br /><a href="http://www.coker.com.au/hardware/usb.html">http://www.coker.com.au/hardware/usb.html</a><br /><a href="http://www.coker.com.au/hardware/usb.html"><span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"></span></a><br />The above page on my web site has some background information on the performance of USB devices and the things that people are trying to do with them (including MS attempting to use them as cache).<br /><br />One thing that has not been done much is to use USB for the main storage of a system. The <a href="http://laptop.media.mit.edu/">OLPC </a>machines have been designed to use only flash for storage as has the <a href="http://familiar.handhelds.org/">Familiar</a> distribution for iPaQ PDAs (and probably several other Linux distributions of which I am not aware). But there are many other machines that could potentially use it. Firewall and router machines would work well. With 2G of storage you could even have a basic install of a workstation!<br /><br />Some of the advantages of Flash for storage are that it uses small amounts of electricity, has no moving parts (can be dropped without damage), and has very low random access times. These are good things for firewalls and similar embedded devices.<br /><br />An independent advantage of USB Flash is that it can be moved between machines with ease. Instead of moving a flash disk with your data files you can move a flash disk with your complete OS and applications!<br /><br />The next thing I would like to do with USB devices is to install systems. Currently a CentOS or Red Hat Enterprise Linux install is just over 2G (I might be able to make a cut-down version that fits on a 2G flash device) and Fedora Core is over 3G. As Flash capacity goes up in powers of two I expect that soon the 4G flash devices will appear on the market and I will be able to do automated installs from Flash. This will be really convenient for my SE Linux hands-on training sessions as I like to have a quick way of re-installing a machine for when a student breaks it badly - I tell the students "play with things, experiment, break things now when no-one cares so that you can avoid breaking things at work".<br /><br />The final thing I would like to see is PCs shipped with the ability to boot from all manner of Flash devices (not just USB). I recently bought myself a new computer and it has a built-in capacity to read four different types of Flash modules for cameras etc. Unfortunately it was one of the few recent machines I've seen that won't boot from USB Flash (the BIOS supported it but it didn't work for unknown reasons). Hopefully the vendors will soon make machines that can boot from CF and other flash formats (the more format choices we have the better the prices will be).

Russell Coker: wasted votes

In a mailing list to which I subscribe there is currently a discussion on US politics with the inevitable discussion of <span style="font-weight: bold;">wasted votes</span>. As I don't want to waste my writing on this topic on a closed list I'm posting to my blog.<br /><br />There is ongoing discussion on the topic of <span style="font-style: italic;">wasted votes</span>. As a matter of principle, if a vote is considered to be wasted, then that should be considered a failure of the electoral system.<br /><br />Having representatives for regions makes some sense in that a regional representative will have more interest in the region than a central government with no attachment to the region. I expect that representatives of regions were initially used because it was not feasible for people to vote for people that weren't geographically local. Now there is no real requirement for geographical locality (only a very small fraction of the voters get to meet the person they are voting for anyway) but having a representative for a region still makes sense.<br /><br />The requirement for a regional representative means that if you live in a region mostly filled with people who disagree with you then your vote won't change much. For example I live in a strong Labor region so the REAL fight for the lower house seat (both state and federal) occurs in the Labor party room.<br /><br />My vote for the senate counts as that is done on a state-wide basis. So of the two votes entered in one election one of them can be considered to not be <span style="font-style: italic;">wasted</span>.<span style="font-weight: bold;"></span><br /><br />For the US system, the electoral college was developed in a time when it was impossible for the majority of voters to assess the presidential candidates, and it solved the requirements of those times reasonably well. Today it is quite easy to add up all the votes and use either a simple majority or the "Australian ballot".<br /><br />Currently there is some controversy over the actions of Senator Joe Lieberman who lost the support of his party and then immediately declared that he would stand as an independent candidate. I believe that this illustrates a failure of the electoral system. It should be possible to have multiple candidates from each party on the list. In the Australian system it is possible to do that, but as they are in random order on the voting cards no-one would be sure of which candidate of the winning party would get the seat unless there were actual reasons for preferring one candidate over another (which sadly often isn't the case). This is good for voters (the minority of voters who care enough about internal party policies to prefer one party candidate over another should make the decision) but not good for the candidates who want a better chance of winning without actually demonstrating that they can represent their voters better than other candidates.<br /><br />The Australian government system has nothing equivalent to the US presidential election. The prime minister is voted in by the members of parliament. So there is little chance of getting multiple candidates from one party contesting one position. For the US presidential election I think that the best thing to do would be to have an "Australian ballot" and permit multiple candidates from each party. For example you could have Bush and Cheney running as candidates for president with each promising to make the other their VP if they get elected. With the Australian ballot it wouldn't matter if you put Bush and Cheney as the last two votes on your ticket, the order you use for them will still matter.<br /><br />I think that with the US presidential and state governor elections there is enough knowledge of the candidates among the voters to make it worth-while for each of the major parties to run multiple candidates.<br /><br />One of many advantages of having multiple candidates is that you might have real debates. If the main candidates from the two big parties have a set of strict rules for their debate that prevents any surprise then the people who are the less likely candidates from those parties (and who therefore have less to lose) could go for a no-holds-barred debate with a selection of random members of the public asking questions.<br /><br />Of course none of this is likely to happen. Any serious change would have the potential to adversely affect at least one of the major parties, and any improvement would necessarily have a negative impact on most of the current politicians. Votes ARE being wasted, and most politicians seem to like it that way.

Russell Coker: outsourcing - bad for corporations but good for th...

There is ongoing discussion about whether outsourcing is good or bad. The general assumptions seem to be that it is bad for people who work in the computer industry (more competition for jobs and thus lower pay) and good for employers (more work done for less money).<br /><br />I am not convinced that employers can get any benefit from outsourcing. The problem is that the pay rates for computer work are roughly proportional to the logarithm of the productivity of the person (at a rough estimation - it's certainly not linear). Therefore if you get an employee on twice the base salary you might expect ten times the productivity, and an employee on three times the base salary could be expected to deliver one hundred times the productivity. These numbers may sound incredible to someone who has not done any technical work in the computer industry, but actually aren't that exciting to people who regularly do the work. Someone who knows nothing may perform a repetitive task manually and waste a lot of time, someone who knows a little will write a program to automate it, and someone who knows a lot will write a program to automate it that won't crash...<br /><br />Programmers in Indian outsourcing companies are paid reasonably well by Indian standards, but they know that it's possible to do a lot better. So all the best Indian programmers end up either migrating to a first-world country or running their own outsourcing company (there are a lot of great Indian programmers out there, but they aren't working in sweat-shops). The Indians who actually end up doing the coding are not the most skilled Indian programmers.<br /><br />It might be better to hire cheap Indian programmers of average skill than cheap first-world programmers of average skill. But hiring a single skilled programmer (from any country) rather than a team of average programmers will be a significant benefit (both in terms of price and productivity). In addition to this there are the communication problems that you experience with different time zones (the idea that one team can solve a problem while the team on another continent is asleep is a myth) and with different cultures.<br /><br />I am not convinced that outsourcing does any real harm to good programmers in first-world countries. If someone does computer work strictly 9-5 and never does it for fun then they are not a serious programmer. People who aren't serious about computers will probably be just as happy working in another industry if they get the same pay. Moving a few of the average computer programmer positions to India isn't going to hurt anyone, especially as the industry is continually growing and therefore there is little risk of any given programmer being forced out of the industry. The people who are serious about computers (the ones who program for fun and would do it even if they weren't paid to do so) are the most skilled programmers, they will always be able to find jobs. Will outsourcing reduce the income for such people? Maybe, but earning 5* the average income instead of 6* shouldn't hurt them much.<br /><br />The final question is whether outsourcing is a good thing. I think it is good even though it's bad for first-world companies and not particularly good for programmers in first-world countries. Outsourcing benefits developing countries by injecting money into their economies and driving the development of a modern communications infrastructure (telephones, mobile phones, fast Internet access, reliable couriers, etc). I believe that the good which is being done in India by outsourcing money greatly exceeds the damage done to companies that use outsourcing services. Therefore I want this to continue and I also want to see outsourcing in other developing countries too. There is already a trend in outsourcing to eastern-European countries such as Russia, this is a good thing and I hope that it will continue.

Next.

Previous.