Announcement

Collapse
No announcement yet.

blkid not working

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    blkid not working

    I'm trying to setup my fstab using UUIDs (I'm having a problem where they don't mount by dev/sd[abc] correctly)

    I tried the command :
    $ ls -l /dev/disk/by-uuid

    and that listed two of my drives, but not the third, so I tried blkid (Which, if I'm reading the man page properly, should list all devices if given no arguments). This is the output:
    :~$ blkid
    :~$

    Can anyone help with why blkid might not be working?

    #2
    Re: blkid not working

    Try with the sudo:
    Code:
    sudo blkid
    Earlier > About blkid
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Re: blkid not working

      Ahh, I had tried searching but hadn't gone back that far.

      From what I had read, I thought blkid should work without sudo, but I'll give that a shot when I get home.

      Comment


        #4
        Re: blkid not working

        Different distros set different permissions for some files, like blkid. Check yours via ls -la /sbin/blkid
        and if it's not -rwxr-xr-x root root, change it with sudo chmod a+x /sbin/blkid

        Please Read Me

        Comment


          #5
          Re: blkid not working

          Also you might try (with "sudo") deleting the /etc/blkid.tab file, which is the immediate source for the blkid command output. Then reboot your system and a new /etc/blkid.tab file should be dynamically built. If you're still getting nothing from the blkid command, try this:

          Code:
          sudo apt-get update
          Code:
          sudo apt-get install --reinstall libblkid1
          Then try your command again.

          Comment


            #6
            Re: blkid not working

            mmm kay. blkid worked with sudo, but it has spawned another question. Here is the output:
            Code:
            :~$ sudo blkid /dev/sdc1
            /dev/sdc1: LABEL="750" TYPE="vfat" 
            :~$
            I was trying to get the UUID of the drive so I could set it up in fstab, but this particular drive appears not to have one. I originally thought vfats might just not get them, being older formats, but I saw on some other forums that they can. Can anyone think of a reason this one might be missing it's UUID? Is there a (SAFE) way to generate/assign one?

            Comment


              #7
              Re: blkid not working

              There must be more to this story. Let's have a look at the following outputs:

              Code:
              sudo lsb_release -a
              Code:
              sudo fdisk -lu
              Code:
              sudo ls /dev/disk/by-uuid
              Code:
              sudo blkid

              Comment


                #8
                Re: blkid not working

                sudo blkid -c /dev/null -o list

                Please Read Me

                Comment


                  #9
                  Re: blkid not working

                  Originally posted by oshunluvr
                  sudo blkid -c /dev/null -o list
                  @oshunluvr -- nice one!

                  Comment


                    #10
                    Re: blkid not working

                    oh good, it's not just me then

                    Code:
                    :~$ sudo lsb_release -a
                    No LSB modules are available.
                    Distributor ID: Ubuntu
                    Description:  Ubuntu 10.04.1 LTS
                    Release:    10.04
                    Codename:    lucid
                    Code:
                    :~$ sudo fdisk -lu
                    Disk /dev/sda: 250.1 GB, 250059350016 bytes
                    255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
                    Units = sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 512 bytes
                    I/O size (minimum/optimal): 512 bytes / 512 bytes
                    Disk identifier: 0xa6b3a6b3
                    
                      Device Boot   Start     End   Blocks  Id System
                    /dev/sda1       63  31487399  15743668+ 82 Linux swap / Solaris
                    /dev/sda2  *  31487400  488392064  228452332+ 83 Linux
                    
                    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
                    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
                    Units = sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 512 bytes
                    I/O size (minimum/optimal): 512 bytes / 512 bytes
                    Disk identifier: 0xacc54906
                    
                      Device Boot   Start     End   Blocks  Id System
                    /dev/sdb1      2048 1953521663  976759808  7 HPFS/NTFS
                    
                    Disk /dev/sdc: 750.2 GB, 750156374016 bytes
                    255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
                    Units = sectors of 1 * 512 = 512 bytes
                    Sector size (logical/physical): 512 bytes / 512 bytes
                    I/O size (minimum/optimal): 512 bytes / 512 bytes
                    Disk identifier: 0xd597b354
                    
                      Device Boot   Start     End   Blocks  Id System
                    /dev/sdc1       63 1465144064  732572001  c W95 FAT32 (LBA)
                    Code:
                    :~$ sudo ls -l /dev/disk/by-uuid
                    total 0
                    lrwxrwxrwx 1 root root 10 2010-12-02 20:04 0832303C323030D4 -> ../../sdb1
                    lrwxrwxrwx 1 root root 10 2010-12-02 20:04 211f9eb4-a152-4486-92fc-982e33904c2c -> ../../sda1
                    lrwxrwxrwx 1 root root 10 2010-12-02 20:04 f7faf4a4-4695-4b62-af3e-55808428757e -> ../../sda2
                    Code:
                    :~$ sudo blkid -c /dev/null -o list
                    device                       fs_type     label      mount point                       UUID
                    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                    /dev/sda1                      swap               <swap>                          211f9eb4-a152-4486-92fc-982e33904c2c
                    /dev/sda2                      ext4               /                            f7faf4a4-4695-4b62-af3e-55808428757e
                    /dev/sdb1                      ntfs      1tb       /mnt/1tb                         0832303C323030D4
                    /dev/sdc1                      vfat      750       /mnt/750g                        
                    :~$

                    Comment


                      #11
                      Re: blkid not working

                      I suspect you're exceeding the limits of the FAT32 filesystem, in terms of cluster size/total filesystem size.

                      http://support.microsoft.com/kb/314463

                      Comment


                        #12
                        Re: blkid not working

                        I love nice formatting! 8)

                        Please Read Me

                        Comment


                          #13
                          Re: blkid not working

                          Originally posted by dibl
                          I suspect you're exceeding the limits of the FAT32 filesystem, in terms of cluster size/total filesystem size.

                          http://support.microsoft.com/kb/314463

                          Probably, I was never one to listen when M$ told me what I could and couldn't do on a computer.

                          So if I backup the drive and format it to something from this decade, it should get a UUID?

                          Comment


                            #14
                            Re: blkid not working

                            Originally posted by kingerthethird

                            So if I backup the drive and format it to something from this decade, it should get a UUID?
                            Yes, indeed it will.

                            If there is some obscure but overwhelming reason why you need FAT32, you could partition it into smaller partitions, and use FAT32 on them. But I can't imagine why that would be necessary. If it needs to be shared with Windows, use NTFS. If not, use ext4.

                            Comment


                              #15
                              Re: blkid not working

                              Another educational thread

                              Comment

                              Working...
                              X