Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How do I rename HDD name / label in Ubuntu?

  • 29-06-2011 7:41pm
    #1
    Registered Users, Registered Users 2 Posts: 949 ✭✭✭


    Hi Guys

    Very new to using Linux but im enjoying the learning curve

    I have my internal HDD that has my OS which is fine
    However I also have another internal drive that is located in \media
    This is a drive that just stores pictures etc, when i go to \media there drive is called HDD3
    However when you go into the drive its called Pictures HDD3 which is what I want.

    How do I properly rename it? And what is the difference between the Name and Label.

    SOME INFO:
    Ubuntu 11.04
    Ive GParted installed
    Output for /etc/fstab is :

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>

    proc /proc proc nodev,noexec,nosuid 0 0
    /dev/sda5 none swap sw 0 0
    /dev/sda1 /media/HDD3 ntfs-3g defaults,user,locale=en_US.utf8 0 0


    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 3,739 ✭✭✭Stuxnet


    if you open gParted, and right click the drive you want to rename,
    click label from the menu, and put in what ever you want then apply it.

    they will automatically be renamed in your places then (maybe after a reboot)

    thasts what ive done anyway.....http://i55.tinypic.com/2pyw56s.png


  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    Disk Utility
    Ubuntu+Disk+Utility+.png


  • Registered Users, Registered Users 2 Posts: 949 ✭✭✭M.J.M.C


    iPwnage wrote: »
    if you open gParted, and right click the drive you want to rename,
    click label from the menu, and put in what ever you want then apply it.

    they will automatically be renamed in your places then (maybe after a reboot)

    thasts what ive done anyway.....http://i55.tinypic.com/2pyw56s.png

    Thanks I'll give this a try when I get home. I think when I went to change the label in GParted it gave me an warning to say Data could be lost, so wanted to confirm first


  • Registered Users, Registered Users 2 Posts: 949 ✭✭✭M.J.M.C


    This is what I get when I select the drive,
    I want to rename it to Blu-ray HDD5 & the package in question is already installed

    b4ah60.png


  • Registered Users, Registered Users 2 Posts: 3,739 ✭✭✭Stuxnet


    Im not sure ?

    but..can you run gparted from a live cd/usb, you can download a gparted iso and burn it,I bet you'll have no problems then, as none of your drives for definite wont be mounted by default, and you should be able edit,


  • Advertisement
  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    Post up the output of running the 'mount' command. This should show us the name of the drive and its location. Then you can change the label using e2label 'location' label.


  • Registered Users, Registered Users 2 Posts: 949 ✭✭✭M.J.M.C


    Thanks for the reply,

    This is the output from "mount" - not sure what you meant from the rest of your post
    -snip-
    


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    List the currently mounted partitions with their labels:
    [james@brain ~]$ sudo mount -l
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=765508,mode=755)
    run on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
    /dev/disk/by-uuid/e674b744-16aa-4c27-95d4-993c31e274fc on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
    devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
    shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
    /dev/sda1 on /boot type ext2 (rw)
    /dev/sda4 on /home type ext4 (rw)
    /dev/sdb1 on /mnt/backup type ext4 (rw)
    /dev/sdc1 on /mnt/media type ext4 (rw)
    
    Label the desired partition:
    [james@brain ~]$ sudo e2label /dev/sdc1 media 
    
    Sanity check:
    [james@brain ~]$ sudo mount -l
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=765508,mode=755)
    run on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
    /dev/disk/by-uuid/e674b744-16aa-4c27-95d4-993c31e274fc on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
    devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
    shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
    /dev/sda1 on /boot type ext2 (rw)
    /dev/sda4 on /home type ext4 (rw)
    /dev/sdb1 on /mnt/backup type ext4 (rw)
    /dev/sdc1 on /mnt/media type ext4 (rw) [media]
    
    No need to umount or reboot. Check out `man fstab`. Your always better off using the command line for administration type jobs IMHO.


  • Registered Users, Registered Users 2 Posts: 949 ✭✭✭M.J.M.C


    Hey Tillotson

    Thanks, way over my head im very new to using ubuntu :(


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    Sometimes it can be easy to forget how daunting Linux can be for beginners.

    The first thing you need to know when your changing the label of a hard disc is it's name. So to find that I ran the command "sudo mount -l". I knew the hard disk was mounted in "/mnt/media" so I figured the name I needed was "/dev/sdc1". In your case you already know it's "/dev/sdd1".

    I remembered the command to use was e2label (if I hadn't I would have searched for it using "apropos label"). I then ran the command "e2label /dev/sdc1 media" to give the label "media" to "/dev/sdc1".

    I then ran "sudo mount -l" again just to check everything had gone correctly. Notice the last line now ends with "[media]". Alternatively I could have run the command "sudo e2label /dev/sdc1".

    Literally all you have to do is enter the command:
    sudo e2label /dev/sdd1 "Blu-ray HDD5"
    
    Although I'd recommend you use a name containing only [A-z] and [0-9]. That's the reason I had to use quotation marks above. Check out https://help.ubuntu.com/community/UsingTheTerminal.

    Does that make any sense?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 949 ✭✭✭M.J.M.C


    Thanks and thanks for taking the time to explain fully,

    Quality post - cheers, appreciated! :)


Advertisement