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.
Okay, first of all I need to do this by the command line as GNOME is not starting right now. This is because a file is missing...which happens to be on my USB thumb drive.
When GNOME was starting the thumb drive would automatically mount, but I have no idea if it is mounting when GNOME is not running. I plug the drive in and get the following message:
[ 100.446637] sd 6:0:0:0: [sdf] Assuming drive cache: write through
[ 100.449383] sd 6:0:0:0: [sdf] Assuming drive cache: write through
The fact that the message comes up after I plug in my drive leads me to believe that the drive is still being mounted. It also makes sense that a graphical environment wouldn't affect automounting.
If the USB drive is automatically mounted, I don't know what it is called and haven't been able to find it. Help?!
The computer in question is not connected to a network and I have no way to connect it to a network, so I can't copy and paste the results. But I have run
cat /etc/mtab
and I didn't see anything that looked like it pertained to the USB drive (in particular I was looking for anything with the sdf prefix).
So in my opinion it looks as though the USB drive is not mounted. How would I go about finding it and mounting it?
Try a quick df to see if it's there. Your first note kind of suggested it is /dev/sdf and you may find it there. You may try mounting it via the mount command assuming it is /dev/sdf and see if is.
Try a quick df to see if it's there. Your first note kind of suggested it is /dev/sdf and you may find it there. You may try mounting it via the mount command assuming it is /dev/sdf and see if is.
Dave
First of all, what do you mean by a quick df? Typing a command 'df'? Sorry for the questions but it's been a long time since I worked with Linux in any form.
EDIT: Okay, I tried 'df' as you suggested but I didn't see anything listed that looked like it would be the USB drive.
I have tried to mount /dev/sdf with the following command:
sudo mount -t usbfs /dev/sdf /media/usb
When I do, after I cd to /media/usb, I don't see my files. I do, however, see the following:
001 002 003 004 005 devices
EDIT: Sorry, I should mention that all the numbers were colored blue and 'devices' was the same color as the prompt.
I don't know if that might be relevant or not but I'll include it here in hopes it could help.
Last edited by rcrummett; 09-25-2008 at 01:38 PM.
Reason: clarification
the command would be mount /dev/sd?1 /somedirectory
the sd?1 will depend on what the other drives are
the /somedirectory will depend on where you want to mount it
try "mkdir /flash ^M" "mount /dev/sda1 /flash ^M" if you don't get an already mounted error do a ls /flash (^M is enter)
if you do get an error try sdb1,sdc1 etc etc it will be an sdsomething1
you can leave the -t option out all newer kernels can mount a fat32 file system on there own
so you need to copy a file from the USB to your HD? If I were you I would download a live linux CD like OpenSuse or Knoppix and try to copy the file from the usb to your hd. it might work.
dave@dave-laptop:~$ dmesg|tail
[ 396.133702] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[ 396.133708] sdb: sdb1
[ 396.135373] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[ 396.135479] sd 5:0:0:0: Attached scsi generic sg2 type 0
[ 2384.114940] usb 7-1: USB disconnect, address 4
[ 4065.246717] usb 7-1: new high speed USB device using ehci_hcd and address 5
[ 4065.309711] usb 7-1: configuration #1 chosen from 1 choice
[ 4065.310192] scsi6 : SCSI emulation for USB Mass Storage devices
[ 4065.312712] usb-storage: device found at 5
[ 4065.312720] usb-storage: waiting for device to settle before scanning
dave@dave-laptop:~$ dmesg|tail
[ 4066.925675] sd 6:0:0:0: [sdb] Write Protect is off
[ 4066.925683] sd 6:0:0:0: [sdb] Mode Sense: 45 00 00 08
[ 4066.925688] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4066.928273] sd 6:0:0:0: [sdb] 3940479 512-byte hardware sectors (2018 MB)
[ 4066.929043] sd 6:0:0:0: [sdb] Write Protect is off
[ 4066.929050] sd 6:0:0:0: [sdb] Mode Sense: 45 00 00 08
[ 4066.929055] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4066.929063] sdb: sdb1
[ 4066.930879] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[ 4066.930963] sd 6:0:0:0: Attached scsi generic sg2 type 0
3:
You can see in my case that on the third last line I have
Code:
[ 4066.929063] sdb: sdb1
So I know that the first partition of my usb drive is sdb1
4:
Issue the commands:
Code:
dave@dave-laptop:~$ cd /mnt/
dave@dave-laptop:/mnt$ ls
dave@dave-laptop:/mnt$ sudo mkdir usb
[sudo] password for dave:
dave@dave-laptop:/mnt$ ls
usb/
dave@dave-laptop:/mnt$ sudo mount -t vfat /dev/sdb1 /mnt/usb/
dave@dave-laptop:/mnt$ cd usb
dave@dave-laptop:/mnt/usb$ ls
chem_4_kids.sh PDF Lists Groups
IT Room Layout.xls
Junior Cert Science
So you can see, the USB drive is mounted on /mnt/usb/
To unmount it:
Code:
dave@dave-laptop:/mnt$ sudo umount /mnt/usb/
dave@dave-laptop:/mnt$ cd usb/
dave@dave-laptop:/mnt/usb$ ls
dave@dave-laptop:/mnt/usb$
so you need to copy a file from the USB to your HD? If I were you I would download a live linux CD like OpenSuse or Knoppix and try to copy the file from the usb to your hd. it might work.
Interesting idea. Haven't worked with the live CDs before; do I have access to the Linux partition on my hard drive from a live CD? I'm all for that, assuming I can find a copy.
I was trying to mount the USB drive using usbfs instead of vfat. Changing this took care of EVERYTHING; I was able to install the packages I needed to and GNOME is running again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.