PKILL-9

Wayno’s sojourn and solutions through Linux

  • Home
  • About

8

Jul

Removable USB devices and fstab settings

Posted by admin  Published in fstab, loni

I have a 1 t/b back up drive, which is a USB drive.

However, the device names seem to change automagically.

Power interruptions, or even things like Virtual Box will cause the drive to dismount and re-mount, changing the device name, and causing havoc elsewhere for things like my music and ftp site which are stored on this device.

So, what’s the easy way to fix this? Well thanks to Loni, here’s what we did:

1. Change directory so we can get information by UUID. (Universally Unique Identifier)


cd /dev/disk/by-uuid

2. Look at the UUID’s in the system:


ls -l

You will get output that looks like this:

@Homer:/dev/disk/by-uuid$ ls -l
total 0
lrwxrwxrwx 1 root root 10 2010-07-08 00:21 14ff50b3-49c0-4dbb-a392-55fb94a7730f -> ../../sdb2
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 5ed81b0d-ae9a-41b1-b4c7-02b500b94bea -> ../../sda5
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 92569F58569F3C43 -> ../../sda1
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 949CA48C9CA46A86 -> ../../sda3
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 c07c1084-ff98-49dc-87c7-672651dc4d2e -> ../../sda4
lrwxrwxrwx 1 root root 10 2010-07-08 00:21 FC1268B212687414 -> ../../sdb1

4. Now let’s edit the Linux file structure table, fstab

Note any thing with a # in it is a comment does not need to be coded!


cd /etc

5. First let’s backup the file in case we make mistake (always have a path back to the way it was, before you messed it up!) More complete details are here.


sudo cp fstab fstab.bkup

6. Now edit the file:


sudo nano fstab

OR


gksudo gedit fstab # use gedit

7. add the following similar lines:


UUID=14ff50b3-49c0-4dbb-a392-55fb94a7730f /waynobfd ext4 rw 0 0
#
UUID=FC1268B212687414 /waynontfs ntfs rw,nosuid,nodev,allow_other,blksize=4096 0 0

The first line above, mounts an ext4 partition by UUID (from the information we obtained before) and gives it the mount point of /waynobfd (previously created with the mkdir command.)

The second line above mounts an ntfs partition, called waynontfs. Handy for use with Windows.

By using UUID, if the device changes due to things like VirtualBox or maybe a power hiccup that affects the drive, though the device may change, the mount point will always be correct.

End of Problems! Thanks Loni!

No user responded in this post

Subscribe to this post comment rss or trackback url
Leave A Reply

 Username (*required)

 Email Address (*private)

 Website (*optional)

Please Note: Comment moderation maybe active so there is no need to resubmit your comments

Search

About

PKILL-9

Categories

  • apt-get (2)
  • Audio (4)
  • Browsers (4)
  • Compiling Source Code (2)
  • Deposit @ Home (1)
  • DVD (4)
  • filesharing (2)
  • fstab (1)
  • ftp (1)
  • gnome (4)
  • grub (2)
  • Internet Connection Sharing (1)
  • Joe (2)
  • loni (3)
  • Music (3)
  • netbook (1)
  • samba (2)
  • sound (2)
  • ssh (1)
  • Thunderbird (1)
  • Uncategorized (26)
  • ups (1)
  • video (2)
  • wireless (1)
  • word processors (2)
  • X11 (1)

Archives

  • July 2010 (7)
  • April 2010 (5)
  • March 2010 (3)
  • February 2010 (7)
  • January 2010 (1)
  • December 2009 (1)
  • October 2009 (4)
  • September 2009 (1)
  • July 2009 (1)
  • June 2009 (3)
  • May 2009 (5)
  • April 2009 (6)
  • March 2009 (3)
  • February 2009 (6)

Blogroll

  • Dynamic Designz - Linux Help Site
  • Plugins

Pages

  • About

Meta

  • Log in
  • Main Entries Rss
  • Comments Rss
September 2010
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
27282930  

Recent Posts

  • Forcing a Web Browser to Save a File instead of Streaming it
  • Getting Ubuntu 10.04 Video/Audio to work with an Intel 82815 Chipset
  • Recovering Ubuntu/Debian Linux after a Windows Install/Hiccup
  • How to configure Samba in Ubuntu using a gui
  • Removable USB devices and fstab settings
  • Fixing gnome-typing-monitor in Ubuntu 10.04 (lucid lynx)
  • Sorting Bookmarks (alphabetically) in Firefox
  • installing ubuntu-restricted-extras under wubi
  • How to do Certificate Based ssh Authentication
  • Thunderbird 3.X Performance Enhancement

Recent Comments

  • admin in Getting Ubuntu 10.04 Video/Audio to work with an I…
  • Erick in Getting Ubuntu 10.04 Video/Audio to work with an I…
  • admin in Getting Ubuntu 10.04 Video/Audio to work with an I…
  • Erick in Getting Ubuntu 10.04 Video/Audio to work with an I…
  • terry in Getting Ubuntu 10.04 Video/Audio to work with an I…
  • admin in Changing Default Language for Abiword
  • PKILL-9 » Post Topic » … in Recovering after hosing /etc/fstab
  • tux in How to do Certificate Based ssh Authentication
  • tux in How to do Certificate Based ssh Authentication
  • lornix in Thunderbird 3.X Performance Enhancement
© 2007 PKILL-9



Theme by WebRehash | Free WordPress Templates | Valid XHTML | Valid CSS 3.0 | Powered by Wordpress, Installed by Installatron.