Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: launching a script on start-up, when booting from USB< Next Oldest | Next Newest >
duch Offline





Group: Members
Posts: 7
Joined: Oct. 2004
Posted: May 25 2006,20:01 QUOTE

Hi all,

first of all i'm a complete noob with DSL so apologize for any stupid questions...

I have a spare PC which i'd liked to transform into a backup unit.
Since i want my system to be independent from my data, a live CD distro like DSL seems to be an ideal choice. And since i don't want to waste an IDE port for a CD drive, booting from a USB key seems to be an even better choice.

Now, here is what i'd like to do:  
a simple startup script that would mount the SMB shares available on my network and do a rsync on the unit hard drive. Ideally, i wouldn't like to do a remaster each time i need to add a SMB share so it would be nice if this script could be a simple file on the USB key so that i could edit it on another computer an stick it back in the unit when i want to use it.

Could you please guide me into this project?

should i use Mkmydsl?
is rsync available in dsl?
should i use another usb key to store my script (and restore it thanks to a cheatcode?) or could it be on the same key?
how can i store my IP settings on my key?

Many questions might already been answered but i couldn't find the answer.

Thanks for your help
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: May 27 2006,17:48 QUOTE

Yes for a remastered livecd, but you don't need to use mkmydsl if you are going to do a USB installation because the USB stick is read/write.  All you need to do is copy your extensions over to the USB stick and they will auto-install at boot time.

Quote
Change Log for DSL v2.4
1. 64 cloops for UCI extensions.
2. "User"-less UCI now fully supported.
3. Added Tiny C compiler, tcc
4. Added rsync
5. Added Lua cgi library, cgi.lua with sample test.html/test.lua
6. New updated Ted wordprocessor with help from Ted's author.
7. New updated ndiswrapper v1.14.
8. Improved dmix and sound features, dual channel and save settings.
9. Improved man program - now uses Netrik text browser for display.
10. Adjustment in .xinitrc to better support foreign language keyboards.
11. More cleanup for space savings to accomodate upgraded software.


Same key

Use the DSL backup/restore process.  Edit your default APPEND line in the SYSLINUX.CFG file to add "nodhcp" to the line.  Then add lines to your /opt/bootlocal.sh file to load with static IP and save the file via the backup/restore process.  See the wiki for more info
Back to top
Profile PM 
duch Offline





Group: Members
Posts: 7
Joined: Oct. 2004
Posted: May 28 2006,16:02 QUOTE

thanks for your help.

Do you mean i need to create an extension with my script, or is it only to add rsync?

If i don't need to build my script as an extension, where should i store it (bit  lost sorry)

about the backup/restore process, the wiki says it requires a cheatcode, how could i make it automatically every time the computer boots?



EDIT : OK, i got the idea about IP settings (i'm a bit slow sorry), my default APPEND line contains the default cheatcodes used by DSL at startup so adding nodhcp and sda1 as a restore path will do the trick ;)

with this i'll also be able to start as runlevel 2 only (but will my extension be loaded?) and run my script thanks to the bootlocal.sh script
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: May 30 2006,00:27 QUOTE

You can do it a number of ways:

1) Create a small extension with your script inside.  If you place your script file in /home/dsl or in /opt you can make a simple extensionname.tar.gz type extension.

2) Save the script directly inside the root directory of your read/write boot device (IE: where the SYSLINUX.CFG file is located).  After booting, you can find it at /cdrom/scriptname
Keep in mind that the USB drive's native file system is MSDOS FAT, so you may need to copy and/or "chmod" the script in order to make it an executable program again.

3) Save it inside your backup/restore system.  If you store it in /home/dsl, it will automatically be backed up by default.  You can also store it in other locations if you include the file's path inside your /home/dsl/.filetool.lst   This is a text file that contains a list of files and directories that get backed up.  To see "hidden" files in linux (filenames that begin with a "."), press the "H" button at the top of the emelfm (filemanager) window pane.

4) Do a true KNOPPIX-Style remaster.  Relatively painful and complicated, but still do-able.

You can start as runlevel 2 by adding " 2 " to your append line.  The MyDSL extensions and the backup/restore will still function.
Back to top
Profile PM 
3 replies since May 25 2006,20:01 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: launching a script on start-up

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code