Unmounting external USB drives in Ubuntu 9.04

UPDATE root issue discussed below was fixed in Ubuntu 9.10 – unmounting and spinning down the drive works just fine from GUI

As some people know there are problems with correct unplugging of external USB hard drives on linux, Ubuntu in particular. The problem is that none of graphical managers support drive spindown when unmounting/ejecting the external hard drive. This can cause severe damage to HDD.

There’s an old bug in LP for that. The summary is that you can use a script by Clem-Vangelis and Dave Rosky to do the work. Later someone posted a link to scipt by Yan Li, which does even some more stuff.

But since Ubuntu 9.04 those scripts have stopped working – the drive kept spinning. Googling around I found a similar problem and found out the problem was in udev rules. There was a manul solution in comments of LP bug #388506 mentioning udev rules editing: in ubuntu 9.04 I needed to copy the 60-persistent-storage.rules file, modify ACTION!="add|change" to ACTION!="add". This way the scripts worked. Somehow when this rule is present my home partition couldn’t be mounted. So this rules file must be removed after external drive unmount.

To make things easier I merged the scripts by Clem-Vangelis,  Dave Rosky and Yan Li, updated it with udev rules workaround and done some other things. The script is as follows:

Continue reading “Unmounting external USB drives in Ubuntu 9.04”

Advertisements

Ubuntu 8.10 on HP Compaq nx6310

The specs
CPU: Intel CeleronM works out of the box
Chipset: Intel 945GM works out of the box
Video: Intel GMA 950 works out of the box DualHead included (yay! finally)
VGA (D-Sub) / DualHead: DualHead works out of the box. External dispaly on/off (Fn+F4) doesn’t work.
Optical drive: Matushita DVD-RAM UJ-840S works out of the box
Lan: Broadcom BCM4401-B0 works out of the box
WiFi: Broadcom 4311 doesn’t work out of the box. Need’s to fetch a firmware from the Internet
PCMCIA: Texas Instruments ( 8039 ?) not tested
Firewire: Texas Instruments ( 803a?) not tested
USB 2.0: works out of the box
Laptop lid indicator: doesn’t work at all

Continue reading “Ubuntu 8.10 on HP Compaq nx6310”