LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-22-2009, 07:32 AM   #1
Ross Clement
Member
 
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171

Rep: Reputation: 30
Labelling(?) a usb drive so that it mounts in a unique location


Dear all,

I'm trying to label a samsung 1tb usb drive so that it mounts in a unique location. At present I've had some adventures that can't be undone, but what I have is this: An empty disk formatted in vfat (W95 FAT32). One primary partition. DOS compatibility mode set. All that done with fdisk. This drive was originally FAT32 when I bought it. I formatted it as ext3, but, when I did that Linux wouldn't auto-mount it.

Now in vfat again, it will automount it when I plug it in. But, it auto-mounts as /media/disk. Originally it mounted as /media/SAMSUNG. If it mounted as a unique name (/media/SAMSUNG would be fine, but /media/users or something would also do), then this would be a big advantage. But, how do I do it?

If I, seemingly successfully, format the drive as ext3, then how do I modify automount to make it automount? We use both Gnome and KDE? I'm presuming that using a journaling file system would be safer as it would be easier to recover from any future disk corruption. Wrong?

OS: Fedora 8. I'm trying to install this disk so that I can upgrade to Fedora 12, have user directories on the usb drive, and only the OS, software, and temporary directories on the main hard drive. This should make it easier to upgrade in the future. But I need everything copied to the USB drive first.
 
Old 11-22-2009, 07:36 AM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
You can label it thru command line when you format with

Code:
mkfs.ext3 -L SAMSUNG /dev/sdxx
where sdxx is your drive; sdb1, etc
that will format it ext3 and label it SAMSUNG

or you can also do this with Gparted
just right-click the line displaying the usb and choose
label

not sure how to label it thru command line without formatting it?
 
Old 11-22-2009, 07:49 AM   #3
Ross Clement
Member
 
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171

Original Poster
Rep: Reputation: 30
Thanks. I stumbled into finding out that:

/sbin/mkfs -t vfat -n SAMSUNG /dev/sdb1

gave me a vfat system that automounts on /media/SAMSUNG.

I can format the drive as ext3 no problem. But, no automounting when I plug the drive in. The drive should remain in more or less permanently (and be in during boot). But, how can I make it auto-mount in the correct place? If I give it a label, then I can add something to /etc/fstab, but will this apply when the drive is hot-plugged?
 
Old 11-22-2009, 08:38 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

You should post in one forum so no confusions arises.

Do a 'man uuid';

Quote:
uuid - DCE compatible Universally Unique Identifier library

SYNOPSIS
#include <uuid/uuid.h>

DESCRIPTION
The UUID library is used to generate unique identifiers for objects that may be accessible beyond the
local system. This library generates UUIDs compatible with those created by the Open Software Foundation
(OSF) Distributed Computing Environment (DCE) utility uuidgen.

The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique
across all systems. They could be used, for instance, to generate unique HTTP cookies across multiple
web servers without communication between the servers, and without fear of a name clash.
A search for 'uuid' here on LQ produced some useful information.

 
Old 11-22-2009, 09:16 AM   #5
Ross Clement
Member
 
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by onebuck View Post
Hi,

You should post in one forum so no confusions arises.

Do a 'man uuid';
I'm not sure how your reply is relevant to my question. Have you accidentally replied in the wrong thread?
 
Old 11-23-2009, 08:02 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by Ross Clement View Post
I'm not sure how your reply is relevant to my question. Have you accidentally replied in the wrong thread?
I apologize for the 'dupe' error. But 'uuid' would be a way to uniquely mount your device.

 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB thumb drive mounts read only in mandriva 2008 gpatto1 Linux - Newbie 3 01-25-2009 12:32 AM
uSB External Hard Drive Mounts Very Slowly rahulthewall3000 Linux - Hardware 0 01-20-2008 05:37 AM
USB flash drive (Pen drive) mounts read only prabhatsoni Linux - Hardware 24 07-02-2007 01:28 PM
USB drive mounts as media player beanbox Ubuntu 3 06-04-2007 03:35 AM
Lexar USB Jump drive mounts read only qaball Linux - Hardware 7 02-06-2004 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration