ubermix Forums

General => Q&A => Topic started by: bbebeka on December 20, 2012, 06:10:12 AM

Title: how to boot generic from a script run while booted on aufs
Post by: bbebeka on December 20, 2012, 06:10:12 AM
is there a way to change something while am booted as in aufs  mode so that i can  boot in generic mode at the next reboot. i wanted all my students to run a script so they can make a change to the base system partition. i don't want them knowing  about the Esc then E option as it might lead to a lot of pranks using the system restore option.  :-X
Title: Re: how to boot generic from a script run while booted on aufs
Post by: Cytochromec on December 20, 2012, 07:04:44 AM
I don't have a direct answer for you, but perhaps another way. We have the .network-autostart script setup and it pulls the updates that we have made since imaging over the summer. However, in the update.sh there is a check for a file
Code: [Select]
#!/bin/bash
if [ ! -e /etc/updated.txt ]
then
         your code
         sudo echo > /etc/updated.txt
fi

That way the script code only runs on a system once and, if a system is restored the script runs on first boot. So it is like the change is a permanent part of the read-only/generic file system.