PDA

View Full Version : Cannot mount my thumbdrive!!



knopphead
04-25-2004, 06:29 AM
I started out playing with my new knoppix 3.3 live cd. Now I'm engaged in a fierce battle with it to make it function properly with my usb jump drive! Earlier today I had the jump drive formatted with ext2; knoppix recognized it in r/w mode and would mount it, but would not interact with it. After researching some previous posts, I determined I needed to format it in FAT16....which I did. However, it ended up with 4 partitions on it (funny, my windows machine didn't tell me that!)

Anyway, I'm assuming that in order to proceed I must be able to mount them....but I'm given error messages stating that neither sda1,sda2,sda3, or sda4 can be mounted because they are "not a valid block device" . What the hell does that mean?!!? :x

I fear I may be loosing this battle....I have precious little ammunition (knowledge) to "mount" a counterattack. :oops:

Anybody have a suggestion??

OErjan
04-25-2004, 08:55 AM
eeeh? 4 partitions?? try repartitioning it again, anf format in fat32. (fat 12, 16, 32... are all vfat).
you shold then be able to reach it with the comand
mount -t vfat /dev/sda1 /mnt/pen
that in turn might require you to make the directory /mnt/pen but...

knopphead
04-26-2004, 02:05 AM
Well, I reformatted it in FAT32, but knoppix still sees partitions /sda1 thru /sda4. Neither one of which I can mount!!

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...

I've reformatted this drive on both my windows ME and XP. 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!! Please let me know if you can think of something else!!

Thanks for responding!!!!! :?

swooshtika
04-26-2004, 06:22 PM
Well, I reformatted it in FAT32, but knoppix still sees partitions /sda1 thru /sda4. Neither one of which I can mount!!

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...

I've reformatted this drive on both my windows ME and XP. 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!! Please let me know if you can think of something else!!

Thanks for responding!!!!! :?

I had the same exact problem when I tried to use my SONY Micro Vault drive.

OErjan
04-26-2004, 07:02 PM
ok, the errormessages tell me that you have no /mnt/pen directory, nor a /mnt/usb.
do
mkdir /mnt/usb
mkdir /mnt/pen, now try again.
it should work.
now to the partitioning, I would try linux cfdisk to partition it, as root (you become root with the comands sudo su in knoppix)
I would then use (still as root)
mkdosfs /dev/sda1 to make the fat filesystem, it should work.
there might be trouble with the drive under win though but...
nothing alarming for me, just had to format it in win once.
to quit being root you issue the comand exit (od ctrl+d).

knopphead
04-26-2004, 07:22 PM
To: cfdisk
knoppix responds:

FATAL ERROR: Cannot open disk drive
Press any key to exit cfdisk

knoppix@ttyp0[knoppix]$ mkdir /mnt/usb
mkdir: cannot create directory `/mnt/usb': Permission denied

knoppix@ttyp0[knoppix]$ mkdir /mnt/pen
mkdir: cannot create directory `/mnt/pen': Permission denied

I can create directories simply called usb @ pen :

knoppix@ttyp0[knoppix]$ ls
Desktop pen tmp usb

But nothing seem to be affected by it...

OErjan
04-26-2004, 07:31 PM
you have to make the directories as root perhaps.

knopphead
04-26-2004, 08:14 PM
Alright now....in root am able to cfdisk, but only my actual hda partitions are read, not the sda.

So, I noticed all 4 of the sda partitions are in my home/desktop directory. When I created /usb and /pen directories I tried mounting them again, but no success....What am I doing incorrectly?

I appreciate your replies....please bare with me!

OErjan
04-27-2004, 09:14 AM
ok then you might get it working by doing
mount -t vfat /dev/sda1 /home/desktop/usb
the mountpoint is any empty directory you want.
it is just a place to "hang the painting", linux cares little for where that is, like any cat cares for correct placement of paintings, not a second glance (yes my cat is called Linux :oops: ).

seriously, mountpoint i just a place where you go to access the files.
if you make the dir in /mnt/ the code i gave earlyer should work.
ok what does
fdisk /dev/sda say? no not sda1, forget the 1 you want to see the whole disk.
keep asking, i will try helping.
what you do wrong. not much, it is me failing to explain.

OErjan
04-27-2004, 09:34 AM
knopphead: why have you spread your questions so? it is hard for both me and you to follow he instructions.
i have found you in 3 diferent topics.
keep the usbthumbdrive Qestions in one (here? ) it is easyer to answer well then.
if i know what you have tried and what info you have i can be clearer on instructions, as it is now it is a jiggsawpuzzle for you (and me).
as for info on the disk. do
dmesg|grep sd post the output here, then
fdisk -l /dev/sda and again post here

