Search Results: "tb"

6 January 2007

Russell Coker: document storage

I have been asked for advice about long-term storage of documents. I decided to blog about it because my thoughts may be useful to others, and because if I get something wrong then surely people will correct me. ;)

Many organizations are looking at using computers for storing all documents. This gives savings on the costs of storing paper - the promise of the paperless office is being fulfilled. There are some potential issues about whether a signature in a PDF file that's scanned from paper is valid - but I guess it's the same as a signature on a FAX and everyone seems to accept FAXed contracts.

The technical problem is how to reliably store data long-term. The problem is that all modern methods of storing data will degrade over time. Anything less than engraving a message in stone, gold, or platinum and burying it will have some data loss eventually.

If the documents that need to be archived have no special requirements and if you have a good backup system in place (testing backup media, off-site storage in case of disaster, multiple sets of hardware that can read the backup media in case of hardware failure, etc) then you might be able to just store the documents on a server and include them in the backup plan. The regular backups should cater for replacing media over the long term. If however there is a significant amount of data or the data has confidentiality requirements that preclude having it all online all the time then you need a separate infrastructure for such storage.

Regular backup systems have to deal with files being deleted from storage and files that have their contents changed. For a document archiving system no file will ever be changed once it has been created and no file will be deleted. This allows some simplifications to the backup strategy. For example if you have multiple terabytes of documents backed up by tape and stored off-site you could use CD-ROMs or other media for storing recent changes. It would be very easy for an employee to grab a couple of CDs before rushing out of a burning building, but grabbing a set of tapes (or the correct tape from a large set) may not be possible.

It would be possible to use a tape library system as the primary storage for documents. If a large organization was going to implement this a few years ago that might be a good option. Nowadays storage is getting increasingly large and cheap. Terabytes are available in desktop PCs and hundreds of terabytes are available for server storage. So having the primary document store on a server with a decent amount of space and then making tape backups for storage in secure locations seems viable.

One thing to note about such document storage is that having everything on a server allows a much larger amount of data to be accessed and copied more easily than on paper. Sorting through a billion paper documents and copying the thousand most useful ones would be a difficult task for someone who was involved in industrial espionage. Finding the most useful files when they are indexed on a server should be quite easy and copying a few thousand is also easy (one thousand scanned documents of medium size should fit on a USB memory stick - much smaller than a few reams of copied documents).

Finally documents have to be archived in publicly documented file formats that can be easily read in the future. The PDF specification is well known and there are multiple programs that can display data in such files, another good option for scanned documents is JPEG. Proprietary formats such as MS-Word should never be used, you never know whether you will be able to read them in four years, let alone the seven years for which many documents must be retained or the 20-30 years that some documents must be retained.

5 January 2007

Amaya Rodrigo: Gender is so useless

You scored as Either. You brain is neither specifically male, nor female in the way you perceive your surroundings. As bad as this may sound to some, it can easily mean that you are capable of combining both gender aspects to your advantage. Rather than being genderless you are possibly able think freely. This does not mean that you are bisexual or androgynous or indecisive, but it might.

Either
 
71%
Female
 
64%
Neither
 
54%
Male
 
39%

Should you be MALE or FEMALE?*
created with QuizFarm.com

Maybe it's these memes that are useless :)

Russell Coker: core files

The issue of core file management has come up for discussion again in the SE Linux list.

I believe that there are two essential security requirements for managing core files, one is that the complete security context of the crashing process is stored (to the greatest possible extent), and the other is that processes with different security contexts be prevented from discovering that a process dumped core (when attacking a daemon it would be helpful to know when you made one of it's processes dump core).

The core file will have the same UID and GID as the process that crashed. It's impossible to maintain the complete security context of the crashing process in this manner as Unix permissions support multiple supplementary groups and Unix filesystems only support one GID. So the supplementary groups are lost.

There is also a sysctl kernel.core_pattern which specifies the name of the core file. This supports a number of modifiers, EG the value "core.%p.%u.%g" would give a file named "core.PID.UID.GID". It would be good to have a modification to the kernel code in question to allow the SE Linux context to be included in this (maybe %z).

To preserve the SE Linux context of the crashing process with current kernel code we need to have a unique type for each process that dumps core, this merely requires that each domain have an automatic transition rule for creating files in the directory chosen for core dumps. In the default configuration we have core files dumped in the current directory of the process. This may be /tmp or some other common location which allows an attacker to discover which process is dumping core (due to the directory being world readable) and in the case of SE Linux there may be multiple domains that are permitted to create files in /tmp with the same context which gets in the way of using such a common directory for core files.

The traditional Unix functionality is to have core files dumped in the current directory. Obviously we can't break this by default. But for systems where security is desired I believe that the correct thing to do is to use a directory such as /var/core for core files, this can be easily achieved by creating the directory as mode 1733 (so that any user can create core files but no-one but the sys-admin can read them) and then setting the core_pattern sysctl to specify that all core files go in that directory. The next improvement is to have a poly-instantiated directory for /var/core such that each login user has their own version. That way the user in question could see the core files created by their own processes while system core files and core files for other users would be in different directories. Poly-instantation is easier to implement for core files than it is for /tmp (and the other directories for which it is desirable) because there is much less access to such a directory. When things operate correctly core files are not generated, and users never need to access each other's core files directly (they are mode 0600 so this isn't possible anyway).

This area will require a moderate amount of coding before it works in the ideal manner. I aim to briefly describe the issues only in this post.

Benjamin Mako Hill: Who Owns <em>Free Culture</em>?

The previous year saw far too much fighting over who gets to define and control the term free culture. The biggest problem, in my opinion, is that these fights conflate a very important discussion about the goals of a set of nascent social movements -- or the lack thereof -- with much less important issues of semantics, definitions, and control over terms. The term is being used in a way that describes a whole lot of projects I support and participate in fully -- and a few I don't. And I think that's OK. When Erik M ller and I launched the Free Cultural Works Definition (at the time, the Free Content and Expression Definition), we struggled to find a good term for the works that we wanted to liberate. We thought about using the terms content, expression, knowledge, information, art, data and communication but each word seemed to exclude an important body of works or producers. Few musicians we knew thought of their productions as "content" while few encyclopedia writers did not. The term we liked most was culture: it defines a very broad set of practice and has very positive connotations. Of course, others had already been using the term free culture so we spent some reading up on the term and talking to the people most closely associated with it. Originally, the term seems to have its roots in the book Free Culture by Lawrence Lessig. I reread the book to get an idea for exactly what Lessig meant when he used the term but, upon reaching the end, I found myself without a good answer. The book's index included a promising entry for "Free culture, defined" which pointed to a short section in the preface:
A free culture is not a culture without property; it is not a culture in which artists don't get paid. A culture without property, or in which creators can't get paid is anarchy, not freedom. Anarchy is not what I advance here. Instead, the free culture that I defend in this book is a balance between anarchy and control. (emphasis mine)
Framed by a negative definition of what free culture is not, Lessig's definition describes the broad space between two unattainable extremes. This resulting ambiguity is fully intended: Lessig has not only spoken out against my particular suggestion but against any definition and the process of offering ex cathedra definitions or goals altogether [1]. In personal conversations about our definition, Lessig was initially very supportive. In fact, it was Lessig who introduced Erik and I to each other and suggested that we work together. What Lessig did disagree with us on however, was calling the definition the Free Culture Definition. I think that Lessig felt some sense of ownership of the term and felt that he and others had defined it and been using it in a way that was broader and incompatible with the definition we were proposing and with any definition of the type of we were suggesting. Early on, Lessig blessed a group of students to create a Free Culture student movement. Most active now in Harvard Free Culture and Free Culture NYU and but in a handful of other places as well, these groups have been involved in everything from the promotion of transgressive approaches to IP, to speech bubbles, to anti-DRM work, to protecting the right of cereal restaurants to operate. When Erik and I suggested to this group that they might benefit from adopting the Free Cultural Works Definition as a set of explicit ideals or goals for their movement, the larger part of the coalition soundly rejected the idea. Like Lessig, they wanted free culture to refer to wide variety of projects and did not feel good about describing any work by sympathetic parties as "non-ideal." Erik and I were faced with two choices: we could call our definition the Free Culture Definition and in effect engage in a power struggle with Lessig and with some portion of the free culture student movement or we could pick another term. While we don't like the alternatives as much as free culture, we didn't have a lot of trouble deciding that going with a term like free cultural work or free content and expression was the better choice. This is why I am a little worried about the recently announced UK-based Free Culture Foundation. I have nothing but respect for the founders (Matt Lee, Tom Chance, and Rob Myers) and trust them to create the type of free culture organization that I would like to see. I am very much looking forward to working closely with them on this project in the future. They seem likely to choose a set of goals and adopt a set of strategies in line with the ones I've argued for. But in that my goals and strategies have run into opposition among many of the most visible people using the term free culture in the past, that's also why I'm a little worried. SJ Klein and I were recently saying that its time to start naming organizations and projects in this area using only words in dead languages. That way, we can side-step the (unimportant) semantic arguments over who gets to control existing terms and focus on the real goal of building stronger social movements, setting goals that sound as unthreatening to each other as they actually are, and building better tools. Without semantic arguments in our way, we'll be able stronger to build coalitions and work together in all the ways we should be.
[1]

This is an important distinction because it is also possible to disagree with the first fully articulated definition but also feel that offering another set of goals -- for example, a set that allowed for commercial use or anything under current CC licenses -- was productive.

After all, I have been arguing for much longer in favor of any set of goals much longer and more strenuously than I have argued for any particular set of goals and I still feel that a set goals is much more important than any paritcular one.

4 January 2007

Russell Coker: monitors for developers

Michael Davies recently blogged that all developers should have big screens. This news has been around for a while, the most publicity for the idea came from Microsoft Research where they did a study showing that for certain tasks a 50% performance increase could be gained from a larger monitor.

If you consider that a good software developer will get paid about $100K and it's widely regarded that in a corporate environment the entire costs for a worker (including management, office space, etc) is double their base salary then you consider each developer to be worth $200K per annum. Therefore larger and more monitors could potentially give a benefit in excess of $100K per annum (we assume that the value provided by the developer is greater than their salary - apart from the dot-com boom that's usually the case).

It's quite obvious that you can get a really great monitor configuration for significantly less than $100K and that it will remain quite current for significantly more than a year (monitor technology advances comparatively slowly so a good monitor should last at least four years).

Some time ago I researched this matter for a client. I convinced all the managers in my area, I convinced a bunch of colleagues to buy bigger monitors for their homes (and bought one myself), but unfortunately senior management saw it as a waste of money. I was trying to convince them that people who were being paid >$100,000 should be each assigned a $400 monitor. Sadly they believed that spending the equivalent of less than a day's wages per employee was not justified.

If I was in a management position I would allocate an amount of money for each developer to spend on hardware or conferences at their own discretion. I would make that amont of money a percentage of the salary of each employee, and I would also allow them to assign some of their share to a colleague if they had a good reason for it (EG if a new hire needed something expensive that would exceed their budget for the first year). I think that people who are good programmers are in the best position to judge what can best be done to improve their own productivity, and that allowing them to make their own choices is good for morale.

On a more technical level I have a problem with getting a big monitor. I do most of my work on a laptop because I travel a lot. I don't travel as much as I did while living in Europe but still do a lot of coding in many strange places. I started writing my Postal benchmark in the hotel restaurant of a Bastion hotel in Utrecht during one of the worst recorded storms in Europe (the restaurant had huge windows and it was inspirational for coding). I wrote the first version of my ZCAV benchmark in Denver airport while waiting for a friend.

What I need is a good way of moving open windows from my laptop to a big external display and then back again. I don't want to logout before moving my machine. With a Macintosh this is quite possible (I'm using a OS/X machine while working for a client and the only thing that has impressed me is the monitor support). With Linux things aren't so easy, it's supposed to be possible but I haven't heard any unqualified success stories yet.

