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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Great sites like this convinced me to switch to Linux at home. I'm still a newbie, though, so I'll need some help.
In addition to a primary hard drive (where Kubuntu is installed), I've got a second drive that I'm having trouble mounting. When I try to mount it from the KDE GUI, I get an error that says, "mount: can't find /dev/hdb1 in /etc/fstab or /etc/mtab". When I try from the command line by typing "sudo mount -t ntfs /dev/sdb1 /media/sdb1", I get an error that says, "mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or other error".
My guess is that I'm having this problem because the drive is still NTSF, from when I was running Windows. Maybe I need to install NTSF support into the OS, or something? (I'd be surprised if that's it; I have two external hard drives that I believe are NTSF, and I can mount them with no problem.) I probably just need to add the right thing to fstab, but I don't know what that thing is. If anyone could give me a hand, I'd appreciate it!
After you try to mount /dev/sdb1 (sudo mount -t ntfs /dev/sdb1 /media/sdb1) and it gives you that error, try:
dmesg | tail
That will print out the last few lines of the kernel log. More details about the error will be available there. Post them.
By the way, are you sure that it's ntfs? The filesystem of a device that you want to mount can often be detected without being specified on the command line. Try the same mount command but omit the -t ntfs part.
Last edited by zhangmaike; 08-12-2006 at 11:33 PM.
Well, I wasn't sure that it's NTSF, you're right. And after looking at the kernel log, it looks like it isn't. Here's the last bit:
[17181723.804000] NTFS-fs error (device sdb1): read_ntfs_boot_sector(): Primary boot sector is invalid.
[17181723.808000] NTFS-fs error (device sdb1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[17181723.808000] NTFS-fs error (device sdb1): ntfs_fill_super(): Not an NTFS volume.
I tried "sudo mount /dev/sdb1 /media/sdb1", and got an error that says, "mount: you must specify the filesystem type". I tried a couple other variations, too: "-t vfat" got me the same sort of error as with NTFS, and "-t auto" was not recognized.
Thanks for your help so far. If anyone has more insight, I'd appreciate it.
I added an entry to /etc/fstab: "/dev/hdb1 /mnt/hdb1 ntfs auto,users,rw 0 0" and created a hdb1 directory in /mnt. It sort of seems like it did something. At least, when I ran "sudo mount -a", it didn't generate any errors. But I can't access "/mnt/hdb1". When I try in KDE, it gives me "Could not enter folder /mnt/hdb1" and when I try in the console I get "bash: cd: /mnt/hdb1: Permission denied".
A directory must have execute permissions for you to enter it with cd. For that directory (according to the output from ls), only root has execute permissions, and the owner group and other users do not. Read permissions for the other users couldn't hurt either.
Do, as root:
chmod go+rx /mnt/hdb1
I get an error that says, "Read-only file system".
If the mount did succeed, you might have to unmount it first. The linux kernel has read support for ntfs, but no real write support. If it has been mounted, it would've been mounted read-only... I'd guess that's where this error is coming from.
Last edited by zhangmaike; 08-13-2006 at 03:03 AM.
When I unmount the drive I can chmod, but when I mount the drive again the permissions go back to what I posted above and I can't enter the directory.
Is there a way to tell what filesystem I've got on this drive? Like I said before, I'm not sure it's NTFS, but I don't know what else it might be. Better yet would be to have it auto-detect when it mounts but that option doesn't seem to work.
Since the entry in fstab specifies ntfs, and it mounts properly, I'd guess that the filesystem is indeed ntfs. Here's an excerpt from the mount
manpage about options for ntfs:
uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is
given in octal. By default, the files are owned by root and not
readable by somebody else.
It seems the r-x------ permissions might be a result of the default options. Try specifying umask=000 in your list of options in fstab - this will not restrict the permissions at all (although you may want to tighten this down after testing is through). Setting umask=022 would probably be a better choice... this gives write permissions only to the owner and read/execute permissions to everyone.