Success -> USB Memory Key to Store Knoppix Configuration
I'm using a 32 megabyte USB memory key to store Knoppix'e configuration and home directory data. It works fine, but I have a few questions.
I had a hard time figuring out the device name for the USB key. I looked in /var/log/messages and it was always empty. I looked inthe daily message and found the following:
# dmesg | grep sda
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sda: 64000 512-byte hdwr sectors (33 MB)
sda: sda1 sda2 sda4
#
So i made a mount point mkdir /mnt/usbkey and then mounted sda with mount -t vfat /dev/sda /mnt/usbkey. That worked OK, I could save files to the new mount, but I couldn't select /mnt/usbkey in KNoppix's save configuration dialog.
I could select floppy, /mnt/sda1, /mnt/sda2, or /mnt/sda4 in the save configuration dialog. Apparently these got automounted somehow. Selecting /mnt/sda1 resulted in a save configuration error. Selecting /mnt/sda4 worked perfectly. It also worked fine for creating a home directory image. The config and home directory also restore correctly on boot up too. :D :D
Where did /mnt/sda1, /mnt/sda2, and /mnt/sda4 come from? Knoppix must have automounted them? Why did /mnt/sda1 not work, but /mnt/sda4 work?
What was the sda: sda1 sda2 sda4 part of the daily message telling me?
I guess the plan is to just pop a USB memory key in, let Knoppix automount it, and go from there...
-jb
How to fix USB Key for config or persistent home dir
Good afternoon all, I've been travelling these forums a lot trying to solve my problem of my USB key not being accessible for saving config or for setting persistent home directories. Wasn't able to find much in the way of answers, so I started messing around on my own.
I used fdisk /dev/sda in Knoppix shell and found that there were indeed four partitions on my measly 32mb Sony Microvault. For some reason none of the partitions were accessible though without a significant amount of tweaking. I went ahead and deleted all 4 of the partitions on my key and verified that they were indeed gone.
Next I simply plugged the key into my Windows XP box (gotta keep one around for Visual Studio work) and formatted the drive as FAT16 (for some reason when Sony ships them they are formatted FAT12, which is quite useless)
I then went back to my Knoppix machine and plugged in the key and the icon automatically appeared on my desktop as a mount to /dev/sda1. I am now able to save my config as well as create a persistent home dir on the key. I have since tried this same technique on a number of different keys I was having problems with, every one works like a charm.
Hope that helps.
Wally Lawless
http://www.power-coder.com
USB flash memory key problems, Linux mount /dev/sda1
I thought I should post a reply as the info in this thread has been very useful. One of my users has had the same problem with a noname 256MB key flash thingumy. Can only mount as /dev/sda and there are 4 sillyl partitions on the usb device.
He tried formatting the thing on this Windows computer at home (FAT 16) and that seemed to do nothing - one assumes Windoze lied about reformatting the device.
I then did:
fdisk /dev/sda
deleted all 4 partitions
created one primary partition
changed the type of the primary partition to FAT 16
exit fdisk and save
mkfs.vfat /dev/sda1 (this is VERY quick, and I did actually wonder if it had worked)
mount -t vfat /dev/sda1 /usb
touch /usb/test
echo "HURRAH IT WORKED" > /usb/readme
ls -l /usb works rather well.
Then put this into /etc/fstab
/dev/sda1 /usb auto noauto,owner,user 0 0
for the happy user
I stuck the usb flash key into a Windoze 2000 computer and it worked fine and dandy.
If this is the manufacturers of flash devices using FA12 then they are total numpties and I have to wonder why Windoze computers can actually work with these devices when they have such odd partition tables and file systems.
FAT12 , Flash, Multiple Partitions
I believe that Linux simply doesn't deal with FAT12 correctly, this would explain why FAT12 memory devices are not a problem on Windows, but are a problem on Linux (Show up as having 4 partitions). The reasons FAT12 is commonly used on flash devices are:
A) Microsoft is enforcing patents involving FAT16/32 and Long File Names
B) Most devices don't need the extra storage FAT16 provides
From one of the prior posts, it sounds like the windows format utilities don't always work to reformat the devices as FAT16, that's best done using the flash vendor utility or Linux utilities like fdisk and mkfs.
I filed a Knoppix bug about this, but I believe it's more of a kernel issue.