PDA

View Full Version : How can I save data on my Memory stick ?



spree
12-12-2004, 01:55 PM
Hello, I use knoppix for my linux assigments at collage.
I have winXP pro installed and when I need to use linux, I run the knoppix boot cd.

As I understand, knoppix allows me to save data only on my flopy drive. Since I do not have one on my PC, I would like to write my data on my Memory stick. However, Knoppix do not allow me to save data on it.
How do I enable saving data on my "Disk on key" USB device ?

OErjan
12-12-2004, 04:04 PM
rightclick and chose "remount read/write" or something like it (not on knoppix just now)

CrashedAgain
12-12-2004, 04:59 PM
Hello, I use knoppix for my linux assigments at collage.
I have winXP pro installed and when I need to use linux, I run the knoppix boot cd.

As I understand, knoppix allows me to save data only on my flopy drive. Since I do not have one on my PC, I would like to write my data on my Memory stick. However, Knoppix do not allow me to save data on it.
How do I enable saving data on my "Disk on key" USB device ?

right click on the desktop icon. ; 'change to read/write mode' should be under 'actions'

or manually mount it read/write: the command is 'sudo mount -rw /dev/???'
(somebody else has to help out here, I dunno what a usb /dev/??? is since I don't have one but I thought I should add the manual command since it is sometimes more reliable than the desktop icon action script.)

firebyrd10
12-12-2004, 05:21 PM
Hello, I use knoppix for my linux assigments at collage.
I have winXP pro installed and when I need to use linux, I run the knoppix boot cd.

As I understand, knoppix allows me to save data only on my flopy drive. Since I do not have one on my PC, I would like to write my data on my Memory stick. However, Knoppix do not allow me to save data on it.
How do I enable saving data on my "Disk on key" USB device ?

right click on the desktop icon. ; 'change to read/write mode' should be under 'actions'

or manually mount it read/write: the command is 'sudo mount -rw /dev/???'
(somebody else has to help out here, I dunno what a usb /dev/??? is since I don't have one but I thought I should add the manual command since it is sometimes more reliable than the desktop icon action script.)

Don't know what you mean by more reliable, the scripts baiscly(sp) runs that command.

markpreston
12-13-2004, 12:26 AM
Hi all,
I have found the following scripts work. Firstly, I have included the scripts I use for start-up of a customised Knoppix based Linux Apache MySQL PHP (LAMP) server which runs in RAM. This should put the USB scripts in context. The scripts for saving and restoring data to and from a USB device follow.

For start-up LAMP (This is a command initiated by clicking a desktop icon with the following "Execute" command attached):
sudo /KNOPPIX/usr/local/bin/startLAMP
in /etc/skel/Desktop
and
#!/bin/bash
# Start Apache and MySQL. Put toophpix database into RAM. Open Mozilla browser. Filename=startLAMP

/etc/init.d/apache start
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
mozilla "http://127.0.0.1/Toophpix/page3.php"

goes in /KNOPPIX/usr/local/bin/ directory


I use the same directories for the USB scripts.

For save to USB the commands I am using are:
sudo /usr/local/bin/saveToUSB
and
#!/bin/bash

# Back up toophpix data to USB device.Filename=saveToUSB

modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysqldump --opt -u root toophpix > /mnt/usbstore/toophpix.sql
umount /mnt/usbstore


For restore from USB the commands I am using are:
sudo /usr/local/bin/restoreFromUSB

and

#!/bin/bash

# Restore MySQL toophpix database from USB device.Filename=restoreFromUSB

modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysql -u root toophpix < /mnt/usbstore/toophpix.sql
umount /mnt/usbstore

The umount commands at the end help ensure that the USB device can be
mounted if the user clicks on the
Desktop icon for the USB stick (Hard-Disk Partition sda1) that appears once Knoppix has
booted up, or when the USB device is identified when inserted.
toophpix is the name of the database that is backed up.
These work on Knoppix 3.3 and I presume with slight modifications should achieve your aims.
I would be delighted to hear about any improvements that could be made to these scripts
Regards,
Mark Preston

A. Jorge Garcia
12-13-2004, 03:04 AM
I've heard alot about LAMP lately. What do you find it useful for?

Just Curious,
AJG

CrashedAgain
12-13-2004, 04:48 AM
(somebody else has to help out here, I dunno what a usb /dev/??? is since I don't have one but I thought I should add the manual command since it is sometimes more reliable than the desktop icon action script.)

Don't know what you mean by more reliable, the scripts baiscly(sp) runs that command.

I haven't run directly from CD much but once installed to HD I have found that the action script often doesn't work. Haven't looked into this in great detail, one of the first customisations I do is set up fstab to mount the drives the way I want them & get rid of the desktop icons but I have found that the there was no action from the action script.

markpreston
12-13-2004, 09:16 PM
I've heard alot about LAMP lately. What do you find it useful for?

Just Curious,
AJG
Hi Jorge,

LAMP applications are many and varied across the web. This server (www.knoppix.net) is probably running using LAMP.

I have been experimenting with remastering Knoppix to produce a CdRom for my dental patients. By putting the MySQL database files into RAM it is possible to modify data files, and this enables addition and deletion of records from web forms whilst running Linux from the CdRom. I plan to distribute these CdRoms by leaving them on my Reception desk free for anyone who wants to take one. In addition to Knoppix they contain information about my dental practice and other dental services in South-East Essex. One of the features I hope to put in is to enable users to fill in a form with their name and address details on so that they can put this information on a floppy disk or USB stick by clicking desktop icons. If they subsequently hand such a floppy disk to my receptionist she will be able to use this to add/update these details to the details held on the computer at the reception.
This should speed up the registration process, and enable computer savvy patients to have slightly more control over their contact details, as well as having the happy side-effect of introducing some people to Linux. It also avoids the patient confidentiality issues, and expense, associated with running a server on the internet.
I have produced another similar version for dentists for sharing template files and a dental fee calculator/guide.
This can be downloaded by visiting
http://truth.positive-internet.com/~mpreston/toophpix0412.iso

or using
wget -c http://truth.positive-internet.com/~mpreston/toophpix0412.iso

from the command line.
This has the saveToUSB and restoreFromUSB functions I described previously.
It is a 717Mb file (Knoppix 3.3 plus some added pages / LAMP).

You might find the following commands useful as well to burn the cd to a 700Mb disc under Linux:
cdrecord -scanbus
cdrecord -overburn dev=0,0,0 toophpix0412.iso

the three numbers (0,0,0) are those returned from the scanbus command.


I note from your details that you are a mathematician.
If you have a DVD rewriter you might prefer to download another remastered Knoppix called LiveZope. The latest version is 3.1.
visit
ftp://math.cgu.edu.tw/pub/KNOPPIX/
The .iso you want is
LiveZope_CAS_LAM2P-3.1.iso
Since you are outside Taiwan and thus the connection gets regularly broken you would need to use the command
wget -c ftp://math.cgu.edu.tw/pub/KNOPPIX/LiveZope_CAS_LAM2P-3.1.iso
to obtain this file.
This has a number of maths related projects as well as LAMP and Zope based servers. If you email the developer
cchuang@mail.cgu.edu.tw
he may be able to include some of your maths projects in future releases.
Regards,
Mark Preston