I guess I could try setting up XDMCP between my laptop and a desktop machine with some big displays and logout before moving.

Any suggestions?

MJ Ray: Cycling: Injuries, Death, Roadworks and the Cycle Forum

I used to live in Norfolk, so Norwich Evening News: Was top cyclist killed by driver asleep at the wheel? (Updates: EDP: Death crash trial hears of "most viable explanation" and EDP: Driver guilty of causing cyclist's death ) and Norwich Evening News: Cyclist hit by bus on A47 are rather worrying. Weston super Mare Weston Mercury: Town centre havoc reports that Wales and West Utilities will be digging up Orchard Street followed by Alexandra Parade, Regent Street, Walliscote Road, High Street and Knightstone Road over 16 weeks from 8 January, and also
"Three months worth of work to remove the central reservation and add a filter lane to Herluin Way is also due to start on the same day [...] Uphill Road South in Uphill is closing on January 9 for six weeks as Wessex Water repairs the highway's sewer. [...] Winters Lane in Redhill is shutting for two months while a new sewer is put in."
Pipe works seldom seem to take up the full width of the road and the Herluin Way cycle track only crosses Herluin Way at a few points. Will these roads be kept open for cycling? They should be. All of these seem to be starting just before next week's Cycle Forum (7pm Wednesday 10 January at Worle Campus, press release ). Interesting new year present.

Bastian Blank: Xen changes in 2.6.18-4

The upcomming linux-2.6 release will introduce some changes in the Xen support.
i386 gets PAE only The i386 images gets PAE only. The main cause is a bug in this versions which makes non-PAE images crash on core dumps. The patch is from Fedora, which only ships PAE images; so it is unlikely that they will fix it.
Network breaks with older guests There is a bug in it, which makes older kernels on the guests break on a host which uses the new version. The reason is for know unknown. The kernel logs many of the following errors:
kernel: xen_net: Memory squeeze in netback driver.

Andrew Pollock: [life] 8 flights in 2 weeks (visiting Australia)

(and I'm still catching up on my blogging backlog) So Sarah and I returned to Australia for two weeks at the end of November/start of December. The reason for the timing was my grandmother's 90th birthday, but we decided to spend 5 days on Heron Island for a belated honeymoon as well. We flew back with Qantas, who are always a pleasure to fly with internationally, directly to Sydney. I'm getting better at sleeping on that long-haul. We then flew domestically up to Brisbane on Saturday, after spending Friday in Sydney, checking out the Sydney Google office and catching up with as many friends and family as time permitted. Saturday was a bit of an "open house" at my parent's place for my grandmother's birthday. She now lives in Toowoomba, but lived in the Sandgate/Bracken Ridge area for the majority of her life, so it was easier for her to come down to Bracken Ridge, and for everyone to come around to my parent's place than for everyone to go up to Toowoomba to see her. I didn't keep count of how many people dropped in through the course of the day, but I'd hazard a guess at about 40 or 50. It was really good to see some relatives on my Mum's side of the family that I probably hadn't seen in nearly 10 years. It was also good to see my Aunty and Uncle and one of my cousins from Vanuatu (who is now in New Zealand), who I haven't seen for a while either. On Sunday, we went out for dinner with just a bunch of the more immediate family. On Monday we flew up to Gladstone, and then had a helicopter transfer out to Heron Island, where we stayed until Friday. Heron is a fantastic little island, and I highly recommend it if you want to relax and disconnect from the world for a while. It feels very isolated, there's no telephones in the rooms, and there's only really slow Internet access via a couple of coin operated kiosks. It's a really tiny island as well. Only about three kilometres in circumference. The snorkeling is absolutely fantastic. You can see so much marine life from straight off the beach. We also saw turtles coming up the beach to lay eggs in the mornings. I certainly felt very relaxed afterwards. Photos from the week are here. We had more time to spare on the way back, so we took the launch back to the mainland and then flew back to Brisbane for four days. Sarah and my sister organised a bit of a surprise dinner for my 30th birthday with a bunch of family and friends, which was a total surprise for me, and very nice of them. On Tuesday night we flew down to Canberra and stayed with our old neighbours and caught up with friends down there. I also spent a day racking and installing the new mirror.linux.org.au server, but wasn't able to cut over to it at that time. On Thursday, we drove off into the outback to find Alli and Rusty's new property, a 1000 acres near Braidwood. They really are living remote, but it sounds like they've got some very exciting plans for the place, and I look forward to checking out what they've done when we're next able to visit. Then on Friday morning, we drove out at an ungodly hour, headed back for Sydney, to fly out for San Francisco (via Los Angeles, unfortunately) again. I'm not sure when we'll be visiting Australia again. We're intending to get our respective parents over here to visit us during the year, this year, and not return for Christmas. I'm unable to attend linux.conf.au this year, but would like to go to Melbourne for it next year.

Erich Schubert: Web 2.0 security issues incoming

As demonstrated by the gmail contacts list hijack attack, web 2.0 technologies are quite vulnerable for attacks. And while GMail has a rather good security record, cross-site-scripting is the security issue to watch out for. Especially since many web2.0 sites deal with sensitive data (especially data you probably shouldn't have given them in the first place...) this is rather interesting. It's not new (mind you, the whole web 2.0 thing is not new), but it's being used heavily now, and a lot by people who don't pay enough attention to security. The whole web 2.0 thing is quite naive, mind you. I expect to see more attacks of this type to surface. And in the long run I think we'll either need to use some web interface specification language (so the browser only allows whitelisted access; think robots.txt) or new security filters in browsers will break most (if not all) mashups. Maybe it would be best to add some real WSDL/SOAP code to the Javascript core (and in this process add all the stuff the monster javascript libraries around have been adding, effects, event queues, sane callback handling, getElementById shortcuts etc. - it just doesn't make sense to download the same 200k Javascript from a dozen sites. Dojo, Mochikit, Prototype, ...).

3 January 2007

Russell Coker: Windows Vista

There's a blog about Windows Vista as the Free Software Foundation site. Not much content yet apart from RSS links but it should have some potential in future.

I am not planning on tracking Vista in detail (not enough time), but if you want to track such things then the FSF site should be useful.

Russell Coker: Xen shared storage

disk = [ 'phy:/dev/vg/xen1,hda,w', 'phy:/dev/vg/xen1-swap,hdb,w', 'phy:/dev/vg/xen1-drbd,hdc,w', 'phy:/dev/vg/san,hdd,w!' ]

For some work that I am doing I am trying to simulate a cluster that uses fiber channel SAN storage (among other things). The above is the disk line I'm using for one of my cluster nodes, hda and hdb are the root and swap disks for a cluster node, hdc is a DRBD store (DRBD allows a RAID-1 to be run across the cluster nodes via TCP), and hdd is a SAN volume. The important thing to note is the "w!" mode for the device, this means write access is granted even in situations whre Xen thinks it's unwise (IE it's being used by another Xen node or is mounted on the dom0). I've briefly tested this by making a filesystem on /dev/hdd on one node, copying data to it, then umounting it and mounting it on another node to read the data.

There are some filesystems that support having multiple nodes mounting the same device at the same time, these include CXFS, GFS, and probably some others. It would be possible to run one of those filesystems across nodes of a Xen cluster. However that isn't my aim at this time. I merely want to have one active node mount the filesystem while the others are on standby.

One thing that needs to be solved for Xen clusters is fencing. When a node of a cluster is misbehaving it needs to be denied access to the hardware in case it recovers some hours later and starts writing to a device that is now being used by another node. AFAIK the only way of doing this is via the xm destroy command. Probably the only way of doing this is to have a cluster node ssh to the dom0 and then run a setuid program that calls xm destroy.

Russell Coker: multiple ethernet devices in Xen

It seems that no-one has documented what needs to be done to correctly run multiple Ethernet devices (with one always being eth0 and the other always being eth1) in a Linux Xen configuration (or if it is documented then google wouldn't find it for me).

vif = [ 'mac=00:16:3e:00:01:01', 'mac=00:16:3e:00:02:01, bridge=xenbr1' ]

Firstly I use a vif line such as the above in the Xen configuration. This means that there is one ethernet device with the hardware address of 00:16:3e:00:01:01 and another with the address of 00:16:3e:00:02:01. I just updated this section, the 00:16:3e prefix has officially been allocated to the Xen project for virtual machines. Therefore on your Xen installation you can do whatever you like with MAC addresses in that range without risk of competing with real hardware. The Xen code uses random MAC addresses in that range if you let it.

I have two bridge devices, xenbr0 and xenbr1. I only need to specify one as Xen can figure the other out.

Now when my domU's boot they assign ethernet device names from the range eth0 to eth8. If there is only one virtual Ethernet device then it is always eth0 and things are easy. But for multiple devices I need to rename the interfaces.

eth0 mac 00:16:3e:00:01:01
eth1 mac 00:16:3e:00:02:01

This is done through the ifrename program (package name ifrename in Debian). I create a file named /etc/iftab with the above contents and then early in the boot process (before the interfaces are brought up) the devices will be renamed.

In the Red Hat model you edit the files such as /etc/sysconfig/networking/devices/ifcfg-eth0 and change the line that starts with HWADDR to cause a device rename on boot.

Update: the original version of this post used MAC addresses with a prefix of 00:00:00, the officially allocated prefix for Xen is 00:16:3e which I now use. Thanks to the person who commented about this.

Amaya Rodrigo: My health is back

After five weeks of medical leave, taking so many pills in the morning that it was scary, antibiotics, painkillers that made my sight blurry, pain, weakness, loosing 12 kilos... I am back at work! The dist-upgrade was absolutely wonderful :)

Even though I am feeling pretty well, I still sometimes feel that I am not yet 100% recovered, but my strenght is coming back and I am feelling full with energy and optimism. My slight OCD is also much much better, and and I am more focused, happier, and letting go of old grudges. 

After a nice meal on new year's luch, I even think my (otherwise non-existant) relationship with a good part of my family can be somewhat fixed. At least we were able to treat each other in a respectful manner for many hours, in a relaxed, smily climate. And I have a 15 year old cousin, Mar a, that I had not seen in ten years and that has turned out to be a real swetheart! How much I would like her to get involved with computers! ;)

It is still hard to adjust to the noise at my office, the human company, and I forgot all the root passwords! That's a cool one :)
Thank The Flying Spahetthi Monster (without the meatballs) for encrypted partitions on usb keys with ssh keys, and ssh-agent.

/me loads the old-transition-nmu-machine-gun and looks around.


Also note that Droidy was kind enough to update the TheDebianChoirOfComplaints, with the new performances: Hamburg and St. Petersburg. Both are really worth seeing, and I am working on getting the lyrics for both of them. Volunteers?

2 January 2007

MJ Ray: Debian: Society

Another problematic meme is the idea that no-one need tolerate anyone - even those who are tolerant (known as the Rabid Right meme). When someone has no tolerance for others (for example, flaming people who expect any attempt at fairness, or who follow different social interaction patterns) then they have no place in a community such as Debian. They should clear off to some hard-hierarchy project - it's not like there's any shortage of Rabid Right hackers in this world. </sarcasm> For what it's worth, I believe life should be fair (idealism) and life is not fair (pragmatism). It is possible for those two beliefs to coexist. Expulsion could be fair, but (IIRC) every expulsion proposed so far would have been unfair and based on personal issues, rather than repeated offences: we may be reaching the point where a fair expulsion could happen. It seems a shame none of those who hold them are willing to use the smaller penalties in a Non-Discriminatory way. The "can't take their job away" meme seems more myth than meme, but it does need sorting out in the few places where it occurs. I doubt it will happen under this DPL.

Tollef Fog Heen: Locally administrated MAC addresses

Russel Coker writes about using multiple Ethernet devices in Xen and wonders about if there is something similar to RFC1918 addresses, but for Ethernet. Apparently, there is, they're called "Locally Administered Addresses". To make a local address, just set the seventh bit to one. You probably want to make the eigth bit a zero too, unless it's a multicast address. Wikipedia has more, as usual.

1 January 2007

Russell Coker: installing Xen domU on Debian Etch

I have just been installing a Xen domU on Debian Etch. I'll blog about installing dom0 later when I have a test system that I can re-install on (my production Xen machines have the dom0 set up already). The following documents a basic Xen domU (virtual machine) installation that has an IP address in the 10.0.0.0/8 private network address space and masquerades outbound network data. It is as general as possible.

lvcreate -n xen1 -L 2G /dev/vg

Firstly use the above command to create a block device for the domU, this can be a regular file but a LVM block device gives better performance. The above command is for a LV named xen1 on an LVM Volume Group named vg.

mke2fs -j /dev/vg/xen1

Then create the filesystem with the above command.

mount /dev/vg/xen1 /mnt/tmp
mount -o loop /tmp/debian-testing-i386-netinst.iso /mnt/cd
cd /mnt/tmp
debootstrap etch . file:///mnt/cd/
chroot . bin/bash
vi /etc/apt/sources.list
/etc/hosts /etc/hostname
apt-get update
apt-get install libc6-xen
linux-image-xen-686 openssh-server
apt-get dist-upgrade

Then perform the basic Debian install with the above commands. Make sure that you change to the correct directory before running the debootstrap command. The /etc/hosts and /etc/hostname files need to be edited to have the correct contents for the Xen image (the default is an empty /etc/hosts and /etc/hostname has the name of the parent machine). The file /etc/apt/sources.list needs to have the appropriate configuration for the version of Debian you use and for your preferred mirror. libc6-xen is needed to stop a large number of kernel warning messages on boot. It's a little bit of work before you get the virtual machine working on the network so it's best to do these commands (and other package installs) before the following steps. After the above type exit to leave the chroot and run umount /mnt/tmp.

lvcreate -n xen1-swap -L 128M /dev/vg
mkswap /dev/vg/xen1-swap

Create a swap device with the above commands.

auto xenbr0
iface xenbr0 inet static
pre-up brctl addbr xenbr0
post-down brctl delbr xenbr0
post-up iptables -t nat -F
post-up iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/24 -j MASQUERADE
address 10.1.0.1
netmask 255.255.255.0
bridge_fd 0
bridge_hello 0
bridge_stp off

Add the above to /etc/network/interfaces and use the command ifup xenbr0 to enable it. Note that this masquerades all outbound data from the machine that has a source address in the 10.1.0.0/24 range.

net.ipv4.conf.default.forwarding=1

Put the above in /etc/sysctl.conf, run sysctl -p and echo 1 > /proc/sys/net/ipv4/conf/all/forwarding to enable it.

cp /boot/initrd.img-2.6.18-3-xen-686 /boot/xen-initrd-18-3.gz

Set up an initial initrd (actually initramfs) for the domU with a command such as the above. Once the Xen domU is working you can create the initrd from within it which gives a smaller image.

kernel = "/boot/vmlinuz-2.6.18-3-xen-686"
ramdisk = "/boot/xen-initrd-18-3.gz"
memory = 64
name = "xen1"
vif = [ '' ]
disk = [ 'phy:/dev/vg/xen1,hda,w', 'phy:/dev/vg/xen1-swap,hdb,w' ]
root = "/dev/hda ro"
extra = "2 selinux=1 enforcing=0"

The above is a sample Xen config file that can go in /etc/xen/xen1. Note that this will discover an appropriate bridge device by default, if you only plan to have one bridge then it's quite safe, if you want multiple bridges then things will be a little more complex. Also note that there are two block devices created as /dev/hda and /dev/hdb, obviously if we wanted to have a dozen block devices then we would want to make them separate partitions with a virtual partition table. But in most cases a domU will be a simple install and won't need more than two block devices.

xm create -c xen1

Now start the Xen domU with the above command. The -c option means to take the Xen console (use ^] to detach). After that you can login as root at the Xen console with no password, now is a good time to set the password.

Run the command apt-get install udev, this could not be done in the chroot before as it might mess up the dom0 environment. Edit /etc/inittab and disable gettys on tty2 to tty6, I don't know if it's possible to use them (the default and only option for xen console commands is tty1) and in any case you would not want 6, saving a few getty processes will save some memory.

Now you should have a basically functional Xen domU. Of course a pre-requisite for this is having a machine with a working dom0 installation. But the dom0 part is easier (and I will document it in a future blog post).

Marc 'Zugschlus' Haber: About bugs that have been filed a long time ago

I recently had an issue where a remote host would frequently run out of memory after a number of processes had been invoked from remote. I looked in the wrong direction first, but finally found out that each process invocation leaves two sshd processes hanging around, which are eventually exhausting the memory on the box. Next step was finding out what happened for the sshd processes not to properly terminate. Eventually, I remembered that the incoming ssh connections were not invoked directly, but via a third host with “proxycommand ssh other-host socket %h %p”. Looking on other-host quickly showed a number of socket processes being around, and killing them made the sshds on the low-memory host vanish as well. Short-term remedy was therefore to set ClientAliveInterval in the low-memory host’s sshd configuration. I then searched for reasons why ClientAliveInterval is not set by default at least in Debian’s sshd configuration. I didn’t find a reason and proceeded to file a wishlist bug request againnst openesh-server for this option to be set by default. Before filing this bug, I routinely visited the BTS, just to find out that the bug was already filed. By me. One year and 285 days ago. And that the openssh maintainer(s) didn’t even bother to reply to it yet. Guys, this is a textbook example how to discourage people from filing Bugs against your packages. Please, give them at least the appreciation of a short ACK if you don’t get around to fixing the bugs in reasonably short time. Having a bug rot away uncommented and unfixed in the BTS for two years is simpy not acceptable. Yes, that goes even for a wishlist bug.

Russell Coker: free software liason?

In my previous work as a sys-admin I have worked for a number of companies that depend heavily on free software. If you use a commercially supported distribution such as Red Hat Enterprise Linux then you get high quality technical support (much higher than you expect from closed-source companies), but this still doesn't provide as much as you might desire as it is reactive support (once you notice a problem you report it). Red Hat has a Technical Account Manager offering that provides a higher level of support and there is also a Professional Services organization that can provide customised versions of the software. But the TAM and GPS offerings are mostly aimed at the larger customers (they are quite expensive).

It seems to me that a viable option for companies with smaller budgets is to have an employee dedicated to enhancing free software and getting changes accepted upstream. For a company that has a team of 5+ sys-admins the cost of a developer dedicated to such software development tasks should be saved many times over by the greater productivity of the sys-admins and the greater reliability of the servers.

This is not to criticise commercial offerings such as Red Hat's TAM and GPS services, a dedicated free software developer could work with the Red Hat TAM and GPS people thus allowing the company to get the most value for money from the Red Hat consultants.

If using a free distribution such as Debian the case for a dedicated liason with the free software community is even stronger, as there is no formal support organization that compares to the Red Hat support (there are a variety of small companies that provide commercial support, but I am not aware of a 24*7 help desk or anything similar). If you have someone employed full-time as a free software developer then they can provide most of your support. It would probably make sense for a company that has mission critical servers running Debian to employ a Debian developer, a large number of Debian developers already work as sys-admins and finding one who is looking for a new job should not be difficult. There are more companies that would benefit from having DDs as employees than there are DDs, this isn't an obstacle to hiring them as most hiring managers don't realise the technical issues involved.

This is not to say that a company which can't hire a DD should use a different distribution, merely that their operations will not be as efficient as they might be.

31 December 2006

Russell Coker: memes that damage debian

The Debian project is afflicted with several damaging memes. One that is causing problems at the moment is the idea that life should be fair. Unfortunately life is inherently unfair, it's not fair that those of us who were born in first-world countries (the majority of Debian developers) have so many more opportunities than most people who are born in "developing" countries, and things just continue to be unfair as you go through life. Unfair things will happen to you, deal with it and do what is necessary to have a productive life!

When one developer has regular long-term disputes with many other developers the conclusion is that the one person who can't get along is at fault. We can debate about whether one or two significant disputes are a criteria for this or whether having a dozen developers disagreeing with them is the final point. But the fact is that if there is a large group of people who work together well and an individual who can't work with any of them then there is only one realistic option, the individual needs to go find some people that they can work with - they can resign or be expelled. The fact that something slightly unfair might have happened a year ago is no reason for pandering to an anti-social developer. The fact that expelling a developer for being anti-social is unfair to them is no reason for damaging the productivity of all Debian developers.

Another problemmatic meme is the idea that we have to tolerate everyone - even those who are intolerant (known as the Limp Liberal meme). When someone has no tolerance for others (EG being racist or practicing sexual discrimination) then they have no place in a community such as Debian. They need to be removed sooner rather than later. All Debian developers know the problems caused by deferring such expulsion.

The final damaging meme that I have observed is you can't force a volunteer to do any work. On it's own that statement is OK, but the interpretation commonly used in Debian is you can't take their job away from them either. The most common example of this is when a developer is not maintaining a package and someone else does an NMU (non-maintainer upload) to fix a bug, the developer then flames the person who did this (usually to fix a severe bug). It seems to be believed that a Debian developer owns their packages and has a right to prevent other people from working on them. This attitude also extends to all other aspects of Debian, there are many positions of responsibility in Debian that are not being adequately performed and for which volunteers are offering to help out but being refused.

The idea of the GPL is that when a program is not being developed adequately it can be taken over by another person. However when that program is in a Debian package the developer who owns it can refuse to allow this.

30 December 2006

Russell Coker: more about vista security

While reading the discussion of Vista security on Bruce Schneier's blog it occurred to me that comparing the issues of DRM that face MS with the issues faced by SE Linux developers provides some benefits.

SE Linux is designed to enable the owner of a computer to effectively enforce security policies to protect their system integrity and the confidentiality of their data. Some of the SE Linux users (military users) use all the available features, but most people only use the targeted policy which provides a sub-set of the system integrity and data confidentiality protections that are available to give a greater ease of use.

Fedora and Red Hat Enterprise Linux ship with the SE Linux targeted policy enabled by default. This policy is not something that most users notice. The main program that is commonly used which might have an issue with the default SE Linux policy is Apache. Fedora and RHEL systems that do not run Apache (which is most of them) can run SE Linux with almost no costs.
setsebool -P httpd_disable_trans 1
/etc/init.d/httpd restart
It seems clear to me that there is no good reason for disabling SE Linux by default. There are reasons for running a particular daemon in the unconfined_t domain via the FOO_disable_trans boolean. EG to run Apache without restrictions you would type the above commands.

In spite of the SE Linux targeted policy being so easy to use, the fact that it prevents certain daemon compromises from allowing immediate control of the system, and also prevents some kernel exploits from working, there are still some people who turn it off when installing Fedora and RHEL systems and advise others to do so.

Given this great fear of some people to use a technology that is specifically designed for their own benefit I find it difficult to imagine that any users will be inclined to accept the MS DRM technology that is specifically designed to go against their interests.

ESR claims that the 64bit transition is the critical period for Linux to move on the desktop. While he makes many interesting observations I don't find his argument convincing. Firstly current P4 CPUs with PAE can handle significantly more than 4G of RAM (64G is possible now). Secondly it's quite possible to run a 64bit kernel with 32bit applications, this means that you can use a 64bit kernel to access >64G of RAM with each 32bit application getting direct access to something slightly less than 4G of virtual memory. As ESR's point seems based on total system memory the 4G per application doesn't seem to be an issue. As an aside the only applications I've used which could benefit from >4G are database servers (in the broadest interpretation - consider an LDAP server as a database) and JVM environments. Again it would not be difficult to ship an OS with mostly 32bit code that has a 64bit kernel, JVM, and database servers.

I hope that Vista will be a good opportunity for mass transition to Linux. Vista offers little that users desire, many things that will hurt them, and is expensive too!

With Vista you pay more for the OS and more for the hardware (Vista has the usual excessive Windows hardware requirements plus the extra hardware for TPM encryption) without providing anything substantial in return.

What I want to see next is support for Security Enhanced X to protect desktop environments against hostile X clients. This will make a significant difference to the security of Linux desktop environments and provide another significant benefit for choosing Linux over Windows. While MS is spending their effort in making their OS act against the best interests of the users we will keep making Linux enforce the access controls that users need to protect their systems. Hopefully Linux users will choose to use SE-X, but if they don't they are given the freedom to make that choice - unlike the poor sods who use Windows.

Next.

Previous.