Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug script doesn't appear to use swap file if already existing, and other errors #4

Open
JesseCake opened this issue Nov 6, 2020 · 0 comments

Comments

@JesseCake
Copy link

JesseCake commented Nov 6, 2020

Hi again,

I've done some digging and found that in your debug script, it didn't seem to make use of the swap file previously created on previous boots, so would therefore appear to hang the network and have other problems (probably because of out of memory problems).

In your "debugchumby" file in the root folder I modified:

if [ -f /mnt/usb/swapfile.on ]; then
	if ! [ -f /mnt/usb/.swap ]; then
		#rm -f /mnt/usb/swapfile.on
		/mnt/usb/TalkingChumby/say.sh "Building the 512 MegaByte swapfile"
		dd if=/dev/zero of=/mnt/usb/.swap bs=1 count=0 seek=512M
		/mnt/usb/TalkingChumby/say.sh "Making the swapfile"
		mkswap /mnt/usb/.swap
		/mnt/usb/TalkingChumby/say.sh "Swapfile built O K"
	fi
else
	sync
fi

to be:

if [ -f /mnt/usb/swapfile.on ]; then
	if ! [ -f /mnt/usb/.swap ]; then
		#rm -f /mnt/usb/swapfile.on
		/mnt/usb/TalkingChumby/say.sh "Building the 512 MegaByte swapfile"
		dd if=/dev/zero of=/mnt/usb/.swap bs=1 count=0 seek=512M
		/mnt/usb/TalkingChumby/say.sh "Making the swapfile"
		mkswap /mnt/usb/.swap
		/mnt/usb/TalkingChumby/say.sh "Swapfile built O K"
	else
		/mnt/usb/TalkingChumby/say.sh "Mounting swap file"
		mkswap /mnt/usb/.swap
	fi
else
	sync
fi

Also I noted that the script would complain about not being able to write to the filesystem, because of a test to write a file to the "tmp" folder near the start. The problem is that this folder doesn't exist in this project, so it fails.

The solution is to add an empty "tmp" folder to this project.

My Chumby Classic now boots successfully from this and functions.

I have noted however that the DLNA server (one of the main functions I'd like to use) takes an hour to start. Why is that? Is there some way we can manually kick it to start in startup scripts? I couldn't seem to find where it might be started elsewhere, assuming cron?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant