PDA

View Full Version : C-language and Java development



citpeks
07-28-2004, 01:53 AM
I have been developing some C-language and Java programs in Windows and Unix. I want to try to do some of that development under Linux (KNOPPIX) running on a Windows XP system (HP Pavilion).

I set up a partition for my configuration and files on a USB hard drive, but I am having trouble storing files there. On Unix I can make a directory, create a file with an editor and save it, and then compile it. With KNOPPIX, I get messages that the file cannot be stored on my read-only drive, even when I have allocated a 50M partition.

Is there a step-by-step guide for creating a file and compiling it? I know how to use all the commands (mkdir, cc, etc.) from a command prompt, but I am stumbling with some elementary setup barriers.

Any help will be appreciated.

citpeks

user unknown
07-28-2004, 04:53 AM
/etc/fstab (FileSystem Table) contains information who may mount a drive, and which permissions to use.

assuming your drive is /dev/sda1 and mounted to /mnt/usb, then there is an entry
/dev/sda1 /mnt/usb vfat defaults 0 0
instead vfat, there might be 'auto'.
Instead defaults, there might be this or that.
make that entry: noauto,users,exec (no blank after comma) which means:
don't mount automatically at boot,
allow users to mount
allow execution of files from that drive.

missing filepermissions (rwx) on vfat-drives are often disturbing - - -
defaults setting only allow root to mount the drive who becomes owner of that files.

But you say you made a partition: reiserfs? ext2? ext3 or other linux-partition?

By the way - this is a 'general' question.
This section is more for entertainment or the forum as such, I think.

Did I mention 'man fstab' and 'man mount'?
Did you format it (mkfs.reiserfs, mkfs....)?
Perhaps your /etc/fstab contains in the option-section a 'ro' - read-only.
Delete it! Away away!

May root mount it?
It might be /dev/sda2 if it's not the first partition.

drag
07-28-2004, 02:10 PM
Knoppix handles harddrives as read-only by default. You can allow writing on a drive explicitly by right-clicking on it, and then finding the readonly checkbox somewhere in the context menu. (Unfortunately I don't remember where, maybe options or settings)

A. Jorge Garcia
07-29-2004, 05:14 PM
Sounds to me like you want to install KNOPPIX to the hdd. I'm not clear on your configuration. I'm assuming its one of these 3:

(1) You are booting from a liveCD and trying to save your work to a hdd partition.

(2) You copied the /KNOPPIX/KNOPPIX file from the CD to a hdd partition and booted from there (aka "poorman's dual boot").

(3) You actually installed to an hdd partition, created a user, booted from there and logged-in.

In the case of (1), your hdd partitions should show-up as an icon on your KNOPPIX desktop. Simply clicking on it gives you a KONQUEROR dir listing of that partition. However, that partition is ro by default. You can right-click that icon and change from ro to rw to save your files.

In the case of (2), you're working with an ro file system just as if you were running from the CD. You cannot save there. The only thing I can think of in this case is to save to a floppy or another hdd partition.

Case (3) is how I set-up my PCs and have no trouble editting, saving, printing, compiling or executing my C++ and Java code.

Good Luck!

HTH,
AJG