At a very early stage in the installation of the Ubuntu8.04 desktop I encountered some perplexing failures in the mount command and in my attempted alteration of the fstab file. Commands that had worked in Ubuntu's earlier LTS desktop failed both on the command line and when the file itself was executed. Moreover, with respect to the latter the results were similarly perplexing whether the file was executed during bootup or on the command line with the "a" option. Succinctly the problem is, I have not been successful mounting the external directories [1.] of the 6.06 desktop while on 8.04. Nonetheless, use of essentially the same commands work where I can see all the directories of 8.04 while running the 6.06 desktop. Moreover, with root level privileges on 6.06, I can copy, remove or alter files and sync in either direction. Those options are unavailable to me on 8.04.
My encounters with the fstab file tends to be of short duration high intensity, followed by long periods of benign neglect. My purpose is to have all my drives mounted properly and ready for use. In addition, I wish to see some external drives that I might use less often, but I need to have mounted and to have accessible should I need to pull files from that disc without resorting to ad hoc mounts. The fstab file has proven to be very efficient in meeting those needs for me. Finally, other than the external drives the distribution installations tend to do all the work.
The reasons I been trapped in this type of cycle are simple. The first is once I get it to perform the tasks I want implemented, messing with it makes no sense. The second is that after a long absence the command syntax fades from my memory. Until recently, that pattern has served me well.
While that section heading may be no surprise to many, I have been on a pair of older versions of Ubuntu well over two years. Hence, it was a shock seeing my ATA drives listed as sd[disc], which previously implied a SCSI type. Moreover, once I looked at the contents of the file, the change to using the UUID in place of the /dev/hd[disc][partition] was another shock. Nonetheless, I still expected the command line mounting to work:
~# sudo mount /dev/sda1 /media/sda1 ext3 relatime 0 2
[edit: on the command line, just prior to the "ext3" the option -t should have been inserted. The proper syntax (that I really did not use this time) is: device mount point -t type (disc options) dump priority.]
but it repeatedly showed me the canned help that was essentially useless. Despite retrying and reading the longer man (pages) on fstab, I could not discover my error. I am certain that syntax very near to the one shown above worked well on 6.06. I actually inserted the command above and it ran [2.], which again was counter to my experience with the 6.06 desktop. That is, command line versions functioned under either, the command line and the fstab file. And, of course, the Ubuntu fstab file now uses UUID to identity discs and partitions over the usual designation in the /dev directory. I will discuss that a bit more later.
The quality of fstab file as built during installation is quite high. Other than the hitherto new, to me notation using the UUID and selected options it is clearer than what I have seen on 6.06. To demonstrate I am showing an abbreviated version with a format alteration to make the commands fit within the fixed space format I use to display such content:
2$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system>
# <mount point> <type> <options> <dump> <pass>
...
# /dev/sdb1
UUID=00300b8b-...-4014-b819-c05f...c6a9
/ ext3 relatime,errors=remount-ro 0 1
# /dev/sdb2
UUID=4a2309f8-...-4d04-b58d-a6e6...24d3
/home ext3 relatime 0 2
# /dev/sdb3
UUID=623284e6-...-447e-a602-f0d6...6363
none swap sw 0 0
...
where the ellipses indicate I left off lines for the proc and removable media drives. Those excised were formated well.
After the repeated failures on the command line, I added the same command to the fstab file. Moreover, it seemed to work even adding a drive icon labeled sda1 onto the upper left of one of my screens. As a reminder [3.], here is the command pasted below the list above:
# <file system>
# <mount point> <type> <options> <dump> <pass>
/dev/sda1
/media/sda1/ ext3 relatime 0 2
However, it soon became evident that the contents exhibited were actually from the sdb1 drive. Another attempt used the UUID code [4.] for the sda1 drive, which failed in the same manner. That line is shown below:
# <file system>
# <mount point> <type> <options> <dump> <pass>
# /dev/sda1
UUID=d6e52f2c-...-4009-8c68-fd1...8bfbf
/media/sda1/ ext3 relatime 0 2
[edit: removed pound symbol mistakenly included in the paste in from the active copy of the fstab file. Just in front of the UUID=d6e52f2c-...]
At that point my efforts were stymied and I commented out the attempts to load the external drives.
I thought I had a hint of the potential cause of my difficulties mounting external drives, when I tested to see that all the drives and partitions were extant on this version. They were, but:
:~$ ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 16 2008-09-30 07:57 /dev/sdb
brw-rw---- 1 root disk 8, 0 2008-09-30 07:57 /dev/sda
brw-rw---- 1 root disk 8, 2 2008-09-30 07:57 /dev/sda2
brw-rw---- 1 root disk 8, 3 2008-09-30 07:57 /dev/sda3
brw-rw---- 1 root disk 8, 19 2008-09-30 07:57 /dev/sdb3
brw-rw---- 1 root disk 8, 1 2008-09-30 07:57 /dev/sda1
brw-rw---- 1 root disk 8, 17 2008-09-30 07:57 /dev/sdb1
brw-rw---- 1 root disk 8, 18 2008-09-30 07:57 /dev/sdb2
changes have been made from what I saw previously on older versions. Now instead of being directories, the drives were block devices [5.] and at least one had an anomalously small size. To not waste further time, neither is significant, they work and the apparent sizes are misleading being quite large binaries. This is neither the problem or the solution.
I had mentioned at the start my attention to mounting devices and altering fstab has been at best an intermittent activity. Hence, I tended to forget what I learned and I missed some of the subtleties. This time when I sought a reference on the command to list disc UUIDs (see footnote 4), I ran across a similar discussion when I scanned a bit further. I found the method I used to use as the mount point for external drives, i.e. /mnt directory. I have confirmed replacing /media/[drive name] with /mnt/[drive name] works.
What I have concluded is, /media/ had been allowed use of mounting all devices on its directory, but it was depreciated for fixed hard drives. That is, still allowed, but not favored. However, now on Ubuntu and probably other distributions it no longer works. Obviously, I have been out of touch and this change is not recent. Indeed when I began to use /media/ over /mnt/ was when I was tweaking my removable drives. I had the impression that the /mnt directory had been dropped. Obviously I misunderstood, since my concentration was upon getting devices working I missed the real meaning.
So, unexpectedly, the issue is solved for me. I would, however, add one caveat: it still does not look like the 6.06 with the drives visible on the desktop upon bootup. I think this probably flows from the mount points no longer being on the /media directory. In any case, I can live with that restriction easily, since my prime concern is having the ability to rsync across drives.
At the upper left two icons for the b drive one for root and the other for home allowed GUI browsing, which I can forego. Here is what the Ubuntu 6.06 desktop looks like for my sudo user:
Figure 1. Ubuntu Desktop 6.06 Showing External Drive Icons from Drive b
Booting up these are the first icons that appear, hence, their position on the upper left. The same icons appear on my regular user's desktop, but it is cleaner on the former.
I began this write up with doubts that it was safe for me to drop my 6.06 installation. I was worried my problems with the fstab file were due to a new generic flaw. Conceivably, I could lose any ability to communicate between discs on the same machine. The rsync command with its many advantages would be unusable in such a situation. My hope is this might help someone had encountered the same difficulties.
It was very late into the writing I stumbled across the explanation. Nonetheless, most of this article was completed before I understood how fstab now functions. However, I think seeing how easy it is to misunderstand configuration details, my misdirection can help others avoid similar problems. Now if you need access to external, fixed drives you have a workable solution.
I had complaints about unhelpful documentation of the mythical, all knowing Manual that too many reflexively call forth as a veritable deity. However, I excised that text, since I saw it was not productive. Therefore, my suggestion is to preserve and be open to learn from your and other's errors and if you can tune out the jerks.
Corrections, suggested extension or comments write: H. Cohen.
© Herschel Cohen, All Rights Reserved
I wish to thank both Tom Russell and Matt Mullins for catching my errors and their comments. I appreciated both for taking the time to write.
____________________________________________________________________
1. Yes the icon appeared saying it was the sda1 drive, but it
was spurious (and dangerous). The actual content was from
drive sdb1. Return
2. Not really, I made the mistake of using a digit one
priority, this causes it to take the place of the previous
listed high priority drive, sdb1. Again dangerous, however,
other results make me wonder if I misinterpreted the
listings. More later in the text. Return
3. One error I repeated make when attempting to mount new
devices is my forgetting to create the mount point
directories. This time I did not make that mistake as
often. Return
4. I found a discussion where this (of similar) command that
lists the UUIDs by drive on your system. I am not citing
the article here, because I think it differed from the one
I took this command version. ls /dev/disk/by-uuid -lah
Return
5. Whatever those are. Return
____________________________________________________________________