Sunday, 19 June 2011

Ubuntu Tinkerings 1: Zotero, NTFS and missing devices.

Recently, following a hiccup with my Internet connection, I decided to completely reformat my laptop and start again*.

I use a 3 partition system: An ext3 (now ext4) primary partition containing Ubuntu; an NTFS primary partition containing Windows 7; and an extended partition containing my swap partition and an NTFS data store.

Following the reinstall I encountered a couple of problems setting up Ubuntu.

Zotero and NTFS partitions

I use zotero (alongside BibTeX) for bibliography management. Zotero saves a reference database locally, in my case in the data partition. After changing zotero's settings to point it at the database I had restored from backup it promtly crashed, and refused to open.

Thankfully the solution was straightforward. An error of omission on my part. I had not set up Ubuntu to both read and write NTFS partitions. This is easily achieved using ntfs-config, which you can install and run using the following terminal commands:
sudo apt-get install ntfs-config hal

gksu ntfs-config
N.B. Not installing hal may result in this error "ntfs-config [errno 2] - try installing hal". Hopefully udev will soon remove this requirement.

By ticking both boxes (see below) and clicking close the problems should be solved.
The ntfs-config dialogue box
It all now works!

Missing devices and fstab

The second issue was more cosmetic.

During boot, Ubuntu would complain that both /dev/sdb2/ and /dev/sbd1/ were missing, requiring me to key "S" to skip and continue booting. After hunting for a solution I realised that this originated from running pysdm while both a USB drive and an external hard drive were connected.

In order to solve this issue you need to be sure that the partitions or drives mentioned during boot are not present (eg. not on an internal HD). If they are there is a chance you may prevent access to drive you wish to mount at boot.

Make a note of the device name(s) (eg. /dev/sdb2/) you will need these in the next step.

You may wish to backup first by running:
sudo cp /etc/fstab /etc/fstab.bak
To fix the problem I ran:
sudo gedit /etc/fstab
This loads the file systems table in a text editor.

Comment out (add # at the begining of) each of the following 2 lines:
/dev/sdb2    /media/sdb2    ...   0    0
/dev/sdb1    /media/sdb1    ...   0    0
The lines should look something like this:

# /dev/sdb2    /media/sdb2    ...    0    0 
# /dev/sdb1    /media/sdb1    ...    0    0
Next time you startup the "missing device" error messages should not occur.

* At the time I had not realised that the problem was with the router.

P.S. This is a record of my tinkerings, follow at your own risk. I make no claim to know what I'm doing.

No comments:

Post a Comment