Renaming a pendrive

Hi,

I recently formatted a pen-drive which I used in Windows. I just deleted the partition from the Partitioner (from YaST) and then created only one partition and formatted with FAT. After re-inserting the pen-drive in the system, it just has a random name now! If I right click it (as a normal user), the ‘rename’ option is not highlighted. So how could it be renamed…?

Thanks.

Hi
Use e2label from the command line, unmount the device (from memory)


su -
umount /dev/sdX
e2label /dev/sdX your_label

Unplug the device, replug and enjoy.

Well, I did this but I got some error like as follows:

linux-5rxn:~ # e2label /dev/sdb happy218
e2label: Bad magic number in super-block while trying to open /dev/sdb
Couldn't find valid filesystem superblock.

linux-5rxn:~ # umount /dev/sdb1
linux-5rxn:~ # e2label /dev/sdb1 happy218
e2label: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.


I just did with both – sdb and sdb1 to make sure that it is done. Only one pendrive is inserted at the moment.

linux-5rxn:~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0    23G  0 part /
├─sda2   8:2    0     5G  0 part [SWAP]
└─sda3   8:3    0 204.9G  0 part /home
sdb      8:16   1   7.6G  0 disk 
└─sdb1   8:17   1   7.6G  0 part /run/media/linuxearth/9FF1-0A93
sr0     11:0    1  1024M  0 rom 

Thanks.

Forgot to mention that I did from “root login”.

e2label is for ext2/ext3/ext4 filesystems, not FAT! That’s why you get that error message.

For relabelling FAT, see here:
Labelling FAT/FAT32 partitions in Linux
or here:
Linux - Modify the partitions labels

Install the package “mtools” if necessary and run:

sudo mlabel -i /dev/partition ::my_label

Hi
Can it be reformated? If so, just use;


mkfs.vfat -n your_label -F 32 /dev/sdb1

Assuming it’s set to the right type via fdisk…

Well, this worked. I didn’t install ever the package “mtools” but it was in the YaST (might have come during the up-gradation process, I guess). By using this command, it didn’t require unmounting and did! :slight_smile:

Well it works but first I unmounted. I again changed the name with this command.

Assuming it’s set to the right type via fdisk…

By default it should be set to right…, is it true?

Thanks.

I wasn’t sure whether it is installed by default or not. Apparently it is… :wink:

It seems like that…Can you please point me to the link where I can see all the apps which come by default with 12.3 openSUSE KDE when none of the extra packages is installed from YaST. Thanks.

If you want to have a list of all packages installed on a default installation, I don’t think there is one. It depends on your system and the selections you make during the install which packages are actually installed, at least to a certain extend.

But you can see what you have installed in YaST->Software Management.
Select “View”->“Repositories” and mark the “@System” repo (should be selected by default). All packages ticked are installed.
Apper can show you that as well, you find it in the start menu in System->Configuration.

And of course most applications should be listed in the KDE start menu. :wink:

Okay, thanks for this. I just asked that particular thing for information point of view. And it can be seen!

Thanks.

And it is a long list! :slight_smile: