Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
Hello,
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/
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]
sudo mount /dev/sdx /mnt
done
for fk disk if it is a windows format did you try using windows to scan and repair it?
Sorry, I don't understand your comment below. Could you please write it as for dummies :-D (I am linux noob)
when you do sudo blkid it will show everything (hdd) connected to your system. I didn't see /dev/sdb1 in that listings you posted. So I inquired how you came about using /dev/sdb1.
your /dev/sdb1 is telling you it is NTFS. so you'll have to be sure that ntfs-3g is installed then use the -t ntfs-3g switch/argument when mounting it.
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
when you do sudo blkid it will show everything (hdd) connected to your system. I didn't see /dev/sdb1 in that listings you posted. So I inquired how you came about using /dev/sdb1.
your /dev/sdb1 is telling you it is NTFS. so you'll have to be sure that ntfs-3g is installed then use the -t ntfs-3g switch/argument when mounting it.
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
So when you say all drives should be listed (even USB HDD?), do you think it might be something wrong with the HDD? Because doing fdisk, it shows the drive (as mentioned in one of the previous posts)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.