usbmount doesn't auto-mount external harddrive anymore in oneiric
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usbmount (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Oneiric |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
usbmount doesn't auto-mount external hard drive in Oneiric. This is considered a regression as it used to work in natty.
usbmount relies on /sbin/blkid to determine the file system type. blkid output is different in Oneiric and the regex fails to catch the file system type.
[Development Fix]
This was fixed in Debian package 0.0.22 and is meanwhile sync’d to Precise.
[Stable Fix]
The attached patch back ports the fix from Debian.
[Test Case]
Please see original report below.
[Regression Potential]
The patch itself is relatively small and unlikely to introduce regression.
[Original Report]
$: lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10
$: apt-cache policy usbmount
usbmount:
Installed: 0.0.21
Candidate: 0.0.21
Version table:
*** 0.0.21 0
500 http://
100 /var/lib/
usbmount uses '/sbin/blkid -p /dev/sdb1' to determine the filesystem type. It seems that the output of blkid changed from natty to oneiric:
natty:
$:/sbin/blkid -p /dev/sdb1
/dev/sdb1: UUID="ff3637e4-
oneiric:
$:/sbin/blkid -p /dev/sdb1
/dev/sdb1: UUID="ff3637e4-
The regexp in
FSTYPE=$(echo "$DEVINFO" | sed 's/.* TYPE="\
triggers on PART_ENTRY_TYPE which finds '0x83' as file system type and prevents it from being mounted.
Attached patch fixes this for me.
Logs before the patch:
Oct 15 19:39:33 eeebox usbmount[814]: loaded usbmount configurations
Oct 15 19:39:33 eeebox usbmount[814]: trying to acquire lock /var/run/
Oct 15 19:39:33 eeebox usbmount[814]: acquired lock /var/run/
Oct 15 19:39:33 eeebox usbmount[814]: /dev/sdb1 contains filesystem type 0x83
Oct 15 19:39:33 eeebox usbmount[814]: usbmount execution finished
Logs after applying the patch:
Oct 16 12:28:33 eeebox usbmount[4309]: loaded usbmount configurations
Oct 16 12:28:33 eeebox usbmount[4309]: trying to acquire lock /var/run/
Oct 16 12:28:33 eeebox usbmount[4309]: acquired lock /var/run/
Oct 16 12:28:33 eeebox usbmount[4309]: /dev/sdb1 contains filesystem type ext3
Oct 16 12:28:33 eeebox usbmount[4309]: mountpoint /media/usb0 is available for /dev/sdb1
Oct 16 12:28:33 eeebox usbmount[4309]: executing command: mount -text3 -onoexec,
Oct 16 12:28:33 eeebox usbmount[4309]: executing command: run-parts /etc/usbmount/
Oct 16 12:28:33 eeebox usbmount[4309]: usbmount execution finished
Related branches
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Status changed to 'Confirmed' because the bug affects multiple users.