how can I automate my usb drive to be read/write
Hello,
I am using Knoppix 3.8 live CD. As soon as it loads, it sees my USB external drive, I mount it and configure it to be read/write and when I do any downloading, I direct it to be saved in my USB drive. Is there a simple way to make it do it automatically as soon as it boots up ? I tried Knoppix 5.0 and it wouldn't let me mount and make my USB drive read and write. Is there a way to do in in 5.0 ? I also plugged in my USB antenna and neither Knoppix 3.8 or 5.0 sees my antenna. Thanks.. Arthur |
Yes, you could write a script and put that in the /etc/rc directories. Writing a script isn't that difficult, basically you're telling the kernel to execute the same commands as you would do from the commandline. Basic syntax:
Code:
#!/bin/bash Code:
S<2 digit bootcode>scriptname |
Some versions of Knoppix that I've used mount removable drives read-only by default. Right-clicking on the drive icon and choosing "Remount read-write" (or something) should help.
To make this the default behavior you probably need a persistent home directory where you can save your boot-time settings. |
Dutchmaster :
Excuse my ignorance but could you explain in simple english what each line means ? #!/bin/bash <command_1><options> <command_2><options> .... exit 0 What does each line tell the kernel. Please bear in mind that I am using a live cd so I would like to just go to terminal mode if possible and run a script giving it instructions if possible. Please explain to me in laymans terms what this line means S<2 digit bootcode>scriptname and where does one put this line in the script. Thanks a lot. Arthur Basileus : In 3.8 ver of Knoppix I can change the read to write and did it by mounting and doing actions, but Knoppix 5.0 didn't let me dp that yet. Will try over the weekend again. Thanks. Arthur |
Ok, I kinda overlooked that you're on a Live CD and not familiar with the commandline. That isn't a problem as Basileus already explained the way to do it from your desktop.
You asked what the various lines in my syntax example mean. But, as you're new to this, I'm a bit worried that it might be to much in one go. Code:
#!/bin/bash The second and third line are basicaly equal. This is an abstract way to tell the reader that (s)he needs to replace that line with the command that needs to be executed, followed by the command's options. The fourth line is the (my) way to tell the reader to continue with the previous lines as necesary. The last line tells the kernel that it reached the end of the script and that if it could be executed normaly it should exit with an error status of 0 (as in zero) That is standard behaviour and IMHO a good programmer should always end a script nicely (for the kernel, not me ;)) Next, you where a bit confused about Code:
S<2 digit bootcode>scriptname As I've said, I'm afraid that this might be a bit to much to comprehend in one go for a newbee. So if you don't understand it's not a problem. I too needed time to understand this. Use it as a brief introduction to writing scripts and read it again when you've got to grips with Linux and it's versatility. |
All times are GMT -5. The time now is 08:16 AM. |