Archive for the ‘General’ Category

Power to the people

Sunday, October 30th, 2005

I’m speaking at the IBM Linux Migration Seminar in Manchester on Wednesday. The topic will be “Direction of Linux from the opensource community” and I’ll be taking a similar role to that of Jono at a previous event. My interest is more technical but I’m aiming to target this at a wider audience and come down to the technicalities if I’m asked particular questions. Incidentally, IBM’s POWER website is now citing me as recommend reading. I like it when that happens.

Jon.

[PATCH] fix floppy.c to store correct ro/rw status in underlying gendisk

Saturday, October 29th, 2005

I got a little bored earlier while looking for something to write about in this month’s kernel hacking column. I came across a post from Evgeny Stambulchik which amused me because it referred to a bug that’s been present in Linux for donkey’s years and either nobody’s noticed or nobody thought it was worth fixing. The problem is experienced by mounting a floppy that’s been write protected and then doing:

mount -o remount,rw /dev/fd0

(or whatever). This should fail on a write protected disk, but it doesn’t because do_remount_sb thinks everything is ok when it checks the backing block dev to see if it is writeable (it is). Unfortunately, it’s not actually trivial for the aforementioned function to check whether the backing device itself is writeable (something missing in VFS?). So you bodge it by having the floppy_open function hack up the gendisk’s view of it’s read/write policy per this posting…

Evgeny Stambulchik found that doing the following always worked:

# mount /dev/fd0 /mnt/floppy/
mount: block device /dev/fd0 is write-protected, mounting read-only
# mount -o remount,rw /mnt/floppy
# echo $?
0

This is the case because the block device /dev/fd0 is writeable but the
floppy disk is marked protected. A fix is to simply have floppy_open
mark the underlying gendisk policy according to reality (since the VFS
doesn't provide a way for do_remount_sb to inquire as to the current
device status).

Signed-off-by: Jon Masters <jcm@jonmasters.org>

--- linux-2.6.14/drivers/block/floppy.c 2005-10-28 01:02:08.000000000
+0100
+++ linux-2.6.14_new/drivers/block/floppy.c 2005-10-29
18:14:47.000000000 +0100
@@ -3714,6 +3714,13 @@
USETF(FD_VERIFY);
}

+ /* set underlying gendisk policy to reflect real ro/rw status */
+ if (UTESTF(FD_DISK_WRITABLE)) {
+ inode->i_bdev->bd_disk->policy = 0;
+ } else {
+ inode->i_bdev->bd_disk->policy = 1;
+ }
+
if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL)))
goto out2;

Jon.

Calling America

Thursday, October 27th, 2005

I’m planning to spend the festive season in North America. I’ll fly over to New York (JFK) on December 14 and stay until around December 31 or a bit later. During that time, I’ve got to go visit a friend in California and possibly a few other folks too. I’ll also be in Canada for quite a bit of that time (I figure I’ll take the train from Penn station again). My plan is to go to Montreal for a couple of days, possibly take a train out to Halifax, and be in Ottawa on or around Christmas itself.

Jon.

HOWTO: Get broadband internet access in a Mumbai hotel

Tuesday, October 18th, 2005

I’m back in Mumbai for the second time in a week. The wedding was fantastic and I’ll write that up later when I’ve got all the photos uploaded and spent some time documenting the whole experience that has been this visit to India. But in the meantime, here’s an anecdotal story about my efforts to get online.

I’m staying at the Best Western in Mumbai. It’s recently had broadband and ethernet fitted so guests can use their laptops, replacing the older dialup sockets in many other hotels. Last time I was here, I used the business centre for a while, then moved room to get one with broadband ethernet internet access, then used the business centre when the connectivity did not work. This time, I was prepared to spend a few hours with tcpdump, arp and a bunch of other tools figuring out how the networking kit was broken. Here’s how to get broadband in this hotel:

  • Buy a 24 hour access card
  • Connect the laptop, notice it immediately gets a lease via DHCP both in Linux and also using OS X
  • Try accessing the gateway (172.18.1.1) without any luck.
  • Run tcpdump and see arp queries flying around the network, without replies. Figure out they’ve got broken switches.
  • Generate arp traffic to other hosts, find one that will tell you the address of the gateway box (00:D0:09:65:AB:07).
  • Manually add the entry into your arp table (arp -s 172.18.1.1 00:d0:09:65:AB:07).
  • Get online.

