Naming problems

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Naming problems

Postby T J Tulley on Sun Jul 13, 2008 4:36 pm

I have just installed a card-reader mounted via a USB connection. With a card in it, it appears on my desktop as "2.1 GB Media". If I double-click on it, it opens in File Browser which calls it "disk". The card has been formatted in my camera, and contains the empty folder DCIM.

In Properties/Drive I have entered its mount point as /media/USB and its filetype as ext3.
I want to rename it as "xDPictureCard".

The command $ e2label /media/disk produces a response:
e2label: Is a directory while trying to open /media/disk
Couldn't find valid filesystem superblock.

The command $ e2label /media/2.1*GB*Media produces a response:
e2label: No such file or directory while trying to open /media/2.1*GB*Media
Couldn't find valid filesystem superblock.

How can I change its name, please?

BTW - I know e2label doesn't work for ntfs-formatted partitions - how can I change their names?
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Linux Mint is funded by ads and donations.
 

Re: Naming problems

Postby Mr. Blue on Mon Jul 14, 2008 5:38 pm

Hi there.

This may be a bit more complex than it looks, but let's see what we can find out.

With the card auto mounted on the desktop run:

Code: Select all
cat /etc/mtab


This will give you a list of all the mounted filesystems on your machine. You're looking for a line that looks something like this:

Code: Select all
/dev/sde1 /media/disk .....


This is from my mtab, but the /dev/sde1 is what we're interested in (or whatever yours is listed as next to /media/disk).

Now we can run this:

Code: Select all
sudo blkid /dev/sde1


I come up with:

Code: Select all
/dev/sde1: UUID="486D-07EB" TYPE="vfat"


If you get TYPE="ext2" or "ext3" then everything's good. e2label only works with ext2/3, so now you can run:

Code: Select all
e2label /dev/sde1 xDPictureCard


That should do it. Remount the card and it should be mounted on /media/xDPictureCard.

You can also run:

Code: Select all
 sudo vol_id /dev/sde1


This will give you a bunch of info and you should see the label listed.

I suspect you'll get the TYPE="vfat" line, though. Changing the label of a FAT32 or FAT16 filesystem, as far as I know, can only be done when formatting the device. But there is a less heavy-handed approach.

Using the "blkid" command you'll get the UUID of the card. This is an unchanging identifier that can be used in /etc/fstab.

So create the folder /media/xDPictureCard and create the line in /etc/fstab using the UUID and not /dev/sde1. Now, at least, the card will be mounted where and how you want every time, regardless of whether it's sde1 or sdf1 or sdg1, even though it doesn't have a label.

Hope that helps.
...and that should work...theoretically.
User avatar
Mr. Blue
Level 2
Level 2
 
Posts: 69
Joined: Sun Jul 13, 2008 9:25 pm

Re: Naming problems

Postby T J Tulley on Wed Jul 16, 2008 7:11 pm

Thanks Mr Blue - this problem has got worse! Please see my post in the Hardware Support forum - Topic: Card reader won't mount in Elyssa.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England


Return to Newbie Questions

Who is online

Users browsing this forum: EmpireITtech, Fixer1234, mhajii210 and 35 guests