Running restore automatically


Forum: HD Install
Topic: Running restore automatically
started by: chrisb

Posted by chrisb on July 06 2004,19:48
Hello All

Just found DSL - what a brilliant tool this is! I'd like to use it in a no-mouse/kbd/monitor system with 128Mb flash card in an ide emulator that boots and will make "I'm alive" response to pings on several interfaces while the system goes through severe vibration. There is  no CD or floppy or hdd or USB stick possible (would get shaken to bits!)

I've used frugal-instal to install to the flash disk and it boots fine off hda1, spent happy hours just playing with it

Question is, after/during boot I need to change some configs like turn dhcp off and give the interfaces static addresses. In a normal hdd system I can do this by adding a script to the rcX.d. In DSL I guess I could make a little hda2 partition on the flash disk and use the Backup to put the script in that disk, and restore it on startup. So I practised with a floppy temporarily attached, did a backup with a test file in /root and  its name in a filetools.lst

What I can't seem to find is how to do an automatic "restore" operation at startup as the system just boots hda1 normally and ignores the floppy so the test file doesn't get restored

Any help greatly appreciated

Chris

Posted by chrisb on July 06 2004,20:05
... a postscript

Had a brainwave - perhaps I should put "restore=/dev/fd0" in the lilo.conf on hda1

but I can't mount hda1 - says "already mounted or mount point busy"

seems that /mnt/auto/cdrom is actually hda1, but it's mounted read-only so I can't edit lilo.conf. If I umount, I have to force it as the device is busy (don't know why), then I can't mount it again as the filesystem is flagged as read-only!

So a step forward (perhaps) but another query..

Chris

Posted by roberts on July 06 2004,20:43
Newer versions of frugal have many options when installing.
During frugal you can:
1.  specify nodhcp you can also specify runlevel 2
2.  specify a partition to automatically restore from
3.  specify the myDSL partition.

Also you can use /opt/bootlocal.sh to put in your static ip info you will need ifconfig, route, and optionally nameserver

Posted by henk on July 07 2004,07:28
i had trouble with 2 and 3 when a tried to put all on one linux partition


i copied the KNOPPIX directory to a linux partition (hda7) and boot with grub. i wanted to backup and restore to the same partition but when i do a backup it says: /dev/hda7 already mounted or /mnt/hda7 busy. i think it is because /cdrom aka /mnt/hda7 is mounted read-only. besides that: during dsl-config the backup.tar.gz is read as if it where an extention.
i use the folowing work-arround:

in /opt/bootlocal.sh:
Code Sample

#!/bin/bash
# put other system startup command here

echo "/cdrom" >/opt/.backup_device
mount /cdrom -o remount,rw

gzip -dc /cdrom/backup.targz | tar -xvf - -C /

lpc reread


then i make a /cdrom/bootlocal.dsl

and in powerdown.sh:

Code Sample
#!/bin/sh
# Put system command to perform upon system shutdown
# For example uncomment out the following line to automate system backups
filetool.sh backup noprompt noprompt
rm -f /cdrom/backup.targz
mv /cdrom/backup.tar.gz /cdrom/backup.targz


this way i can have the dsl-core (/KNOPPIX/KNOPPIX.img) and all my-dsl extentions and backup files on 1 linux partition

henk

Posted by chrisb on July 07 2004,19:54
Thanks everyone for your responses, it is nice to find such a helpful forum.

RobertS: I will go and look at the source of frugal-instal for the options you describe

Henk: Although my situation is different to yours (I am only ever booting from the compressed version of dsl on the flash disk aka cdrom so no edits on the running system will ever survive a reboot) I will try the remount parameter for my hda1, perhaps this will get round my access problem so I can edit the lilo.conf  to add the restore= to the APPEND

I will post detail of how I get on (it will be a day or two)


Regards

Chris

Posted by alisonb on July 09 2004,11:08
I am working with chrisb on this post.  Thanks for the help so far.  roberts: I put nodhcp in the list of deamons to use in Frugal Install. On boot up there was no dhcp.

Also during Frugal Install I selected no restore partition so that I could select Xvesa and Enhanced desktop. As I will in the end be using no keyboard and mouse, this was the way I found to get DSL to boot and get straight into the desktop. I still need to use the back up partition.

What does the myDSL partition do and can I have it the same as a restore partition?

Now that I have got the nodhcp working I will now go and work on the restore part.

Thanks

Alison

Posted by roberts on July 09 2004,16:03
The myDSL and restore partition can be the same partition. myDSL partition is for the extensions, abiword, firefox, etc.

Usually, one uses the backup partition to save system settings, which normally includes the xserver type and enhanced or not. So, select restore partition and setup system by chosing the x server. Then edit .xinitrc to start enhance. Then backup. Later then without the keyboard you will have the desired result.

If all these machines/devices are the same, you could make a myXsetup.tar.gz and use the myDSL system and that will automaticlly load at boot up.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.