So, there you go. Something else they don’t teach you in school.

Jon.

Travel Itinerary

Wednesday, October 12th, 2005

I’ll be in India for a friend’s wedding from tomorrow for a week. I’m flying into Mumbai (Bombay) on Thursday and arriving in the evening. I’ll then have a day in the city before I get on another plane to Ahmedabad to meet Hetal and his family for the ceremony on Sunday. All told, I am excited about my first visit to Asia, but I’m a little apprehensive of using the Internet as a guage of local hotels so I’ve defaulted back to booking with Best Western. Maybe not the best, but at least I know roughly what I’m paying for when I hand over my credit card information. In case of incident (did you wonder why I post this information? that’s the reason folks), here’s my travel itinerary:


* THU13: London Heathrow (LHR) -> Paris Charles De Gaulle (CDG) - Air France AF 2471
* THU13: Paris Charles De Gaulle (CDG) -> Chhatrapati Shivaji (BOM) - Air France AF 134
* THU13: Staying at Best Western Emerald in Bombay (2 nights) - +91-22-26611150
* SAT15: Chhatrapati Shivaji (BOM) -> Ahmedabad (AMD) - Indian Airlines 603
* SAT15: Staying with friends in Ahmedabad (4 nights)
* TUE18: Ahmedabad (AMD) -> Chhatrapati Shivaji (BOM) - Indian Airlines 609
* TUE18: Will book based on the previous Best Western experience.
* FRI21: Chhatrapati Shivaji (BOM) -> Paris Charles De Gaulle (CDG) - Air France AF 135
* FRI21: Paris Charles De Gaulle (CDG) -> London Heathrow (LHR) - Air France AF 1270

I’m still looking into local Linux related events but I’ll mostly be doing touristy stuff. There was a plan to visit some other folks involved with one of the magazines, but that’s not happening since the logistics don’t work. I’m not going to Goa either and will spend some of the time I’m over there catching up on deadlines which are creeping up on me. Should loudly if you want me.

Jon.

The cutter and the clan

Monday, October 10th, 2005

I’ve almost got 100 tracks by Runrig now and growing. I’ve bought most of the albums I care about and have even ventured into iTunes. I’m listening to an eclectic mix from both before and after Donnie Munro left the band – including some rarish live recordings made in 1997 when the band did a tour of Germany to mark the aforementioned departure. They’re very very good live and I think I’m going to have to swing by one of their concerts to see them in person. Incidentally, Sharpemusique looks to be a pretty cool way of paying for digital music on Linux. I don’t mind paying 0.79GBP for a single track (that’s reasonablish) but I don’t want to not be able to play the track on my Linux PC. Using a combination of Sharpemusique, DeDRMS, a CVS build of faad and lame, it’s finally possible to pay for music online and store it onto your ipod from Linux. Not easy, but possible. Reminds me of the old days back in 1999/2000 when I first started playing with nist and css-cat as a way to playback test DVDs on Linux – in glorious 50% framedrop mode (at a push a 400MHz PII managed 50% soft playback). Those were the days.

I swung by the GP surgery (in the UK, we call our general medical practitioner a “GP” and can turn up for prebooked appointments all on the NHS – National Health Service – it’s called a welfare state and it’s something the US government has never understood) for some vaccinations against Typhoid and Hepatitis A. With a racing pulse (I absolutely refuse to visit a doctor unless I’m desperately in need of doing so – something to do with being in hospital for months once and never getting over having two blood tests per day in my arms and hands) I waited until I was called (they’ve got a red LED display now that shows your name when you’re called up, but they’ve stopped announcing the name so I can only assume they have some way of coping with those who need such an announcement made) and then sat for another 5-10 minutes after telling the nurse I needed Typhoid and Hep. A, while she refigured that out. I got a super-combo jab in one arm for those two and she offered to give me flu while I was there. With an offer like that, who could refuse? So if the right strain of flu tries to get me, I’m ok. Still nothing for bird flu and the jabs I had probably won’t be effective by Thursday, but meh. I feel better for going through the motions. I also started the anti-Maleria drugs this evening.