knopphead
04-27-2004, 05:12 PM
Yeah, I've spread some of my questions around a bit....Sorry! I'll keep them here now. I'm very grateful for your help!!

I'll post that dmseg output in a few minutes. Right now I'm booted in Red Hat 9 researching this thumbdrive problem. But here's some interesting information for you:

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.

The strange thing is....only my knoppix is seeing multiple partitions?!!! When I booted up my Red Hat 9 this morning and plugged in the thumbdrive, then browsed the hardware:

/dev/sda
/sda1 1 1016 250 fat32

It doesn't seem to see any partitions.

This is definately more complicated than it needs to be!! Are these Phantom partitions?

knopphead
04-27-2004, 07:20 PM
demesg.........

.
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# 1380
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 2, frame# 613
usb.c: USB disconnect on device 00:10.2-1 address 2
SCSI disk error : host 2 channel 0 id 0 lun 0 return code = 70000
I/O error: dev 08:01, sector 0
Device 08:01 not ready.
I/O error: dev 08:01, sector 2
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sns = 70 2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sns = 70 2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
sda: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
ldm_validate_partition_table(): Disk read failed.
I/O error: dev 08:00, sector 0
unable to read partition table
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sns = 70 2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sns = 70 2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
sda: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
ldm_validate_partition_table(): Disk read failed.
I/O error: dev 08:00, sector 0
unable to read partition table
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sns = 70 2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sns = 70 2
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
sda: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
ldm_validate_partition_table(): Disk read failed.
I/O error: dev 08:00, sector 0
unable to read partition table
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 sda: 512000 512-byte hdwr sectors (262 MB)
usb-uhci.c: interrupt, status 3, frame# 1569
sda: Write Protect is off
sda: sda1 sda2 sda3 sda4
root@ttyp0[mnt]#

knopphead
04-28-2004, 06:06 AM
I seem to have found a way to view the /sda partitions:

root@ttyp0[mnt]# cd /sbin
root@ttyp0[sbin]# fdisk -l /dev/sda

Disk /dev/sda: 262 MB, 262144000 bytes
9 heads, 56 sectors/track, 1015 cylinders
Units = cylinders of 504 * 512 = 258048 bytes

Device Boot Start End Blocks Id System
/dev/sda1 ? 1543921 3808821 570754815+ 72 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(357, 116, 40) logical=(1543920, 4, 5)
Partition 1 has different physical/logical endings:
phys=(357, 32, 45) logical=(3808820, 4, 35)
Partition 1 does not end on cylinder boundary.
/dev/sda2 ? 334702 4176028 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(334701, 3, 51)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(4176027, 2, 42)
Partition 2 does not end on cylinder boundary.
/dev/sda3 ? 3710083 7551409 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(3710082, 2, 26)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(7551408, 0, 25)
Partition 3 does not end on cylinder boundary.
/dev/sda4 ? 5725558 5725668 27749+ d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(5725557, 7, 33)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(5725667, 8, 35)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
root@ttyp0[sbin]# cfdisk -l /dev/sda
cfdisk: invalid option -- l

Usage:
Print version:
cfdisk -v
Print partition table:
cfdisk -P {r|s|t} [options] device
Interactive use:
cfdisk [options] device

