mount external HD

Kernels & Hardware, configuring network, installing services

mount external HD

Postby andmon » 2021-02-06 10:33

I am not able to mount my external WD My Passport HD.
When I type in mount/dev/sdc1, I get
Code: Select all
mount: /media/usb0: special device /dev/sdc1 does not exist.


Here is my fstab
Code: Select all
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=53b27eb9-625a-465c-86eb-d992df8f17e0 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=7A64-7662  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda3 during installation
UUID=ac3c03b7-dac8-4e9b-9b69-7f372529cf14 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdc1       /media/usb0      vfat uid=1000,noauto,user        0       0
/dev/sdc       /media/usb0      vfat uid=1000,noauto,user        0       0


When I type in fdisk -l, I get
Code: Select all
Disk /dev/sdc: 931.48 GiB, 1000170586112 bytes, 1953458176 sectors
Disk model: My Passport 0827
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x69205244

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdc1        218129509 1920119918 1701990410 811.6G 72 unknown
/dev/sdc2        729050177 1273024900  543974724 259.4G 74 unknown
/dev/sdc3        168653938  168653938          0     0B 65 Novell Netware 386
/dev/sdc4       2692939776 2692991410      51635  25.2M  0 Empty


Here the output of lsblk -f
Code: Select all
NAME    FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                           
├─sda1  vfat   FAT32       7A64-7662                             510.8M     0% /boot/efi
├─sda2  ext4   1.0         53b27eb9-625a-465c-86eb-d992df8f17e0    1.6T     7% /
└─sda3  swap   1           ac3c03b7-dac8-4e9b-9b69-7f372529cf14                [SWAP]
sdc                                                                           
sr0                                                                           
nvme0n1                 


Please is there a way to fix it?
andmon
 
Posts: 65
Joined: 2008-06-24 07:12
Location: Milan (Italy)

Re: mount external HD

Postby sunrat » 2021-02-06 13:31

Use UUID or LABEL if you must have it in fstab. /dev/sdX is dynamically assigned at boot.
You don't mention anything about your Debian system. Most DEs will mount USB devices under /media if not in fstab.

Here's what I use for an external drive, noauto option tells it not to automount at boot so it won't delay boot if it's not present but it shows in file manager to simply mount when clicked on (Dolphin FM):
Code: Select all
LABEL=GREEN-BACKUP   /mnt/green-backup   auto   noauto,user,rw,noatime   0   0


I recall answering almost the same question several days ago. :|
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 3424
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: mount external HD

Postby andmon » 2021-02-06 15:47

sunrat wrote:Use UUID or LABEL if you must have it in fstab. /dev/sdX is dynamically assigned at boot.
You don't mention anything about your Debian system. Most DEs will mount USB devices under /media if not in fstab.

Here's what I use for an external drive, noauto option tells it not to automount at boot so it won't delay boot if it's not present but it shows in file manager to simply mount when clicked on (Dolphin FM):
Code: Select all
LABEL=GREEN-BACKUP   /mnt/green-backup   auto   noauto,user,rw,noatime   0   0


I recall answering almost the same question several days ago. :|


Thanks, I've got a Debian SID Desktop. I think the problem is in the "Type unknown" reported after fdsik -l
Code: Select all
/dev/sdc1        218129509 1920119918 1701990410 811.6G 72 unknown


I suspect there is a problem in the partition in the external hd, but don't know how to fix it.
andmon
 
Posts: 65
Joined: 2008-06-24 07:12
Location: Milan (Italy)

Re: mount external HD

Postby peter_irich » 2021-02-06 17:30

And must not be in /etc/fstab strings like
Code: Select all
/dev/sdx /mount_point ....


Peter.
peter_irich
 
Posts: 1308
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: mount external HD

Postby p.H » 2021-02-07 18:43

andmon wrote:I suspect there is a problem in the partition in the external hd

Obviously this disk does not have a valid partition table. Either it contains a filesystem without a partition table, or it contains only garbage. Check
Code: Select all
blkid /dev/sdc

If it contains a filesystem, you must mount /dev/sdc, not /dev/sdc1.
As others said, you should not rely on device node names in /etc/fstab.
p.H
 
Posts: 1681
Joined: 2017-09-17 07:12

Re: mount external HD

Postby andmon » 2021-02-08 12:07

