[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Renamiing a USB external h/d



Thanks Andrei, its now all working perfectly.

Sharon.

On 13 January 2012 12:28, Andrei Popescu <andreimpopescu@gmail.com> wrote:
> On Vi, 13 ian 12, 11:06:26, Sharon Kimble wrote:
>>
>> OKay, this is what I did;-
>> sudo umount /dev/sdb1
>>
>> sudo e2label /dev/sdb1 backup
>>
>> sudo mkdir /media/backup
>>
>> sudo emacs /etc/fstab
>> The fstab line now looks like this;-
>> #/dev/sdb1       /media/8eef3b99-c17b-4913-ae61-d34c7fd5d459_     auto
>>    defaults   0       0
>> /dev/sdb1      /media/backup                                    auto    defaults   0       0
>
> ^^^^^^^^^^^
> Bad idea! I explicitly wrote LABEL=backup, because device names may
> change. You should only use LABEL= or UUID= in fstab otherwise you might
> surprises in the future. However, it turns out you are NOT using fstab,
> so best you just disable the entry completely.
>
>> sudo mount /media/backup
>>
>> I then ran ls -l /media which showed;-
>> drwxr-xr-x   2 root root  4096 Jan 12 11:19
>> 8eef3b99-c17b-4913-ae61-d34c7fd5d459_
>> drwxr-xr-x 141 root root 16384 Jan  8 04:30 backup
>> lrwxrwxrwx   1 root root     6 May 22  2011 cdrom -> cdrom0
>> drwxr-xr-x   2 root root  4096 May 22  2011 cdrom0
>> drwxr-xr-x   3 root root 20480 Dec 16 02:36 disk
>>
>> I then unplugged the usb drive and plugged it back in again and it
>> shows with ls -l /media
>> drwxr-xr-x   2 root root  4096 Jan 12 11:19
>> 8eef3b99-c17b-4913-ae61-d34c7fd5d459_
>> drwxr-xr-x 141 root root 16384 Jan  8 04:30 backup
>> drwxr-xr-x 141 root root 16384 Jan  8 04:30 backup_
>>
>> Where have I gone wrong please, and how do I put it right?
>
> You misinformed us, your drive is not mounted via fstab, but by some
> automounter. Try this instead:
>
> # disable the entry in fstab
> umount /dev/sdb1
> # unplug the drive
> rmdir /media/backup
> # plug the drive
>
> You should now have your drive available under /media/backup.
>
> Explanation: your auto mounter is mounting the drive under /media in a
> directory created as needed, based on the label (if it exists) or UUID
> of the filesystem. If the directory already exists (since you created
> it) it will use label + '_' to avoid conflicts with more static mounts
> (like fstab entries).
>
> Hope this helps,
> Andrei
> --
> Offtopic discussions among Debian users and developers:
> http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic



-- 
A taste of linux = http://www.sharons.org.uk/taste/index.html
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian 6,0.3, Gnome 1:2.30+7, LibreOffice 3.4.4
Registered Linux user 334501


Reply to: