PDA

View Full Version : About USB Flash Drive on Knoppix Live CD



satimis
02-27-2006, 04:01 AM
Hi folks,

I have an USB Flash Driver (USD Pen drive) which can be dectected automatically when plugin before booting Knoppix LiveCD. It works without problem. I expect to know whether it can be plugin and plugout after booting Knoppix LiveCD. If possible would it cause damage on USB Flash Drive? How to get it detected after plugin?

TIA

satimis

|enouf|
02-27-2006, 03:05 PM
Hi folks,

I have an USB Flash Driver (USD Pen drive) which can be dectected automatically when plugin before booting Knoppix LiveCD. It works without problem. I expect to know whether it can be plugin and plugout after booting Knoppix LiveCD. If possible would it cause damage on USB Flash Drive? How to get it detected after plugin?

TIA

satimis
hi;
what you need is the "mount" and "umount" (unmount) command options...
Rule of thumb; Plug in device when not yet mounted -- and unplug only after unmounting (umount)

After booting Knoppix with the USB key already inserted -- open a Konsole and type in sudo cat /etc/fstab = paste the results here (this will show us what mount points knoppix is using and hopefully fdisk will show us what filesystem is on the usb stick, if any) -- also do sudo fdisk -l ....paste results here

Tell us which exact version of Knoppix (3.x .... 4.x, etc)
Do you already have Data on the USB key ??
Do you want to save / use / keep that data ?

satimis
02-27-2006, 05:19 PM
Hi enouf,

Knoppix 4.0.2

Tks for your advice.

I got it now. After plugin the USB Flash Drive. Knoppix detected it automaticallly. I just mounted it on the desktop with right-click --> mount. One drawback was I could not save file on it, copying files from it being possible.

However if mounting the USB Flash Drive on console as root I can save data on it while working on the console. I could not save files on it with drag and drop on starting Home.

$ sudo cat /etc/fstab

/proc /proc proc defaults 0 0
/sys /sys sysfs noauto 0 0
/dev/pts /dev/pts devpts mode=0622 0 0
/dev/fd0 /mnt/auto/floppy auto user,noauto,exec,umask=000 0 0
/dev/cdrom /mnt/auto/cdrom auto user,noauto,exec,ro 0 0
/dev/cdrom1 /mnt/auto/cdrom1 auto users,noauto,exec,ro 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext2 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda2 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda3 /mnt/hda3 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda5 /mnt/hda5 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 /mnt/hda6 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda8 /mnt/hda8 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda1 /mnt/sda1 vfat noauto,users,exec,umask=000,uid=knoppix,gid=knoppi x 0 0what is umask=000

# fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 77 514080 82 Linux swap / Solaris
/dev/hda3 78 1415 10747485 83 Linux
/dev/hda4 1416 4865 27712125 5 Extended
/dev/hda5 1416 2510 8795556 83 Linux
/dev/hda6 2511 3485 7831656 83 Linux
/dev/hda7 3486 4216 5871726 83 Linux
/dev/hda8 4217 4865 5213061 83 Linux

Disk /dev/sda: 503 MB, 503709696 bytes
16 heads, 32 sectors/track, 1921 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1922 491888 6 FAT16


Do you already have Data on the USB key ??It is a brand new device having some files on it for testing only.


Do you want to save / use / keep that data ?Not on test run.

Is there any way to add password on the device? Whenever any user try to mount it, password is required.

I have Avixe Platinum Drive. On viisiting its company website I found manual adding password for MSWindows. I can't find the same for Linux.

Any advice. TIA

B.R.
satimis

|enouf|
02-27-2006, 06:15 PM
I got it now. After plugin the USB Flash Drive. Knoppix detected it automaticallly. I just mounted it on the desktop with right-click --> mount. One drawback was I could not save file on it, copying files from it being possible.


Ok -- 1st note ; I'm new to linux myself ;) I think either
A: you'll need to mount it as a DIR - like so
mkdir /dev/sda1 /mnt/SavedData
mount -t vfat -orw,userid=KNOPPIX /dev/sda1 /mnt/SavedData
(some 'options' above may be slightly off -- and you can substitute anything you want for "SavedData" - just use the whatever you create o BOTH lines ;))
Now look in file browser, you'll notice there's a New entry listed called /mnt/SavedData -- you would drag and drop to that

or

(this is highly speculative and unclear to me)
B: You'll need to alter the permissions via right clicking Desktop Icon for device, and (this is very hazy) ??? Add yourself/KNOPPIX user to the root group -- or perhaps you have to create/associate the Knoppix user with Knoppix Group (something like that) -- perhaps you'd have to create a knoppix group first, but need to give it the correct ID (like 1000 or something) -- I read about once a while ago, but completely forgot the procedure :(



However if mounting the USB Flash Drive on console as root I can save data on it while working on the console. I could not save files on it with drag and drop on starting Home.

Obviously, it's a "Permissions" issue - someone else can help you (I don't know offhand - above is very unclear to me)....Try this..Open Konsole and type in sudo su (this should give you superuser permissions, but perhaps only within the shell - not sure) ...then go try drag-n-drop -- whether or not it works there's likely a default amount of time that this enables superuser (su) privileges (perhaps 15minutes? or 1hr? I forget ...)


Disk /dev/sda: 503 MB, 503709696 bytes
16 heads, 32 sectors/track, 1921 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1922 491888 6 FAT16[/code]

Ok - it's FAT16 - good (note the ' -t vfat ' in the mount command above - this tells mount --> TYPE = FAT16/32/vfat)


It is a brand new device having some files on it for testing only.
ok - great


Not on test run.
okee - dokee


Is there any way to add password on the device? Whenever any user try to mount it, password is required.

I have Avixe Platinum Drive. On viisiting its company website I found manual adding password for MSWindows. I can't find the same for Linux.

Any advice. TIA

hmmm.....I'm sure there's a way -- but Know this... FAT16/32 File systems do NOT have the ability to maintain/use Unix Permissions (they can't store that data) -- but the usual workaround for Storage purposes is to TAR ball any data that you are backing up (create a .tar file), using a TAR *will* store the appropriate permissions

-- Also, either in place of or after that, you could even ZIP up the files (and apply/supply a passwd to the zipped Directory) I am not too familiar with using GZIP, or bzip2 (see man pages) -- OR -- you can make a FileSystem on the USB key for use (ext2, ext3, ReiserFS, whatever) that WILL maintain and honor permissions. Ext3 and ReiserFS has 'journaling' which helps. Others here can better guide you through that though.

|enouf|
02-27-2006, 06:25 PM
Another Idea is to let/allow Knoppix to create a "persistent /home directory" onto the USB key (note however the FAT16/32 permission issues will STILL APPLY...i.e., not permissions capable) -- Look under "Utilities" >> "Create Persistent HOME DIR"...I'm not sure if Knoppix will offer to ReWrite over with it's own new file system, but I doubt it.