Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
mounting usb thumbdrive and going in circles:NOT SOLVED
Someone had given me an Apacer 128mB drive with a document I need.
I insert it:
Code:
tail -f /var/log/messages
Jun 14 16:41:52 localhost kernel: hub.c: new USB device 00:1f.4-2, assigned address 5
Jun 14 16:41:55 localhost kernel: Initializing USB Mass Storage driver...
Jun 14 16:41:55 localhost kernel: usb.c: registered new driver usb-storage
Jun 14 16:41:55 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Jun 14 16:41:55 localhost kernel: sda: sda1 sda2 sda3 sda4
Jun 14 16:41:55 localhost kernel: USB Mass Storage support registered.
Thanks EyesOnly, I did that (fdisk) and you were right. Fdisk complains that the partitions overlap each other etc.
I searched another forum and found this:
Code:
How to solve this problem.
fdisk -l shows 4 partitions (sda1 to sda4), and On Track Disk Manager on sda3.
Trouble comes from this non-standard partition table. So you have to format the drive in a standard way.
1) Save all data stored on the USB flash disk.
2) As root, fdisk /dev/sda1, command d to delete the first partition
3) Repeat for the three other ones.
4) Format the free space in FAT 16; diskdrake from Mandrake is a convenient tool.
5) Delete the /etc/fstab changes.
6) hotplug service must be loaded at boot.
6) You can now plug/unplug your drive.
Now, you have got a generic pendrive, one 256 Mb FAT 16 partition; works fine with Windows, Linux or Mac OS.
I followed that except I used cfdisk to format the free space and it worked fine, and the file that I wanted was still there!!!
Put the following into fstab
Code:
/dev/sda /mnt/thumbdrive auto noauto,users 0 0
and now any user can mount and read/write to the drive ))))
After doing the things I said the drive worked fine between 2 Linux boxes,
but when I plugged it back into an XP box it complains that the drive is not formatted
and, in typically helpful fashion, offers to format it for me
I have reformatted it a few times with cfdisk to W95 VFAT, W95 VFAT (LBA) with the
same result every time I plug it into XP
So, if anybody has any more suggestions I'd be very happy to hear them,
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
Posts: 153
Rep:
I tried this with my Iomega Zip 250 disks: (it's USB, so maybe this can solve your problem too)
1. Empty the disk (of course, copy all the files you want on the disk)
2. dd if=/dev/zero of=/dev/sda bs=1024 count=1024 (with the disk inserted but no partition on the disk is mounted)
3. fdisk /dev/sda (it should complain about invalid partition table but don't worry)
4. create a partition (sda1), make it "W95 FAT32 LBA"
5. write the changes (command 'w')
6. put a filesystem on /dev/sda1 with mkdosfs (i forgot the options but you can check the man page of mkdosfs or mkfs.msdos or mkfs.fat or mkfs.vfat)
I borrowed the drive back to try but the owner has already chosen "OK" when XP asks him of he want to format it, and saved some files there.
The files were invisible to me when I mounted it in Linux, so I copied a couple of files to it (no error messages, files showed up fine) and took it back and plugged it into his xp box.
Now the files he put are visible, but mine were not
I give up, will buy my own pendrive, and learn some more.
For removable storage devices, you have to include sync in the mount options because if you do not you will have data corruption or the data will not be written the drive yet. Putting a line for removable storage devices in fstab will not work well if you have a bunch of usb thumb drives, a USB hard drive, and a USB CD-ROM. I suggest mounting USB drives manually.
For FAT partitions, inlcude umask=000 so that you have write permission for directories and files.
Each USB thumbdrive, USB CD-ROM, USB DVD-ROM, etc has its own way of handling USB data. It may work in Windows but not in LINUX.
Just make a partition with ID number 83. Then format it as a FAT filesystem. It will then work in any OS that can read FAT. I did that for my thumb drive and my 120 GB hard drive. They work.
I recomend trying to format it again using windows, but make sure you don't take the default of fat32 choose fat.
mount it as
mount /dev/sd*1 /mnt/thumdrive
sd*1 being scsi device that your thumbdrive is considered mine is sda1.
Yeah sounds alot like what happened with me till I mounted it as a scsi device with a file system I could write.
I've got a SanDisk 128Mb thumbdrive. The only thing that I do is su to root, I have a directory off of root called USB, after I insert the thumbdrive I type.
Code:
mount /dev/sda1 /usb
Once this is done, it mounts it and I can see my entire drive. There was no formatting needed in either Linux or Windows. I've done it this way with Mandrake, SUSE, RH9, and my latest of FC2.
I have used my 128 MB USB drive on Windows 2000, XP, and every distro of Linux I have ever worked with, without ever making any changes to the drive. It worked fine will all the OSes right out of the box.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.