PDA

View Full Version : Mounting SmartMedia, Compact Flash, etc



dunbar
09-16-2003, 07:44 PM
I would like to know how to mount flash memory types.
cdrecord -scanbus shows the following:
knoppix@ttyp0[knoppix]$ cdrecord -scanbus
Cdrecord 2.01a06 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
scsibus0:
0,0,0 0) 'COMPAQ ' 'SC-148F ' 'FA07' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
scsibus1:
1,0,0 100) *
1,1,0 101) *
1,2,0 102) *
1,3,0 103) 'YAMAHA ' 'CRW8824S ' '1.00' Removable CD-ROM
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *
scsibus2:
2,0,0 200) 'General ' 'Flash Disk Drive' '2.05' Removable Disk
2,1,0 201) *
2,2,0 202) *
2,3,0 203) *
2,4,0 204) *
2,5,0 205) *
2,6,0 206) *
2,7,0 207) *


and cat /proc/scsi/scsi shows the following:
knoppix@ttyp0[knoppix]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: COMPAQ Model: SC-148F Rev: FA07
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 03 Lun: 00
Vendor: YAMAHA Model: CRW8824S Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: General Model: Flash Disk Drive Rev: 2.05
Type: Direct-Access ANSI SCSI revision: 02
knoppix@ttyp0[knoppix]$

How does one mount such devices as I found on scsi channel #2?

Thaks for such a great tool!

brucec
09-16-2003, 09:41 PM
Have you tried booting with the compactflash card in?

I have similar results to you with cdrecord -scanbus and cat /proc/scsi/scsi
(though it appears you have two CD-RWs, while I only have one, so I
have one less entry).

I couldn't immediately guess what device to mount, so tried rebooting,
and, *voila* I see an extra "Hard Disk Partition [sda1]" that is my
CompactFlash card (an Icon on the X desktop). doing df -kl I see it
is /dev/sda1 mounted onto /mnt/sda1, and I can peruse all my pictures.
I can, of course, now mount and umount the device and remove/replace
as appropriate.

Haven't yet tried to see if I can make it my home directory or config
dir from the knoppix boot line, but I guess that's next.

I'm using Knoppix 3.2, downloaded 9/15/2003.

Hope this works for you!

dunbar
09-17-2003, 01:51 PM
Ok, 'try booting with the media installed into the reader' - will try in a few minutes. Can be mounted as read/write, I hope.... I will see soon enough!

FWIW, the SCSI device at 0,0,0 is called a "Removable CD-ROM" because it actually is a reader drive. Not exactly sure why Knoppix puts my 48x reader into the SCSI section (e.g. why bother with SCSI emulation), but it is my Knoppix boot drive. I personally would have left the reader configured as IDE, but I'm certain that the SCSI emulation aspect is not interfering in any way, so I applaud the novel idea - it actually works! :shock: :lol: :wink:

dunbar
09-17-2003, 02:05 PM
Sadly, no, the desktop does not contain any extra devices, just the CDRW, the CDROM, the floppy and the local IDE hard disk.

Which version of Knoppix are you using, mine is a few months old.

dunbar
09-17-2003, 02:54 PM
Ok, made progress since a few minutes ago.... I can see the files!

1]
sudo mkdir /mnt/sdaNo errors.

2]
ls /mnt
# auto cdrom cdrom1 fd0 floppy hd hda1 proc pts sda sda1 test
So far, so good.

3]
sudo mount -t msdos /dev/sda1 /mnt/sdaNo errors.

4]
ls /mnt/sda
ls: /mnt/sda/getafile.htm: Permission denied
ls: /mnt/sda/7500me~1.xls: Permission denied
ls: /mnt/sda/cablev~1.xls: Permission denied

uh-oh... I need Long filenames, maybe msdos was a bad choice...

