Im trying to run a sh script from the computer, if I boot Ubuntu live it works. My question is can I make my own live image that boots and just start the image and shuts down after finishing it?
So okay i found a way do it exactly how i want to...
- Open the terminal
- Get the ISO you want.
- Install necessary packages
sudo apt-get install git build-essential fakeroot make binutils g++ python python-dev python-qt4 pyqt4-dev-tools squashfs-tools xorriso x11-xserver-utils xserver-xephyr qemu-kvm dpkg-dev debhelper qt4-dev-tools qt4-linguist-tools --no-install-recommends
- Clone this
git clone https://github.com/kamilion/customizer
- Ubuntu created a new folder calles "customizer"
- Install the Customizer
make && sudo make install
- Run the Customizer
sudo customizer -h
- Run the Customizer with GUI
- Select the path to the iso.
- Customizer will now start to uncompress the iso...
- After it finished you have some Options:
- Choose Terminal to open a terminal in the live CD.
- Choose Sources to change the sources list of the Live CD.
- Choose Desktop to open the desktop from the Live CD.
- These are the most necessary things.
- In the terminal i would upgrade all packages and update all lists
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
- Also i would recommend deleting unnecessary packages e.g.
sudo apt-get remove libreoffice* thunder* firefo* software-center onboard printer* xdiagnose* remmina* qt4*this frees up to 900MB at my Live CD :)
- After that you can put the SH file you created at the Desktop or where ever you want to. I have uploaded the script to a server and downloaded it
- Also i added this to my script
gsettings set org.gnome.settings-daemon.plugins.power idle-dim falseand this
gsettings set org.gnome.desktop.session idle-delay 0(i searched long to find this it prevents the Desktop from turning black after 5 minutes)
- Don't forget to give the Live CD user the rights to use and execute you're file
sudo chmod +x *.sh(for all scripts in this directory)
- If you want to change the keyboard layout in the Live CD
sudo dpkg-reconfigure keyboard-configuration
- When finished give the live user full rights for his own folder
sudo chmod -R 777 /home
- Close the in Live CD terminal with
exitand wait for the customizer to return.
- When finished then just hit "Rebuild Iso" (and make sure u have enough free space) to create you're iso image
- Done. :) Hope it helped.