Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: rockstarsd on February 27, 2011, 12:51:56 AM

Title: Trouble with persistence via .filetool.lst [resolved]
Post by: rockstarsd on February 27, 2011, 12:51:56 AM
Alright.  My changes for static IP are not sticking.  I have created/edited the files listed below about 5 times already, and after doing so run the following commands:

# filetool.sh -b
# sudo reboot

When the machine reboots, SSH starts and the public/private keys are maintained, as well as the password that I've set up for root - so I know that at least parts of my .filetool.lst is being obeyed and backed up properly.

The first thing i see after starting up though is that /opt/eth0.sh does not exist.  The command stays put in bootlocal.sh, and .filetool.lst keeps the reference to eth0.sh, but /opt/eth0.sh disappears.

I don't have any idea what is going on here and and thoroughly frustrated.  Any assistance would be helpful!

Also worth noting:  I tried using static.sh instead of eth0.sh thinking that the filename may have been an issue - but that gave the same results.


===== /opt/eth0.sh =====
ifconfig eth0 10.0.0.156 netmask 255.255.255.0 broadcast 10.0.0.255 up
route add default gw 10.0.0.130
echo nameserver 10.0.0.158 > /etc/resolv.conf

===== /opt/.filetool.lst =====
opt/bootlocal.sh
opt/bootsync.sh
opt/shutdown.sh
opt/tcemirror
opt/.filetool.lst
opt/.xfiletool.lst
home
usr/local/etc/ssh
etc/passwd
etc/shadow
opt/eth0.sh

===== /opt/bootlocal.sh =====
#!/bin/sh
# put other system startup commands here
sudo /usr/local/etc/init.d/openssh start
/opt/eth0.sh &
Title: Re: Trouble with persistence via .filetool.lst
Post by: rockstarsd on February 27, 2011, 01:11:18 AM
So it turns out that I had two instances of mydata.tgz

/mnt/hda1/tce/mydata.tgz
/mnt/hda1/mydata.tgz

I deleted both of those files, recreated, eth0.sh ran filetool.sh -b, and then ran sudo reboot.

running filetool.sh created /mnt/hda1/mydata.tgz

And when the system restarted /opt/bootlocal.sh and opt/.filetool.lst were maintained, but eth0.sh was not.
Title: Re: Trouble with persistence via .filetool.lst
Post by: rockstarsd on February 27, 2011, 01:22:09 AM
my boot options are as follows:

kernel /boot/bzImage quiet tce=hda1 restore=hda1
Title: Re: Trouble with persistence via .filetool.lst
Post by: gerald_clark on February 27, 2011, 10:22:59 AM
I would get rid of the restore= option.
It defaults to the tce directory.

Also, do not use sudo inside of bootlocal.sh,
as it is already running as root.
Title: Re: Trouble with persistence via .filetool.lst
Post by: rockstarsd on February 27, 2011, 11:44:24 AM
I got rid of the restore bootcode and removed sudo from the line in bootlocal.sh - but that didn't help.

I then thought that maybe my root password was getting in the way so i removed etc/passwd and etc/resolv from .filetool.list, rebooted, tried again, rebooted, and eth0.sh still was not maintained.

Then I listed mydata.tgz and discovered that eth0.sh was not being backed up, even though I was telling it to.

At that point I went into .filetool.lst, deleted the /opt/eth0.sh line, and readded it.  That seems to have worked now.
Title: Re: Trouble with persistence via .filetool.lst [resolved]
Post by: combo3 on February 27, 2011, 11:51:34 AM
Probably a typo -- capital "O" instead of zero (0) in eth0.sh  ;)
Title: Re: Trouble with persistence via .filetool.lst [resolved]
Post by: gerald_clark on February 27, 2011, 09:34:15 PM
If that were the case, filetool.sh would have shown an error.