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...

  1. Open the terminal
  2. Get the ISO you want.
  3. 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
  4. Clone this git clone https://github.com/kamilion/customizer
  5. Ubuntu created a new folder calles "customizer" cd customizer
  6. Install the Customizer make && sudo make install
  7. Run the Customizer sudo customizer -h
  8. Run the Customizer with GUI sudo customizer-gui
  9. Select the path to the iso.
  10. Customizer will now start to uncompress the iso...
  11. After it finished you have some Options:
  12. Choose Terminal to open a terminal in the live CD.
  13. Choose Sources to change the sources list of the Live CD.
  14. Choose Desktop to open the desktop from the Live CD.
  15. These are the most necessary things.
  16. 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
  17. 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 :)
  18. 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 wget http://XXX.XXX.XXX.XXX/My_Script.sh
  19. Also i added this to my script gsettings set org.gnome.settings-daemon.plugins.power idle-dim false and 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)
  20. 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)
  21. If you want to change the keyboard layout in the Live CD sudo dpkg-reconfigure keyboard-configuration
  22. When finished give the live user full rights for his own folder sudo chmod -R 777 /home
  23. Close the in Live CD terminal with exit and wait for the customizer to return.
  24. When finished then just hit "Rebuild Iso" (and make sure u have enough free space) to create you're iso image
  25. Done. :) Hope it helped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.