Author Topic: Change Label name on dd's USb device  (Read 3384 times)

Sector11

  • Posts: 870
    • View Profile
Change Label name on dd's USb device
« on: February 26, 2013, 10:35:54 PM »
I need some help.

Conky's ${fs_size} doesn't like label names with spaces. and when one uses "dd" to get the ISO onto a USB device it has the label name: VSIDO LiveCD

Bummer,
  1. it's not a CD and
  2. I can't figure out how to change the label name.

Anyone know how I can change the Label on a DD'd USB?




Until then the last part doesn't work  :-[ 
PS: It would be really nice if future ISO's used VSIDO_Live
Stay Home

VastOne

  •      v-ger
  • Posts: 4197
    • View Profile
    • VSIDO Community
Re: Change Label name on dd's USb device
« Reply #1 on: February 26, 2013, 10:40:54 PM »
It is done!  It is now VSIDO_LiveCD
VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4197
    • View Profile
    • VSIDO Community
Re: Change Label name on dd's USb device
« Reply #2 on: February 26, 2013, 10:50:23 PM »
Also, can't you use this?

Code: [Select]
fs_size /dev/disk/by-uuid/uuid
As long as you know the uuid of the usb it should work

You can get uuid's with this

Code: [Select]
sudo blkid

VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

lwfitz

  • DEFCON 1
  • Posts: 1778
  • sudo rm -rf /
    • View Profile
Re: Change Label name on dd's USb device
« Reply #3 on: February 26, 2013, 11:36:15 PM »
^ +1 Should work just fine.

Using parted I believe if you right click on the volume you want you can change the label name there.
Don't Be A Dick!

Sector11

  • Posts: 870
    • View Profile
Re: Change Label name on dd's USb device
« Reply #4 on: February 27, 2013, 12:31:31 AM »
sudo blkid doesn't show a uuid.

Code: [Select]
26 Feb 13 | 21:16:07 ~
         $ sudo blkid
[sudo] password for sector11:
/dev/sda5: UUID="289be46c-c7ea-4c0b-b711-7fa44375bfa4" TYPE="ext4"
/dev/sda6: UUID="650b1aae-b0de-413e-a67d-a3e686eeb7a9" TYPE="ext4"
/dev/sda7: LABEL="VastOne Config" UUID="4419cbef-6b4b-4b0c-864d-c0fa72bc5705" TYPE="ext4"
/dev/sda1: UUID="4fb35957-ffa5-4011-8cae-a3ed9e293c3b" TYPE="ext4"
/dev/sda2: UUID="fabad1fb-6591-4c27-9b50-2720d9589d64" TYPE="ext4"
/dev/sda3: UUID="5fa66766-c42e-43bb-815d-02b1b2723b49" TYPE="swap"
/dev/sdb1: LABEL="VSIDO LiveCD" TYPE="iso9660"
 sector11 @ sector11
 26 Feb 13 | 21:16:15 ~
         $

parted?  I get nothing.
Code: [Select]
sector11 @ sector11
 26 Feb 13 | 21:16:15 ~
         $ parted
bash: parted: command not found
 sector11 @ sector11
 26 Feb 13 | 21:17:48 ~
         $

gparted sees an error with the usb - I think because it was created with "dd":
 

I checked out mlabel (part of mtools) but I can't even get it to read the label, let alone change it:

Code: [Select]
       Mlabel supports the following options:

       c      Clears an existing label, without prompting the user

       s      Shows the existing label, without prompting the user.

       n      Assigns a new (random) serial number to the disk

       N serial
              Sets the supplied serial number. The serial number should be supplied as an 8 digit  hexadecimal  number,
              without spaces

Code: [Select]
26 Feb 13 | 21:26:15 ~
         $ mlabel -s sdb1
Mtools version 4.0.17, dated June 29th, 2011
Usage: mlabel [-vscVn] [-N serial] drive:
 sector11 @ sector11
 26 Feb 13 | 21:26:31 ~
         $ mlabel -s drive:/dev/sdb1
Mtools version 4.0.17, dated June 29th, 2011
Usage: mlabel [-vscVn] [-N serial] drive:
 sector11 @ sector11
 26 Feb 13 | 21:26:37 ~
         $

Might need to wait for the new ISO  :D
Stay Home

Sector11

  • Posts: 870
    • View Profile
Re: Change Label name on dd's USb device
« Reply #5 on: February 27, 2013, 12:39:38 AM »
This doesn't work:
Code: [Select]
m/5 ${fs_size /dev/disk/by-uuid/289be46c-c7ea-4c0b-b711-7fa44375bfa4}
It says my /media/5 is only 10.0M - it is really 165GB - just a few bits and bytes different.
Stay Home