Once, when I filed suite to get the Labor Department to enforce the child labor laws for 16- and 17-year olds, kids whom they do not even pretend to protect, I got nowhere. I met with the Solicitor who told me: Look, suppose I agree with you. How would I ever get the money to enforce it? He was right. If I had won and they had issued regulations, it would have only been worse. In Labor, as in agency after agency, we have a vast complex body of law which would take mandarin to learn that no one enforces.. The law is there. On paper. Indeed, it is a lot of paper. How much paper? Fifty volumes, in paperback in total. I know because I counted. But as to big chunks in these volumes, there is no one there to enforce it. p. 48Lots of paper I think can make people comfortable in thinking that famous Virginia Slims Slogan, We’ve come a long way, Baby, when it fact, it can often just means what it literally looks like, “Damn, that’s a buttload of paper.” There is a lot more packed into this tiny book, covering the deep gulf between left and right, the stagnation of an old constitution that is impossible to revise, the loss of accountability in all branches of government, the redrawing of districts, and the slight expansion and curbing of of majoritarian voting in the last hundred years. It gets a little shrilly by the end, but you know, it is all pretty upsetting stuff and it is good to shrill from time to time. Though he never refers to neoliberalism, capitalism, or postmodernism, this book is also a great companion to a class of this literature on the rise of fragmentation and instability in social and cultural life brought forth by changes in the economic system (thinking here of David Harvey, Fredric Jameson, etc). In fact, I think it does a much better job than at relaying how it is that vast sectors of society experience fragmentation, instability, and frustration.
$ /sbin/fdisk -lu disk.img
You must set cylinders.
You can do this from the extra functions menu.
Disk disk.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
disk.imgp1 * 63 96389 48163+ 83 Linux
disk.imgp2 96390 2056319 979965 82 Linux swap / Solaris
disk.imgp3 2056320 78140159 38041920 5 Extended
disk.imgp5 2056383 3052349 497983+ 83 Linux
disk.imgp6 3052413 10859939 3903763+ 83 Linux
disk.imgp7 10860003 68372639 28756318+ 83 Linux
disk.imgp8 68372703 76180229 3903763+ 83 Linux
disk.imgp9 76180293 78140159 979933+ 83 Linux
The first few lines is fdisk complaining not being able to extract the
number of cylinders, since it has to operate on a file which does not provide
an ioctl interface.
The first important data are the units, which are stated to be 512 bytes per
sector. We take note of this value as the factor for use in the next
operation.
Let's say we want to access the 7th partition, which is 10860003 sectors into
the disk, according to the fdisk output. We know that each sector is 512
bytes, so:
10860003 * 512 = 5560321536Passing this number to losetup produces the desired result:
# losetup /dev/loop0 disk.img -o $((10860003 * 512)) # file -s /dev/loop0 /dev/loop0: Linux rev 1.0 ext3 filesystem data # mount /dev/loop0 /mnt [...] # umount /mnt # losetup -d /dev/loop0If the partition really holds a normal filesystem, you can also let mount set up the loop device, and manage it automatically:
# mount -o loop,offset=$((10860003 * 512)) disk.img /mnt [...] # umount /mntAnd since there's aparently no means to automate the whole process for an entire disk, I hacked up plosetup. Enjoy:
# plosetup lapse.hda . I: partition 1 of lapse.hda will become ./lapse.hda_p1 (/dev/loop0)... I: plosetup: skipping partition 2 of type 82... I: plosetup: skipping partition 3 of type 5... I: partition 5 of lapse.hda will become ./lapse.hda_p5 (/dev/loop1)... I: partition 6 of lapse.hda will become ./lapse.hda_p6 (/dev/loop2)... I: partition 7 of lapse.hda will become ./lapse.hda_p7 (/dev/loop3)... I: partition 8 of lapse.hda will become ./lapse.hda_p8 (/dev/loop4)... I: partition 9 of lapse.hda will become ./lapse.hda_p9 (/dev/loop5)... # ls -l total 0 lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p1 -> /dev/loop0 lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p5 -> /dev/loop1 lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p6 -> /dev/loop2 lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p7 -> /dev/loop3 lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p8 -> /dev/loop4 lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p9 -> /dev/loop5 # plosetup -c . # ls -l total 0(this post is dedicated to Penny for no other reason than the tunes I am listening to right now) NP: Fly My Pretties / The Return of Fly My Pretties Update: Be careful about the $((...)) style arithmetic. dash manages to overflow at 32bit. zsh and bash seem to get it right. If in doubt, use perl or a calculator.
#!/usr/bin/perl use Asterisk::AGI; use IO::Socket; # Set this to the broadcast address for your network $netbroadcast = "172.16.0.255"; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); my $num = $input 'callerid' ; my $name = $input 'calleridname' ; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); $date = sprintf("%02d/%02d/%4d %d:%02d:%02d",$mday,$mon+1,$year+1900,$hour,$min,$sec); $sock = IO::Socket::INET->new(PeerPort => 6948, PeerAddr => $netbroadcast, Proto => udp, Broadcast => 1 ) or die "Can't bind : $@\n"; print $sock <<EOT; <?xml version="1.0"?> <mythnotify version="1"><container name="notify_cid_info"><textarea name="notify_cid_line"><value>Unused</value></textarea><textarea name="notify_cid_name"><value>NAME: $name</value></textarea><textarea name="notify_cid_num"><value>NUM : $num</value></textarea><textarea name="notify_cid_dt"><value>$date</value></textarea></container></mythnotify> EOT close $sock; exit(0);That was accomplished by just adding an AGI(mythcid.agi) application call to one my existing extensions that handled incoming calls. Future enhancements will involve displaying who the caller wants to speak to after they've selected the appropriate response from the menu we give most callers. The Asterisk::AGI Perl module was a bit hard to track down. I've made a 2 second (dh-make-perl) Debian package of it, available here. If I get sufficiently motivated, I'll consider cleaning it up and uploading it to Debian.
Jan-Marek and Florian talked us through their setup. They're using
FAI to automate
installation of systems, along with LDAP to store
lots of configuration information and GOsa as a user-friendly front-end
to that configuration. They've integrated these to enable some very
clever management features so that all aspects of the city-wide system
can be maintained from one central point. As new machines are
introduced onto the network, they can be configured into one class or
another: simple desktop clients up to so-called "depot" servers, used
as seeds for further clients. Individual user profiles can be tweaked,
giving users access to new applications as they are needed. Shared
resources like network storage and printers are set up automatically
from the LDAP database. Access to USB storage devices can be
controlled on a per-device, per-user basis for security.
That's quite an impressive feature list. Most of the work has been
in configuration and systems work rather than custom packages on the
clients themselves - the vast majority of the packages installed come
straight from the standard Debian archive, with some backports (like a
newer version of KDE). Building on top of standard packages means that
they have access to a huge amount of Free Software without having to
do all of the work themselves. A small team (10-ish at the moment,
growing to 100 or so in the future) can effectively deploy and manage
desktops and associated servers for a huge number of
users - they're expecting to be supporting on the order of 30,000
systems 2 years from now.
The team have just recently made their first stable release and are
starting to roll it out across the city, one department at a
time. There are the familiar issues involved in the deployment, of
course. For example, users don't want to help test pre-release
versions to help nail bugs, but then complain loudly when they find
bugs in the first release. And in such a large project to migrate from
predominantly Windows (NT4!) desktops to KDE on Linux, a major part of
the effort needed is in user training. There is quite a bit of support
and custom work needed to convert people's MS Office macros over to
working on top of OpenOffice. And there are still quite a number of
users who will remain using Windows for specific applications that
still don't have Linux equivalents yet. Apparently the "Wine Cellar"
group will help on that front. *grin*
In terms of collaborating with Debian, the LiMux team are expecting
to help in a few ways. As bug reports are filed against their
applications (apparently very few so far), they'll be pushed upstream
along with (hopefully) fixes for them. They will also be devoting some
full-time developer effort to security work; it would be good for both
sides if this effort can be shared.
It was quite striking to see Tux, the Linux penguin, as a visible
logo in local government offices! The team have clearly made some
excellent progress on this exciting project, and I'm sure that I can
speak for all of Debian in wishing them the best of luck in the
future. I'll be watching with interest...
Next.