root@ttyp0[sbin]# cfdisk -P r -z /dev/sda
Disk Drive: /dev/sda
Sector 0:
0x000: EB 58 90 4D 53 44 4F 53 35 2E 30 00 02 04 26 00
0x010: 02 00 00 00 00 F8 00 00 3F 00 FF 00 00 00 00 00
0x020: 00 D0 07 00 E5 03 00 00 00 00 00 00 02 00 00 00
0x030: 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00
0x040: 00 00 29 10 84 A4 24 4E 4F 20 4E 41 4D 45 20 20
0x050: 20 20 46 41 54 33 32 20 20 20 33 C9 8E D1 BC F4
0x060: 7B 8E C1 8E D9 BD 00 7C 88 4E 02 8A 56 40 B4 08
0x070: CD 13 73 05 B9 FF FF 8A F1 66 0F B6 C6 40 66 0F
0x080: B6 D1 80 E2 3F F7 E2 86 CD C0 ED 06 41 66 0F B7
0x090: C9 66 F7 E1 66 89 46 F8 83 7E 16 00 75 38 83 7E
0x0A0: 2A 00 77 32 66 8B 46 1C 66 83 C0 0C BB 00 80 B9
0x0B0: 01 00 E8 2B 00 E9 48 03 A0 FA 7D B4 7D 8B F0 AC
0x0C0: 84 C0 74 17 3C FF 74 09 B4 0E BB 07 00 CD 10 EB
0x0D0: EE A0 FB 7D EB E5 A0 F9 7D EB E0 98 CD 16 CD 19
0x0E0: 66 60 66 3B 46 F8 0F 82 4A 00 66 6A 00 66 50 06
0x0F0: 53 66 68 10 00 01 00 80 7E 02 00 0F 85 20 00 B4
0x100: 41 BB AA 55 8A 56 40 CD 13 0F 82 1C 00 81 FB 55
0x110: AA 0F 85 14 00 F6 C1 01 0F 84 0D 00 FE 46 02 B4
0x120: 42 8A 56 40 8B F4 CD 13 B0 F9 66 58 66 58 66 58
0x130: 66 58 EB 2A 66 33 D2 66 0F B7 4E 18 66 F7 F1 FE
0x140: C2 8A CA 66 8B D0 66 C1 EA 10 F7 76 1A 86 D6 8A
0x150: 56 40 8A E8 C0 E4 06 0A CC B8 01 02 CD 13 66 61
0x160: 0F 82 54 FF 81 C3 00 02 66 40 49 0F 85 71 FF C3
0x170: 4E 54 4C 44 52 20 20 20 20 20 20 00 00 00 00 00
0x180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1A0: 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A 52 65
0x1B0: 6D 6F 76 65 20 64 69 73 6B 73 20 6F 72 20 00 00
0x1C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA

[ this means nothing to me^ ]

root@ttyp0[sbin]# cfdisk -P s -z /dev/sda
Partition Table for /dev/sda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
Pri/Log 0 511559 0# 511560 Free Space None
root@ttyp0[sbin]# cfdisk -P t -z /dev/sda
Partition Table for /dev/sda

---Starting--- ----Ending---- Start Number of
# Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- ----------- -----------
1 0x00 0 0 0 0x00 0 0 0 0 0
2 0x00 0 0 0 0x00 0 0 0 0 0
3 0x00 0 0 0 0x00 0 0 0 0 0
4 0x00 0 0 0 0x00 0 0 0 0 0

Now I need to figure out the proper command to reformat it ONE partition. I don't think fdisk will do it....

OErjan
04-28-2004, 09:02 AM
firstly you can become root with the comands sudo su in knoppix, that would give you use of fdisk/cfdisk... without having to use cd or full paths.

If i where in your situation I would try linux cfdisk or fdisk to partition it.
remove everything resemblig partitions, then make one new partition.
lastly, as root
mkdosfs /dev/sda1 to make the fat filesystem, it should work.
i have had a 64Mb thumbdrive withch had 64 raided partitions according to linux (redhat, Slackware, Debian, lnx-bbc), each 1024k was one partition with separate fat ... as the read/write life is limited on flash (normally 10 000+) the writing to and reading of is slowly wearing it out. that is less if the above method is used. the wear is distributed. if you use the noatime option in the mounting that is somewhat reduced, and if you mount/unmount as little as possible that is even further reduced.
i have this in my /etc/fstab.

/dev/sda1/mnt/pen vfat noauto,users,noatime,gid=users,umask=0002,iocharse t=iso8859-15 1 0

the iocharset=... allows me to use |åäöÅÄÖ and €| that is, caracters not on a US keyboard, to name files.
as i am Swedish and my name contain Ö and ö ... i need that.
you might need a diferent set (or none at all)
here to help. (down with flu so noth much use otherwise just now) OErjan. Örjan really but...
that is a O with two dots above (if you rotate O: so the dots are above you are close) not all can see that, so i use OE instead.

knopphead
04-28-2004, 04:53 PM
Hi OErjan! Thanks, I'll work on that!

Question:

My knoppix has not been consistent in it's recognition of the pendrive. I always plug it in after boot because it locks up my mouse and keyboard if I plug it before boot. On some occasions after plug-in it appears on my Desktop, while at other times it is read into /mnt (without me entering it). It would seem to me that it needs to be on the Desktop in order for the "Persistent knoppix home directory" to be configured properly. Am I correct on this?? Do you know if the file system type has anything to do with this??

Other observations regarding this:

