Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Remounting to rename a device ?

    When I reformatted my USB drive (WD Passport) as ext4 (using: # mkfs -t ext4 -c /dev/sdb1), it assigned it a hideous name: 343c0b4b-fa31-4e75-9fda-0565f2752213. So I tried to rename it - no way. Then I tried to remount it as followed.

    # umount /media/343c0b4b-fa31-4e75-9fda-0565f2752213
    # mkdir /media/passport
    # mount -v -t ext4 /dev/sdb1 /media/passport

    /dev/sdb1 on /media/passport type ext4 (rw)
    mount: /media/passport does not contain SELinux labels.
    You just mounted an file system that supports labels which does not
    contain labels, onto an SELinux box. It is likely that confined
    applications will generate AVC messages and not be allowed access to
    this file system. For more details see restorecon( 8 ) and mount( 8 ).

    I sorted of succeeded in that I can access it in the BASH shell as /media/passport BUT I got the warning above. What's the preferred/canonical way to accomplish this?


  2. #2
    Had I used mke2fs instead of mkfs, I could have used the -L option to assign a label (name) to the volume BUT mke2fs is used to create an ext2/ext3 filesystem, not ext4. Is there some way to label the volume using mkfs?


  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    That is its UUID, NOT its name. You can change the name/label, but not the UUID. Anyway, see the e2label man page. You can mount by label using the LABEL=name in /etc/fstab instead of UUID=really-long-id. The e2label command will let you relabel any ext2/3/4 file system.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts