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 am running Mandriva one 2007 on a P3 933 system 256 mb ram.
If i use the GUI i can mount and unmount my drive (WD Passport 120 gb) without problem.I prefer to know the command and use a term window as i used to do with dos, but there seems to be something i don't do properly.
1) Looking at fstab and mtab in /etc i do not not see /dev/sda1 normaly monted on /media. if i do a ls on /media i see floppy,and my 2 cdrom (witch are part of fstab)
2) At this point i can see with the GUI (icone Devices) that my drive is seen but not mounted. If i click on the device icone, the system mounts the device i am able to see the info on the disk.
typing more /etc/mtab i see than my dev/sda1 is now part of /etc/mtab but still not part of /etc/fstab.
However if i try to mount the drive manualy i get the following error message
mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab
Could someone explain what step the GUI does to include my drive in /etc/mtab or direct me to some useful doc or tutorial on the subject.
Distribution: slackware 12.0, Vector Linux STD 6.0 and 5.8, ZenWalk 4.6.1, OpenBSD 3.9
Posts: 389
Rep:
try inserting again your usb hd BUT before doing that.. prepare /var/log/messages and paste the output here. . we had the similar situations. but now i was able to made it. one suggestion try changing your usb cable. i change mine into the shortest cable included in my enclosure. .
My usb setup is as follow, it may or may not be relevant.
from my comp: a standard 3 feet usb cable going to a dynamic hub (4 port)
and from my hub a one foot conversion cable from 6 to 4 pins.
Following is the output of my /var/log/messages file
Oct 14 20:11:03 933_linux last message repeated 3 times
Oct 14 20:13:25 933_linux kernel: usb 1-1.2: new full speed USB device using uhci_hcd and address 6
Oct 14 20:13:25 933_linux kernel: usb 1-1.2: configuration #1 chosen from 1 choice
Oct 14 20:13:25 933_linux kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Oct 14 20:13:30 933_linux kernel: Vendor: WD Model: 1200BEVExternal Rev: 1.02
Oct 14 20:13:30 933_linux kernel: Type: Direct-Access ANSI SCSI revision: 00
Oct 14 20:13:30 933_linux kernel: SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB)
Oct 14 20:13:30 933_linux kernel: sda: Write Protect is off
Oct 14 20:13:30 933_linux kernel: sda: assuming drive cache: write through
Oct 14 20:13:30 933_linux kernel: SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB)
Oct 14 20:13:30 933_linux kernel: sda: Write Protect is off
Oct 14 20:13:30 933_linux kernel: sda: assuming drive cache: write through
Oct 14 20:13:30 933_linux kernel: sda: sda1
Oct 14 20:13:30 933_linux kernel: sd 3:0:0:0: Attached scsi disk sda
Oct 14 20:13:30 933_linux kernel: sd 3:0:0:0: Attached scsi generic sg0 type 0
Oct 14 20:13:36 933_linux kernel: end_request: I/O error, dev fd0, sector 0
Oct 14 20:13:36 933_linux kernel: end_request: I/O error, dev fd0, sector 0
Oct 14 20:13:50 933_linux hald: mounted /dev/sda1 on behalf of uid 500
Oct 14 20:13:51 933_linux kernel: end_request: I/O error, dev fd0, sector 0
i am curious about the error reported do you know what it means since i can read and write easely on the disk using the Gui or cd to it via term and copy files.
tks
You may not have unmounted the drive properly the last time you used it. The file system may be corrupt.
You can run "sudo /sbin/fsck.vfat /dev/sda1" on it (assuming it is assigned the same device).
Or if the filesystem is OK and you can mount it graphically, do so. Then either enter "mount" by itself, or examine the contents of /etc/mtab. Both will list how it is mounted and the options used.
You didn't post what the mount command was that you tried. You may not have had the mountpoint created or didn't include the filesystem or device or options.
I would recommend connecting the drive, and (if it is assigned to /dev/sda1 again) entering: udevinfo -q env -n /dev/sda1
This will give you information about the UUID of the filesystem and the filesystem label if it has on. Use one of them instead of the device name for removable drives.
Here is an example using a pendrive:
[code]
Oct 14 19:41:02 hpamd64 hald: mounted /dev/sdc1 on behalf of uid 1000
From mount output:
/dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)
The filesystem doesn't have a label, so I could either label it or use the unique filesytem id (UUID) in /etc/fstab
I'll just make one up here, taking the easy way by copying the same options that the auto mount system used:
UUID=3B69-1AFD /media/pendrive vfat rw,noauto,user,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower 0 0
You could use your username instead of your UID in the uid= option. You can also finetune the permissions with the fmask and dmask options. See the "mount" man page for details. The /media/pendrive would have to be created. Note the "user" option. This would allow me to mount it without having to use sudo. If this drive is normally connected, you could even add a "mount /media/pendrive" to your .profile or .bash_profile files so that it is mounted when you login.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.