--If I unplug and re- plug the pendrive 2 or three times it will sometimes appear on the Desktop (I have not yet determined if it leaves /mnt when I do this).
--When the pendrive was formatted in fat16 it usually appeared on the Desktop. It's now fat32 and, unmanipulated, it will usually go to /mnt.

It seems to me that before I can properly configure this thing to save my settings, I need to establish a 'home' for it to go to in a consistent way.
Do you have any thoughts on this?? :)

OErjan
04-28-2004, 06:48 PM
actually the desctopicon is a "link" to the /mnt/... that is the /mnt is likely allways there.

if you do the manual mount it should work every time. you can save config aswell not only the /home

knopphead
04-29-2004, 05:41 AM
In researching I ran across this command as a boot option:

knoppix home=/dev/sda1/knoppix.img or
knoppix home=/dev/sda/knoppix.img

I'm not sure what the /knoppix.img does, but it consistently froze the computer while still in the booting process. Also,

knoppix home=/dev/sda1 or knoppix home=scan

manages to make it through booting to the blue "initiating system sequence" screen before locking up the system.

All other similar variations of this command seem to be quite effective at locking up as well.

It seems to me that if this pen-device can't survive the bootup process, it sort of defeats the purpose of trying to use it in a live cd format. Assuming that the boot options work, wouldn't it be necessary to type them in manually for every system startup, since the pen-device is not even recognized until after hardware configuration? Is this what is supposed to happen?



__________________

OErjan
04-29-2004, 10:25 AM
aaah, yes, but the home=scan is just to keep your mail, desktopsettings... intact, all the rest is stored in a diferent cheatcode.
both cheatcodes have to be typed at boot.



myconfig=scan or floppyconfig or floppyconf (in recent versions)
Run knoppix.sh from a floppy. The "floppyconfig" option allows you to reconfigure the system after autoconfig, or install your own config files, by mounting a floppy disk and running a bourne shell script called knoppix.sh from the root directory on this floppy. There is a GUI to create such a configuration floppy disk calles "saveconfig" (also located in the KDE menu under "KNOPPIX", but experts also know how to do this by creating their own shellscripts. The configuration with network and graphics setup are stored in configs.tbz. A file called _knoppix.sh_, if located in the toplevel KNOPPIX directory on CD, will also be executed at startup. This makes it easier to create customized versions without having to change anything on the compressed filesystem KNOPPIX/KNOPPIX.

knopphead
04-29-2004, 05:55 PM
Would I be correct in thinking that these boot options/cheatcodes are only effective when a properly configured memory stick is plugged in?

I've used every combination of the home=scan home=/dev/sda1/knoppix.img and myconf=scan, myconf=/dev/sda1.....

Most freeze after /est/fstab is configured....both home=scan myconf=scan
and home=scan myconf=/dev/sda1 resulted in

Checking /mnt/ for knoppix configuration...
Filesystem not auto detected, trying to mount /dev/ with AES256 encryption
/dev/: Is a directory
Mount failed, retry? [y/n]

Then it froze...

delx
05-09-2004, 08:32 AM
I had exactly the same problem with my thumbdrive. It seems that the manufacturer formatted the drive without a partition table. To mount the drive, you could use this command..

su
mkdir /mnt/thumbdrive
mount -t vfat /dev/sda /mnt/thumbdrive
You can now work with the drive..
umount /mnt/thumbdrive (for when you're finished)

However a better solution would be to add a partition table to your thumbdrive, and reformat in fat32. Do note that this means the drive will NOT work in win9x anymore, and you will lose all data on the drive, for some reason win9x becomes confused if there's a partition table on a thumbdrive. Win2k and XP I have tested, and they work fine.
To repartition and format the drive do exactly this from Knoppix console (you will only have to do this once)

su (become root so you have permission)
fdisk /dev/sda (open the partitioning tool to work with your thumbdrive)
At the fdisk prompt you will see some errors, fdisk is trying to interpret the non-existant partition table.
Type 'o' to create a new partition table.
Then type 'n' to create a new partition, make it number 1, and leave the defaults as they are for the size (to use the whole disk)
Type 'w' to write the table and quit fdisk
Now we need to format the drive...
mkfs.vfat /dev/sda1 should do the trick...

Now you can use the icon on your desktop for sda1, the other icons won't go away until you restart.

Note that you only have to do this once, and from now on your thumbdrive will appear on the desktop whenever you boot. You should always unmount it before you remove it.

Hope that all helps somebody (I had to figure it myself =P)
Enjoy!