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.
I'm trying to get my new thumb drive to work with my Knoppix 3.3 (it's a Lexar 256Mb). It's been formatted in fat16 and fat32 from my ms windows machines. In both formats knoppix sees 4 partitions on the drive when I plug it in. I cannot get either of the partitions to mount. My attempt to repartition using fdisk from the su command prompt seems futile. Trying to mount from the X window gets me "not a valid block device".
Here are some of my command attempts:
command: mount -t vfat /dev/sda1 /mnt/pen
response: mount: mount point /mnt/pen does not exist
command: mount -t vfat /dev/sda1 /mnt/usb
response: mount: mount point /mnt/usb does not exist
command: fdisk /dev/sda (/sda1 thru /sda4)
response: unable to open /dev/sda...........
My linux "education" hasn't covered changing things in the directory yet...so I'm not totally crisp on what I'm doing!
I've reformatted this drive on both my windows ME and XP. Neither of the windows machines indicates more than 1 partition. The fdisk command doesn't work for removable disks in ms-dos, so I'm at a loss on how to format this thing with one partition!! Only the knoppix reads 4 partitions!?
Any suggestions would be appreciated....any solutions accepted with great praise and admiration!!!
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi2 : SCSI emulation for USB Mass Storage devices
usb-uhci.c: interrupt, status 3, frame# 867
Vendor: Generic Model: STORAGE DEVICE Rev: 1.25
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: sda1 sda2 sda3 sda4
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
usb-uhci.c: interrupt, status 3, frame# 1692
usb.c: USB disconnect on device 00:10.2-1 address 2
usb-storage: host_reset() requested but not implemented
hub.c: new USB device 00:10.2-1, assigned address 3
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 3
scsi: device set offline - command error recover failed: host 2 channel 0 id 0 lun 0
SCSI disk error : host 2 channel 0 id 0 lun 0 return code = 6050000
I/O error: dev 08:01, sector 0
I/O error: dev 08:01, sector 2
I am kinda fuzzy on this subject but maybe the partition table is hosed up? I am not for sure if this even has a partition table but I would format it on a windows machine with the fat filesystem and only 1 partition. Then mount /dev/sda1 /mnt/usb.
None of the windows formatting utilities gave me a choice in partitioning. Its not like using fdisk on a harddrive. You're given a choice between fat16 and fat32, and a quick or thorough format....that's it. After formatting, windows shows no partitions.
Here's the strange thing....only my knoppix is seeing multiple partitions?!!! I booted up my Red Hat 9 this morning and plugged in the thumbdrive, then browsed the hardware:
/sda1 1 1016 250 fat32
It doesn't seem to see any partitions.
This is definately more complicated than it needs to be!!
I got a pendrive fairly recently, and although I don't use it all that often, I might be able to help out a little (or maybe not, you be the judge):
1. The first thing you need to do is create a subdirectory within /mnt for your pendrive. The reason you are getting the "...../mnt/pen does not exist" error is because you haven't created it yet. As root, enter: mkdir /mnt/pendrive
Once the mountpoint (ie, /mnt/pendrive) is created you will be able to mount a device to it.
2. Now mount the drive: mount /dev/sda1 /mnt/pendrive
You may need to specify the filetype, as you already indicated.
3. I sometimes get warning messages at this point but they are false alarms. After the mount, see if you can read the data on the pendrive anyway: ls -l /mnt/pendrive
If you get a directory listing, then obviously it's been mounted, and you should then be able to read/write from it. Assuming the pendrive works in Windows, copy some known set of files to it, and then determine whether or not they can be accessed when you attach the pendrive to the Linux box.
4. I think you may be confusing "partition" with "device". Your pendrive is a device (/dev/sda1) and if you added a second pendrive, it would become (probably) /dev/sda2, if you added a third pendrive, it would become /dev/sda3, etc. I think you may be expecting to see the various directories you've created on your pendrive (ie, /dev/sda1) appear as /dev/sda2, /dev/sda3, etc, similar to how a hard drive may be using /dev/hda2 for swap and /dev/hda3 for /home, etc. That's not the case here.
Thanks!! I think I may finally be getting somewhere. I used the commands you suggested and it actually mounted! BUT, my notes tell me I've used these same commands before, and they didn't work! I think my confusion lies in the inconsistent way the thumbdrive connects to the computer. When plugging it in, it has been showing up on the Desktop; hence, those commands didn't work. This time, however, the drive was not on the Desktop, so my entry into the /mnt directory allowed it to be mounted. Looking back, I previously entered these commands into /mnt while the Desktop directory held all my /sda "partitions". Do you know if this would account for the conflict???
I need to create a persistent Knoppix home directory for this thumbdrive to serve it's purpose. Apparently, because it's already mounted via /mnt/usb (my created /mnt file) , the persistent home directory cannot be made.
I've only used Knoppix a couple of times (it rocks) but am not overly familiar with it. However, as you know it runs entirely off the CD, and thus creating any new "directories" within its root structure won't really exist on physical media. It makes sense that anything you created under Knoppix ended up on the Desktop; furthermore it would make sense that you'd have trouble writing to it because it wouldn't exist physically. (At least as far as I am aware.)
Anyway, if you want to read/write to the hard drive, I think you will need to create a physical directory somewhere on your HD (just as you noted). Since you're also running Redhat, you already have a file system that supports Linux. This is what I'd suggest trying:
1. Post your complete partitioning scheme (ie, /etc/fstab so we know how you've partitioned your drive). For illustration purposes, I'll just assume that you've just created a swap partition (let's say it's /dev/hda2) and a / partition (let's say it's /dev/hda3).
2. Create a new mountpoint on the HD for the pendrive. For illustration purposes, let's say you: mkdir /home/<user>/pendrive (where <user> is your normal user ID) Note that the mountpoint does not have to be within /mnt, you can put it anywhere.
3. If you are running Redhat, you should be able to mount the pendrive with: mount /dev/sda1 /home/<user>/pendrive
4. Continuing with the same example, if you are running Knoppix, you should be able to mount the pendrive by first mounting the physical hard drive (aka where Redhat lives) to a given mountpoint that Knoppix can see: mount /dev/hda3 /<directory>
If you then cd to /<directory> the contents of your Redhat installation should be visible, including your new pendrive mountpoint.
5. You then should be able to: mount /dev/sda1 /home/<user>/pendrive
I'll have to emphasize that these comments are more theoretical than "real world guaranteed", due to my previously mentioned lack of experience with Knoppix. If you post your /etc/fstab it would be more likely that LQ could suggest a specific plan of attack.
In any event, the main goal here would simply be to mount a physical partition on your HD to a mountpoint that is accessible to Knoppix. Hopefully some of the above will be helpful, good luck with it -- J.W.