How To Mount A Hard Disk Of File-System Type "devtmpfs"

12,760

Ok, you are trying to mount the entire disk instead of individual partitions, which is why you are getting the error. In short the command you need is:

mount /dev/sdb1 /mnt/usb

The file /dev/sdb references the entire disk as a block file. This includes the partition table at the start, which is why it can't find a filesystem. The file /dev/sdb1 references the first partition, which is where your filesystem will be. From the looks of your fdisk output, this is not an ntfs partition since this is a Windows filesystem and the partition is marked as Linux (most likely you will have ext4 unless you specifically set up something different).

To add a quick explanation of devtmpfs, this is a special filesystem which contains these block files which are specified by udev. You can google both for more information, but by now I'm sure you now know its not what you are looking for.

Share:
12,760
Jamie Burke
Author by

Jamie Burke

Updated on June 05, 2022

Comments

  • Jamie Burke
    Jamie Burke almost 2 years

    I'm trying to recover some data from a hard drive extracted from a broken laptop, and I'm having problems mounting the disk to my current system (Linux Mint). The hard disk I'm recovering from ran Debian. Simply, I'm confused as to how I can mount the hard drive to access the files, however it's not as simple as any other mount I've done. The following details struggles and information I've encountered.

    I get the following outputs when trying to mount the hard drive with different file-system tags. I should add that the file-system type isn't automatically detected when using auto, and "sdb" is definitely the correct address for the disk (taken it from dmesg).

        $ mount /dev/sdb /mnt/usb -t ntfs
        NTFS signature is missing.
        Failed to mount '/dev/sdb': Invalid argument
        The device '/dev/sdb' doesn't seem to have a valid NTFS.
        Maybe the wrong device is used? Or the whole disk instead of a
        partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
    

    The following returns the same message when all other common file-system tags are used:

        $ sudo mount /dev/sdb usb -t ext2
        mount: wrong fs type, bad option, bad superblock on /dev/sdb,
               missing codepage or helper program, or other error
               In some cases useful info is found in syslog - try
               dmesg | tail  or so
    

    The results from these commands led me to believe that there was an issue with the hard disk and it's partitions, however fdisk proved that it's partition's do seem to be valid and correct:

        $ sudo fdisk /dev/sdb -l
    
        Disk /dev/sdb: 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: 0x0002da94
    
           Device Boot      Start         End      Blocks   Id  System
        /dev/sdb1   *        2048   475920383   237959168   83  Linux
        /dev/sdb2       475922430   488396799     6237185    5  Extended
        /dev/sdb5       475922432   488396799     6237184   82  Linux swap / Solaris
    

    I then decided to try verify the file-system type of the hard drive, which seems to be "devtmpfs", which I got from the following command using df:

        $ df /dev/sdb -T
        Filesystem     Type     1K-blocks  Used Available Use% Mounted on
        udev           devtmpfs   1014764     4   1014760   1% /dev
    

    And so finally, I mount the hard drive using -t devtmpfs, which is successful in mounting however I'm left with a confusing file system very unlike from what I would expect from what was a standard debian set up. It contains file folders such as "block","bus","char","disk","dri","mapper"... and files like "sda1","sdb","sdb1","tty","vcs".

    I'm totally stumped as to how I should progress, and I'm pretty convinced the hard disk isn't broken and that I'm just mounting it incorrectly. How can I successfully mount the disk so I can access my files? Any help would be greatly appreciated.

  • Jamie Burke
    Jamie Burke over 10 years
    Oh my goodness, what an incredible face-palm moment this is. I feel like a right tit. Thank you very much, uggggh what a silly mistake. Indeed it is ext4.