We saw a TV show tonight called “Wife Swap” (I think that this also exists in other countries). Ordinarily, I don’t watch this shite, but I was drawn in by the whole benefits issue. You see, in this country, we have the aforementioned welfare state, which also provides those who cannot work with an income. There’s a slight issue of one or two bazillion people who think it’s a good idea to leech off the state and just not work (because they’ll get benefit) but on the whole it’s a good idea. My view is that I’d rather pay for those people and accept that as a wastage in the system – the government wastes 300 million GBP per year on failed IT projects and lots of other useless things like ID cards, so even a billion wasted on benefits for those amongst the populus who probably could just be forced to get a job isn’t an issue – this contrasts with the views of those who read the Daily Mail and have a warped and twisted view (conversative view) that this country is overrun with such people as well as asylum seekers, etc. etc.

Unfortunately, this show had a stereotypical example of a couple on benefit who claimed they were making the choice to be at home with their kids and not work (wouldn’t that be nice if everyone could do that?). I’m all for the genuine example of one parent not working or of single mothers who need to look after their children, but this wasn’t anything like that. In this case, one of the older kids looked after her siblings while the dad went to the betting shop and the mother did whatever else she did in between smoking a million tonnes of tobacco, eating and uttering the odd “football, innit, wot” type things you might stereotypically expect. I still think it’s better to provide a welfare state for these people too (in addition to those that actually need it) but I understand how some people are annoyed that those who push the system sit at home with nice 40 inch TVs while others pay for them. One solution I propose is that we have government consultants who offer those in such situations financial bribes in return for allowing them to do the equivalent of what happened on this TV show I was watching – go into the family environment and make some useful suggestions, stay for a week and help them get jobs. It’ll never float as an idea because it’s too invasive, but it might work.

Jon.

LinuxWorld Expo UK 2005

Monday, October 10th, 2005

Photo: Bill Weinberg at the LinuxAwards 2005 ceremony.

The 2005 LinuxWorld Expo took place last week in London Kensington. I myself was there for both of the days and hosted several of the conference events, asked Microsoft people embarassing questions at the Great Debate, judged a number of the awards at this year’s ceremonial evening and even manned a stand for a while. On Tuesday evening, I was up talking to the organisers by phone until around 12:30 am and had met up with my friend Bill (after finishing work late – been using the BDI on MTD code quite a lot lately) and some friends for Thai food at a place near the conference hotel. Since I wasn’t staying that night, I had to get back to Reading (and a big thanks to the collective incapacity of the british railway network for cancelling all of the usual trains on that night so I had to get a 50GBP taxi to Reading) in the early hours in time to pack an overnight bag and return to the technical conference I was hosting by the morning. I managed it, just. Hosted a number of interesting talks from the likes of Alan Cox, Klaus Knopper and Mark Shuttleworth (and also introduced Bill on the second day at the business session).

Alan gave a talk on the Linux desktop, which I think went well. I added a few comments as the chair of the session and someone who has used Linux as his desktop since 1996. Wow, it’s changed a bit in that time, but it’s all fun. Klaus Knopper was talking about the cool stuff in Knoppix, about mergefs (I got him into a discussion of the relative merits of other approaches such as minifo aswell) and even libntfs and its limitation of not being able to rebalance the B-trees used by NTFS (but there should be some cool stuff happening there too in the next few months – I know Klaus was talking to the maintainers during the show). Microsoft made an appearance at the show in the lunchtime Great Linux Debate 2005 and I used the opportunity to have a nice little dig at Nick about how they can have all the money in the world and they’ll never have the passion which drives our community (and by extension drives some of us to go out of our way to see Microsoft fail). Mark Shuttleworth followed up on a few of my comments in the afternoon when I was talking to him after his talk on Ubuntu. Mark mentioned some cool features in Launchpad (enough that I should really go take a proper look now) and answered so many questions that the session overran quite substantially. Not that any of us cared – it was all pretty good stuff.

