Trying to mount a usb disk to a folder
Dear all,
I would like to ask you for help how to mount an external USB drive to a folder properly. I am a complete Linux noob, so everything written below is from various discussions I've found on the internet. I have an external usb disk where I have data (hope they are still there). If I try to mount it to a folder it says mount: wrong fs type, bad option, bad superblock on /dev/sdb1, ...doing e2fsck it says superblock cannot be read or does not describe a valid ....so I did e2fsck -b 32768 and still the same error. I am already desperate ... I really would like to save the data (or at least as big part as possible) on that drive, however I have no idea what should I do. I've read I should do a backup of the drive before doing any "experiments", however after doing some googling I think (still not 100% sure) the "new disk" has to be bigger than the "original" 2TB HDD. Unfortunately I don't have bigger one and currently have no possibility to borrow one, therefore I have to risk that by trying to make it work, I'll loose the data. Any suggestions please? Thank you. |
What is the (exact) command you are using when you try to mount the device?
|
In addition,
What linux distribution/version are you running? Typically most external drives are formatted as NTFS by the manufacture so running linux utilities is not recommended. Most mainstream distributions install ntfs-3g by default and depending on the desktop will automatically mount external drives. Does this drive still work with windows? |
Quote:
well, to explain you the situation a bit more. I've had this USB disk connected to Ubuntu - Zentyal. This was mounted automatically by the system start. Then the USB HDD was disconnected (the thing is I am not sure if properly) and now it is connected to CentOS6 - Nethserver. I was trying to mount it to Nethserver. As this was not working, I've returned back Ubuntu (I have two HDDs which I can take out of the machine and one holds Ubuntu and second Nethserver, so I can change these anytime), however it was working neither. The USB HDD was always connected to Linux, never to Win. And now the command. I have a folder in root called Share. So I did mount -t vfat /dev/sdb1 /share/ |
Hello and welcome to LQ.
Stop what you doing first of all. Let us sort this out. Making changes may not make it easier. I think you did something along these lines? https://linuxexpresso.wordpress.com/...ock-in-ubuntu/ |
Quote:
yes, that's exactly what I did as you can see in my first post. And it didn't work unfortunately :-( |
How is the formated?
Do you normally use in windows? |
lsblk for dev node, then check what file system it has on it.
Code:
# fdisk -l /dev/sdb Code:
# parted -l /dev/sdb Code:
# mount -t vfat /dev/sdb1 ~/usb Code:
# parted -l Code:
# ntfs-3g /dev/sdb1 ~/usb I've used it before on ntfs volumes and it worked ok to repair it. |
mounting a USB HDD is a bit silly, to me, not that it cannot be done. when all one has to do is plug in it ,then open a filemanager then click on that drive as it should be getting auto mounted, the clicking onto that drive within the filemanager is to finalize the connection to the drive.
if one is to mount it during boot up in fstab (correct me if I am wrong) but if it is not present during booting you're going to get a boot error leaving not being able to fully boot into your system, until you correct the problem. Code:
sudo blkid (to get the mount point] for fk disk if it is a windows format did you try using windows to scan and repair it? |
Hello,
thank you for all your posts. This is what I get. fdisk -l /dev/sdb WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sdb: 2000.4 GB, 2000398933504 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0002edd1 Device Boot Start End Blocks Id System /dev/sdb1 1 243202 1953514583 ee GPT sudo blkid /dev/sda1: UUID="2112ba5b-ab3c-4f83-986d-82dc8fde5de9" TYPE="ext3" /dev/sda2: UUID="1v3xAT-zsVn-kEim-3wfT-7aEC-NwxY-1nR0Ut" TYPE="LVM2_member" /dev/mapper/VolGroup-lv_swap: UUID="09acb377-c813-46ae-acaf-c388e044a963" TYPE="swap" /dev/mapper/VolGroup-lv_root: UUID="098274fc-3eee-4000-b80c-f4327b288fb4" TYPE="ext4" sudo mount /dev/sdb1 /mnt mount: you must specify the filesystem type Does that mean he doesn't see the sdb1? |
check the filesystem type using the file command:
Code:
sudo file -sL /dev/sdx Quote:
|
Quote:
[root@server ~]# sudo file -sL /dev/sdb /dev/sdb: x86 boot sector; partition 1: ID=0xee, starthead 0, startsector 1, 3907029166 sectors, code offset 0xb8 [root@server ~]# sudo file -sL /dev/sdb1 /dev/sdb1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 128, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 63, dos < 4.0 BootSector (0x80) Sorry, I don't understand your comment below. Could you please write it as for dummies :-D (I am linux noob) Quote:
|
:study:
Quote:
ie. Code:
userx@voided & ~ >> $sudo blkid the difference between /dev/sdb and /dev/sdb1 . /dev/sdb is the entire device whereas /dev/sdb1 is a partition on said device. when using the dd program. This is one that you use the device name with. Most other operations like mounting and searching device you use the partition, and path to directory if wanted. I hope that helped give you a litte more insight. Insight 2: when logged in as root you do not have to use the sudo command, that is being redundant |
Quote:
sorry, what is ntfs-3g? something like add-in? should I install/download it? how? |
While Ubuntu installs NTFS support by default Redhat/CentOS does not. To install ntfs-3g in CentOS you need to enable the epel repository.
If the drive was not unmounted/ejected properly from Ubuntu then the filesystem might be corrupted. While ntfsfix can repair simple errors this might require chkdsk which requires a real windows computer. Once you get this problem resolved you might want to switch to a linux filesystem if you never need to connect it to a Windows computer. This will require you to backup all the data somewhere since reformatting will essentially "erase" existing files. |
All times are GMT -5. The time now is 02:20 PM. |