p.H wrote:
andmon wrote:I suspect there is a problem in the partition in the external hd

Obviously this disk does not have a valid partition table. Either it contains a filesystem without a partition table, or it contains only garbage. Check
Code: Select all
blkid /dev/sdc

If it contains a filesystem, you must mount /dev/sdc, not /dev/sdc1.
As others said, you should not rely on device node names in /etc/fstab.


Code: Select all
root@debian:/home/andrea# blkid /dev/sdc
root@debian:/home/andrea#


It produces no effect.
andmon
 
Posts: 65
Joined: 2008-06-24 07:12
Location: Milan (Italy)

Re: mount external HD

Postby reinob » 2021-02-08 12:29

andmon wrote:
p.H wrote:
andmon wrote:I suspect there is a problem in the partition in the external hd

Obviously this disk does not have a valid partition table. Either it contains a filesystem without a partition table, or it contains only garbage. Check
Code: Select all
blkid /dev/sdc

If it contains a filesystem, you must mount /dev/sdc, not /dev/sdc1.
As others said, you should not rely on device node names in /etc/fstab.


Code: Select all
root@debian:/home/andrea# blkid /dev/sdc
root@debian:/home/andrea#


It produces no effect.


Then it could be that /dev/sdc is actually a filesystem.
Try "mount /dev/sdc /media/usb0" and see what happens.
reinob
 
Posts: 902
Joined: 2014-06-30 11:42

Re: mount external HD

Postby reinob » 2021-02-08 12:31

Note also that your fstab has:

Code: Select all
/dev/sdc1       /media/usb0      vfat uid=1000,noauto,user        0       0
/dev/sdc       /media/usb0      vfat uid=1000,noauto,user        0       0


which at least indicates that maybe whoever edited fstab (you) had already doubts as to whether sdc or sdc1 is the file system.
reinob
 
Posts: 902
Joined: 2014-06-30 11:42

Re: mount external HD

Postby Head_on_a_Stick » 2021-02-08 12:34

This should show if a filesystem has been applied over the entire block device:
Code: Select all
# wipefs /dev/sdc
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13317
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: mount external HD

Postby andmon » 2021-02-08 13:40

Thank you.

I edited fstab introducing sdc1.

Here is the result of your suggestions

Code: Select all
root@debian:/home/andrea# mount /dev/sdc /media/usb0
mount: /media/usb0: wrong fs type, bad option, bad superblock on /dev/sdc, missing codepage or helper program, or other error.
root@debian:/home/andrea# wipefs /dev/sdc
root@debian:/home/andrea#
andmon
 
Posts: 65
Joined: 2008-06-24 07:12
Location: Milan (Italy)

Re: mount external HD

Postby Head_on_a_Stick » 2021-02-08 14:20

So there is no filesystem applied to the entire device and there is no valid partition table.

What does dmesg say about it when you plug the drive? Does the drive actually contain any data? If not then create a fresh partition table on the drive, add a partition and apply a filesystem to it so that you can mount the partition.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13317
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: mount external HD

Postby k829king » 2021-02-08 16:09

I have a WD Passport HD that repeatedly got a corrupted partition. I had to use a Windows unit to try and rescue data from, sometimes it would only lose a little data but sometimes the partition appeared totally trashed and had to reformat.
k829king
 
Posts: 91
Joined: 2018-08-26 09:47

Re: mount external HD

Postby sunrat » 2021-02-08 20:37

k829king wrote:I have a WD Passport HD that repeatedly got a corrupted partition. I had to use a Windows unit to try and rescue data from, sometimes it would only lose a little data but sometimes the partition appeared totally trashed and had to reformat.

That's not relevant to this topic. Please start a new topic if you need help.
There's an old term - "Rearranging deckchairs on the Titanic", analogous to reformatting a broken HD.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 3424
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: mount external HD

Postby p.H » 2021-02-08 21:24

sunrat wrote:Please start a new topic if you need help.

I think it was a testimony, not a request for help.
p.H
 
Posts: 1681
Joined: 2017-09-17 07:12

Re: mount external HD

Postby sunrat » 2021-02-08 22:25

p.H wrote:
sunrat wrote:Please start a new topic if you need help.

I think it was a testimony, not a request for help.

That's why I said "if".
There is of course the possibility OP's HD is FUBAR.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 3424
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable