Tag Archives: Ubuntu 10.04

Sun Java and Ubuntu 10.04

Sun JavaUbuntu decided to drop Sun Java from the latest release of Ubuntu, Lucid Lynx. However for me to get my internet bank to work, I need this package installed. A bit of googling turned up the solution, and here it is:

Add the Canonical Partner Repository:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

Then all you need to do is run the commands:

sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin

And there it is :)

Ubuntu mdadm: “Device or resource busy” error

I have been upgrading my old fileserver today with new hardware and 4 new 2 TB Hitachi disks. I thought I’d set them up in a Raid 5 array. This is a new installation of Ubuntu Server 10.04 running on an Asus Deluxe mainboard with a SIL SATA controller with 6 SATA ports.

Firstly: The array was created with the command:

mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sd[bcde]

This all went well enough, but after a reboot, I got this error when trying to assemble the array:

mdadm: Cannot open /dev/sdb: Device or resource busy

Looking about a bit on the net I find this blogpost which is quite helpful: Righteous Hack: Device or resource busy when using mdadm. However it doesn’t quite solve my problem as I already thought of these options and double-checked them. Some further searching revealed this helpful post on ubuntuforums: Raid stops after restart (SOLVED). That did the trick! Turns out that one of the raid-disks (was random on my server) is attempted assembled during startup when mdadm doesn’t know what raid to assemble from the conf file. The solution is running the command:

mdadm --examine --scan --config=mdadm.conf >> /etc/mdadm/mdadm.conf

which produce this line in the mdadm.conf file:

ARRAY /dev/md0 level=raid5 num-devices=4 UUID=eb001a5c:9a62bf3b:1b3376be:99c3df95
spares=1

Now the raid comes up as it should after reboot.

As for the RAID setup, I used this guide: https://raid.wiki.kernel.org/index.php/RAID_setup

Firefox Page Setup and A4

Firefox is a great web browser, but it is also insanely frustrating to work with sometimes. For instance will the Page Setup default to US Letter, possibly the two most annoying words you can come across in the world of printers and printing. How many times haven’t you seen some office printer stuck on “Please insert Letter” holding the entire print-queue back? Why the fuck the Americans can’t adapt to international standards however is another rant altogether.

Firefox Print DialogueAnyway, the issue in Firefox is that when you try to print a webpage to file, at least under Ubuntu (haven’t tested it elsewhere), the Page Setup tab is greyed out. You actually have to go to the Page Setup menu option to change this. The Page Setup menu option has no shortcut, so if you’re unlucky enough to have a window that is menu-less like in my internet bank when looking at a receipt after paying a bill, you’re basically screwed. There is no way you can change the paper format. Changing it in the main window doesn’t affect the other one, nor does it care about default settings when the print dialogue is called from JavaScript or Ctrl-P.

The solution to this is to change the default printing option in the config because you can’t change it under preferences either. Type about:config into the address bar, and change the setting named print.postscript.paper_size from “letter” to “a4″. That fixes this annoying issue once and for all. Of course this should be detected from the OS regional options, but as user friendly as Firefox is, it isn’t that user friendly.