mount error "is not a block device"

On Linux one can perform a bind mount, which will splice an existing directory to a new mount point.

mount --bind <olddir> <mountpoint>

Solaris supports an alternate syntax:

mount -F lofs <olddir> <mountpoint>

*BSD uses mount_null instead (although it does not come with OS X).

mount_null <olddir> <mountpoint>

mount attaches block storage devices that contain a filesystem to a directory, which is not what you're trying to do, hence the error message. What you want is to create a link from the new directory name to the old existing name. For that you must use the ln command to create a symbolic link.

ln -s olddir newdir

If you're trying to mount a logical HDD/SDD

  • I dual boot: Windows 10/Ubuntu
  • I found this searching for a way to mount my Windows drive in Linux

Steps Taken

  • show block devices

    ℹ️ your HDD/SDD is a block storage device

    sudo blkid
    
    /dev/sda5: UUID="a6aa3891-1dc2-439a-b449-b9b1848db028" TYPE="ext4" PARTUUID="e4887e0f-05"
    /dev/sda1: LABEL="System" UUID="C6F4E92AF4E91E05" TYPE="ntfs" PARTUUID="e4887e0f-01"
    /dev/sda2: LABEL="Windows" UUID="4ABAF478BAF461BD" TYPE="ntfs" PARTUUID="e4887e0f-02"
    
  • In my case, I want to mount the device labeled "Windows" /dev/sda2

What didn't work

  • Turns out I reversed the mount command arguments to get the "is not a block device" complaint
    mkdir Windows
    sudo mount Windows /dev/sda2
    mount: /dev/sda2: /home/casey/Windows is not a block device.
    

What did work ‍♂️️

  • mount works like a boss when you list the arguments in the right order!
    sudo mount /dev/sda2 Windows 
    cd Windows 
    ls
    Config.Msi                hiberfil.sys   Intel         pagefile.sys   ProgramData     'Program Files (x86)'  '$Recycle.Bin'  'System Volume Information'   WCH.CN
    'Documents and Settings'   home           msdia80.dll   PerfLogs      'Program Files'   Recovery               swapfile.sys    Users                        Windows
    

Tags:

Mount