5]
knoppix@ttyp0[knoppix]$ sudo umount /mnt/sda
knoppix@ttyp0[knoppix]$ sudo mount -t vfat /dev/sda1 /mnt/sda
knoppix@ttyp0[knoppix]$ ls /mnt/sda
ls: /mnt/sda/getafile.htm: Permission denied
ls: /mnt/sda/7500 memory and CPU options.xls: Permission denied
ls: /mnt/sda/cable vs dialup.xls: Permission denied
Better, but permissions still whacky. Maybe this will work, so I try to touch a file on the media

6]
knoppix@ttyp0[knoppix]$ touch /mnt/sda/touchfile
touch: creating `/mnt/sda/touchfile': Permission deniedThe card is not write protected, and Windows just dropped the files in it without problem, so the hardware works.

So maybe I need to mount as read/write.... using explicit command mount -w ??

7]
knoppix@ttyp0[knoppix]$ sudo umount /mnt/sda
knoppix@ttyp0[knoppix]$ sudo mount -w -t vfat /dev/sda1 /mnt/sda
knoppix@ttyp0[knoppix]$ ls /mnt/sda
ls: /mnt/sda/getafile.htm: Permission denied
ls: /mnt/sda/7500 memory and CPU options.xls: Permission denied
ls: /mnt/sda/cable vs dialup.xls: Permission denied
knoppix@ttyp0[knoppix]$ touch /mnt/sda/touchfile
touch: creating `/mnt/sda/touchfile': Permission denied

Any ideas what to do next? This is going to be a 'smacks self in the head' solution, I can tell.

dunbar
09-17-2003, 03:33 PM
Here it is... 'smacks self in head'.

I rebooted once again, and this time, the SmartMedia card was recognized as brucec said it worked for him. :oops: Maybe using the floppy disk for 'myconfig=/dev/fd0' was causing me access problems to /mnt/sda1... for this reboot, myconfig failed to load from floppy (I had to recreate all my settings but at least I gained access to the SmartMedia card, good trade).

Not sure why the first reboot attempt failed, but brucecs' solution is good for me as of now. I hope it will be consistent, I prefer this method over using a floppy - much faster!!

Might thoughtful work, this knoppix is - automatic discovery is a true gift!

Fabianx
09-17-2003, 03:53 PM
Here it is... 'smacks self in head'.

I rebooted once again, and this time, the SmartMedia card was recognized as brucec said it worked for him. :oops: Maybe using the floppy disk for 'myconfig=/dev/fd0' was causing me access problems to /mnt/sda1... for this reboot, myconfig failed to load from floppy (I had to recreate all my settings but at least I gained access to the SmartMedia card, good trade).

Not sure why the first reboot attempt failed, but brucecs' solution is good for me as of now. I hope it will be consistent, I prefer this method over using a floppy - much faster!!

Might thoughtful work, this knoppix is - automatic discovery is a true gift!

The only mistake you made was to think that everyone should be able to read and write to the stick ...

But if you mount it as root, only root has access to it :-).

so sudo ls -la /mnt/sda would work.

:-)

However you can even detect an usb stick after you booted.

Just do:



sudo rebuildfstab -r
mkdesktophdicons


hm, this _should_ work automatically. I have to talk with Klaus about it.

cu

Fabian

dunbar
09-17-2003, 05:38 PM
The only mistake you made was to think that everyone should be able to read and write to the stick ...

But if you mount it as root, only root has access to it :-).
Oww! My head hurts - too many smacks!
However you can even detect an usb stick after you booted.



sudo rebuildfstab -r
mkdesktophdicons


Thanks for the reply, Fabianx, I will try to remember the rebuildfstab -r instructions, good to know.

dunbar
09-17-2003, 05:47 PM
BTW: Under Knoppix:

knoppix@ttyp0[knoppix]$ uname -a
Linux Knoppix 2.4.20-xfs #1 SMP Mit Mär 26 15:37:36 CET 2003 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

My CDR is old, Fabianx, possibly this problem was corrected since my burn.

aay
09-17-2003, 08:18 PM
I moved this thread over to the general support forum. Tips and tricks is for posting tweaks and short howtos for Knoppix. Questions like this would probably get more response in another forum.

Adam