The Wednesday having been pretty damn busy, I tried checking into the Copthorne Tara for the night before going shopping for a last minute bow tie and cufflinks (the choice of a 27.50GBP set at Paddington station had seemed a little excessive – although I could have got two sets for 1GBP extra due to some pointless offer they were running in the store). The Copthorne had some computer issues so I ended up checking my luggage and walking over to a suit hire store with Daniel and grabbing some coffee on the way back along Kensington Highstreet. I ended up paying more by hiring some proper tousers aswell, but it saved having the ones I had brought with me dry cleaned. Not that I could find one of the suit jackets I wanted to wear with it – for all these suits I have here, I need to organise them properly and throw out the ones I don’t wear.

Photo: Alan Cox at the LinuxAwards.

The Wednesday evening ceremony went quite well. I had been one of the judges this year and proposed several of the entries – including at least one that we eventually voted to win. The Nokia 770 project was an example of an effort that I thought deserved some special recognition – not only do Nokia “get it” now, but they’re shipping a Debian based device to developers and have created a communicty project to help drive independent software development (so it’s all got a business motivation too – but they’re playing fair in the public perception). I enjoyed meeting Ari and Yannick, getting an invite to Helsinki, and especially having a 770 to play with. I’ve not taken it apart yet, but I’ve found what I presume to be a JTAG header and have done some analysis of the installed kernel – I’ve also got maemo and am pushing for kernel and toolchain sources for the model I have here so I hack on the VM and audio a little. Another special recognition went to Alan Cox (a liftetime achievement award) – I had them specially play “Rocket to the Moon” by Runrig when he went up to collect it, since I know he likes Runrig (he’s the one who got me into them).

Let see, I also took a bunch of photos of the awards on Wednesday night, wrote the voiceovers for people receving awards, had some interesting conversations with people like Alan (about ITE8212 “multicast” DMA type implementations of RAID1) and generally hung out with a load of really exciting people who made the evening fun. We had a characterturist draw the Linux User and Developer gang throughout the evening – he did what I figured he would with my large front teeth but it was pretty damn good – and I eventually popped in and out of the room once it got to Abba time (Becky tried to make me dance, but I’ll get my revenge by actually finding a pair of hot pants some time and turning up in the LU&D office with them). At 02:something, Bill and I started looking into the modifications of our book contract and borrowed the hotel business suite to print a few hundred pages of signables, a copier, and a stapler to collate them. That way, we could both get it done at the same time and I could ship 150 pages off to the publisher. I finally did get to sleep at around 04:00, just in time to be up late morning to return my suit and get over to the show for lunchtime cover of my friend’s business track and a bit of touring.

Thursday kind of involved lots of random things. There was a lot of coffee again, there was some sushi and a few businessy sessions. I reminded the Cyclades talk crowd that Cylades OOB infrastructure products are all the more cool because they’re powered by Linux and by the work of cool people like Marcello Tosatti and then hosted Bill’s session on VoIP as a disruptive technology of the future. He and I have just written an article on CE devices in the latest LU&D and once again paired as a team. I’m really looking forward to working with this guy on the book- and to hopefully visiting San Francisco again. I had some coffee with Richard and Daniel after the show and Kat and David joined us too. I then talked book stuff with the latter two over some rather enjoyable Wagamma and tea while they waited for their train.

I’ve been working all weekend on some backports from 2.6 to 2.4 and got into a fun debugging session at 04:00 on a Sunday morning. So I’ll be taking Monday off to chill out and get some vaccinations (managed to get an appointment from my surgery rather than the 77GBP private fee from my local travel clinic) for Typhoid and Hepatitis A. I’ll be travelling around bits of India for a week or so and then back here in time to give a talk in Manchester, visit a friend in Munich and some folks in Finland before planning some other more substantial trips. I’ve got to adjust my sleep pattern and do even more writing – especially as I have a new column and a few more articles in the pipeline in addition to my regular material and the book.

Jon.