change name

Mike Ballon mike.ballon at gmail.com
Tue May 6 07:29:51 MST 2014


First I was wrong to say that /dev/sdd1 would not exist it you simply
unmounted it. I believe it can vary between a physical system and a VM.

-- returns the memory stick i just plugged in and assigns device /dev/sdb

$> dmesg

[  452.300827] scsi 3:0:0:0: Direct-Access     Kingston DataTraveler 2.0
PMAP PQ: 0 ANSI: 4
[  452.302226] sd 3:0:0:0: Attached scsi generic sg2 type 0
[  452.316528] sd 3:0:0:0: [sdb] 15240576 512-byte logical blocks: (7.80
GB/7.26

-- automount presents the stick to me because it has a file system

$> mount | grep sdb

/dev/sdb1 on /media/UNTITLED type vfat

-- fdisk returns the partition info

$> fdisk -l /dev/sdb

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               2    15240575     7620287    b  W95 FAT32

-- use fdisk to delete the partition

$> fdisk /dev/sdb
$> Command > d
$> Command > w
$> Command > p

Device Boot      Start         End      Blocks   Id  System

-- use fdisk to create the partition

$> fdisk /dev/sdb
$> Command > o
$> Command > n
$> Command > 1 (press enter 3times)
$> Command > t
$> Command > b
$> Command > w
$> Command > p

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    15240575     7619264    b  W95 FAT32

-- make the file system if needed, I say if needed because since the
partition is exactly the same and the fs is the same, automount mounted the
stick for me automagically

$> umount /dev/sdb1
$> mkfs.vfat /dev/sdb1
$> mount /dev/sdb /mnt/foobar
$> touch /mnt/foobar/test.txt
$> ls /mnt/fobar

test.txt

-- oops forgot the renaming of volume, I'm on debian so

$> apt-get install mtools

Setting up mtools (4.0.17-1) ...

$> mlabel -i /dev/sdb1 ::usb_stick

again... gparted is your friend


On Tue, May 6, 2014 at 9:42 AM, Mike Ballon <mike.ballon at gmail.com> wrote:

> if you unmounted then /dev/sdd1 would no longer be there.
>
> Give me a few mins and I'll spin up a VM (I'm on a Mac) and I'll run
> through all the steps for you.
>
>
> On Tue, May 6, 2014 at 3:34 AM, Michael Havens <bmike1 at gmail.com> wrote:
>
>> bummer.... new drive:
>>
>> mount
>> ...
>> /dev/sdd1 on /media/bmike1/OpenELEC type vfat
>> (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
>> <unmout device with file manager>
>> bmike1 at PresarioLapTop1:/media/bmike1/OpenELEC$ sudo mkfs -t vfat
>> /dev/sdd1
>> mkfs.vfat 3.0.13 (30 Jun 2012)
>> /dev/sdd1: No such file or directory
>> bmike1 at PresarioLapTop1:/media/bmike1/OpenELEC$
>> bmike1 at PresarioLapTop1:/media/bmike1/OpenELEC$ sudo mkfs -t vfat
>> /dev/sdd1
>> mkfs.vfat 3.0.13 (30 Jun 2012)
>> /dev/sdd1: No such file or directory
>> bmike1 at PresarioLapTop1:/media/bmike1/OpenELEC$ sudo e2label /dev/sdd1
>> Pny2G
>> e2label: No such file or directory while trying to open /dev/sdd1
>> Couldn't find valid filesystem superblock.
>>
>> what am I doing wrong?
>>
>> :-)~MIKE~(-:
>>
>>
>> On Mon, May 5, 2014 at 8:28 PM, Michael Havens <bmike1 at gmail.com> wrote:
>>
>>> that wouldn't change a vfat system but it inspired the correct search
>>> terms and I found 'dosfslabel'. Thanks for the help, man:D
>>>
>>> :-)~MIKE~(-:
>>>
>>>
>>> On Mon, May 5, 2014 at 7:50 PM, Ryan Rix <ry at n.rix.si> wrote:
>>>
>>>> Yeah, you're right Mike.
>>>>
>>>> https://help.ubuntu.com/community/RenameUSBDrive#FAT16_and_FAT32
>>>>
>>>> Michael Havens <bmike1 at gmail.com> writes:
>>>> > same thing:
>>>> >
>>>> > sudo e2label /dev/sdd1 Goodwill
>>>> > e2label: Bad magic number in super-block while trying to open
>>>> > /dev/sdd1
>>>> > Couldn't find valid filesystem superblock.
>>>> >
>>>> > could it be because it is a vfat file system? (while I love linux I
>>>> > like to have the ability for my flash drives to be used on common
>>>> > computers)
>>>> >
>>>> > :-)~MIKE~(-:
>>>> >
>>>> > On Mon, May 5, 2014 at 5:51 PM, Mike Ballon <mike.ballon at gmail.com>
>>>> > wrote:
>>>> >
>>>> >     It's I file system label so yes, you'll need to format. If there
>>>> >     is no partition will have to create a partition before you can do
>>>> >     a mkfs gparted should do all that for you
>>>> >
>>>> >
>>>> >
>>>> >     On May 5, 2014 7:47 PM, "Michael Havens" <bmike1 at gmail.com>
>>>> wrote:
>>>> >
>>>> >
>>>> >         Thanks Mike. Does this error mean I need to format the drive?
>>>> >
>>>> >
>>>> >
>>>> >         sudo e2label /dev/sdc1 Goodwill
>>>> >         e2label: Bad magic number in super-block while trying to open
>>>> >         /dev/sdc1
>>>> >         Couldn't find valid filesystem superblock.
>>>> >
>>>> >
>>>> >         This is what 'mount' shows sdc1 to be:
>>>> >
>>>> >
>>>> >
>>>> >         /dev/sdc1 on /media/bmike1/OpenELEC type vfat
>>>> >
>>>> (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,
>>>> >         showexec,flush,uhelper=udisks2)
>>>> >
>>>> >
>>>> >         and to format this and apply the label it would be:
>>>> >
>>>> >         mkfs -t vfat /dev/sdc1;e2label /dev/sdc1 Goodwill
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >         :-)~MIKE~(-:
>>>> >
>>>> >
>>>> >
>>>> >         On Mon, May 5, 2014 at 4:08 PM, Mike Ballon
>>>> >         <mike.ballon at gmail.com> wrote:
>>>> >
>>>> >
>>>> >             e2label
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >             On Mon, May 5, 2014 at 7:05 PM, Michael Havens
>>>> >             <bmike1 at gmail.com> wrote:
>>>> >
>>>> >
>>>> >
>>>> >                 I have a few flash drives. When I plug them in to my
>>>> >                 computer a name referring to that flash drive appears
>>>> >                 in the file manager. I have two questions: the first
>>>> >                 is how do I change that name? The second is how do I
>>>> >                 set that name when I format the drive?
>>>> >
>>>> >                 :-)~MIKE~(-:
>>>> >
>>>> >
>>>> >                 ---------------------------------------------------
>>>> >                 PLUG-discuss mailing list -
>>>> >                 PLUG-discuss at lists.phxlinux.org
>>>> >                 To subscribe, unsubscribe, or to change your mail
>>>> >                 settings:
>>>> >
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>> >
>>>> >
>>>> >
>>>> >             ---------------------------------------------------
>>>> >             PLUG-discuss mailing list -
>>>> >             PLUG-discuss at lists.phxlinux.org
>>>> >             To subscribe, unsubscribe, or to change your mail
>>>> >             settings:
>>>> >             http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>> >
>>>> >
>>>> >
>>>> >         ---------------------------------------------------
>>>> >         PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> >         To subscribe, unsubscribe, or to change your mail settings:
>>>> >         http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>> >
>>>> >     ---------------------------------------------------
>>>> >     PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> >     To subscribe, unsubscribe, or to change your mail settings:
>>>> >     http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>> >
>>>> >
>>>> > ---------------------------------------------------
>>>> > PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> > To subscribe, unsubscribe, or to change your mail settings:
>>>> > http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>>
>>>
>>>
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20140506/fc097e6d/attachment.html>


More information about the PLUG-discuss mailing list