3

we often deal with some machines with ubuntu live cd.

Most of the times there's lot of repetitive tasks we have to do in order to have our ubuntu live cd gets ready.

I would like to know how create a ubuntu 18.04 live cd with the following features:

  • first of all start with the most updated 18.04 packages so that there are smaller updates once the system starts (I would like to avoid use the first 18.04 build iso from April 2018..)

then

  • 1) start as toram, like when you go in f6, additional commands and write "toram" at start so that all system goes in ram and you can remove the cd after the loading.

  • 2) set the keymap to sweden

  • 3) disable both WIFI and BlueTooth, basically what appens when you turn the Airplane mode ON

  • 4) enable the universe and multiverse repository (my guess is there's something that could be added via sed to /etc/apt/sources.list )

  • 5) do an apt-get update then apt-get upgrade assuming yes to all file replacements (avoiding rebooting the machines because makes no sense)

  • 6) do an apt-get -y install screen unzip unrar rsync lm-sensors htop sysstat iftop ncdu fuse sshfs curlftpfs netcat-openbsd cifs-utils nfs-common portmap ntfs-3g samba exfat-fuse exfat-utils hfsplus hfsutils hfsprogs ncdu iotop dstat nmap because often i like to have this packets mounted for operate

  • 7) remove all the icons from the launchbar (eg. the music player, the sound one..) adding instead only firefox, gedit and terminal

  • 8) set the gedit size to 18

  • 9) disable the previews of files inside nautilus

I would like to have all of this already done so that when all loading is finished and I have to operate to my machine I can focus directly on other operations!

2 Answers2

5

You can achieve this with CUBIC https://launchpad.net/cubic

Note:
Tested the created Custom ISO with live USB with UEFI Boot Mode
Custom ISO Created with Ubuntu 18.04 with CUBIC and the ISO Ubuntu 18.04.3

Please see the Short Videos first before proceeding:

  1. customized Grub color: https://i.sstatic.net/Ba5Z7.jpg

  2. gnome-terminal execution: Exec=gnome-terminal -- /usr/bin/myscript.sh https://i.sstatic.net/xm8JP.jpg

  3. script running, language, fav-apps: https://i.sstatic.net/BZTby.jpg


from the 9 Points you mentioned..

the order of Points varies like this..

  1. for point

    (4) enable the universe and multiverse repository (my guess is there's something that could be added via sed to /etc/apt/sources.list )

in chroot environment of CUBIC run the below command

add-apt-repository multiverse
  1. for points

    (2) set the keymap to sweden

    (7) remove all the icons from the launchbar (eg. the music player, the sound one..) adding instead only firefox, gedit and terminal

    (8) set the gedit size to 18

    (9) disable the previews of files inside nautilus

paste the below content in a text file out side CUBIC, named 20_my-settings.gschema.override

# Custom Settings for keyboard-layout fav-apps, gedit & nautilus #

[org.gnome.desktop.input-sources]
sources = [('xkb', 'se'), ('xkb', 'us')]

[org.gnome.shell]
favorite-apps = [ 'firefox.desktop', 'gedit.desktop', 'gnome-terminal.desktop' ]

[org.gnome.gedit.preferences.editor]
use-default-font = false
editor-font = 'Monospace 18'

[org.gnome.nautilus.preferences]
show-image-thumbnails = 'never'

in chroot environment of CUBIC, run

cd /usr/share/glib-2.0/schemas/ 

then drag and drop the 20_my-settings.gschema.override file & click on COPY (green-highlighted)

to compile these new custom settings, run

glib-compile-schemas .
  1. for Points

    (3) disable both WIFI and BlueTooth, basically what appens when you turn the Airplane mode ON

    (5) do an apt-get update then apt-get upgrade assuming yes to all file replacements (avoiding rebooting the machines because makes no sense)

    (6) do an apt-get -y install screen unzip unrar rsync lm-sensors htop sysstat iftop ncdu fuse sshfs curlftpfs netcat-openbsd cifs-utils nfs-common portmap ntfs-3g samba exfat-fuse exfat-utils hfsplus hfsutils hfsprogs ncdu iotop dstat nmap because often i like to have this packets mounted for operate

paste the below content in a text file out side CUBIC, named myscript.sh

#!/bin/bash

sudo rfkill block wifi bluetooth
sudo apt update && sudo apt upgrade
sudo apt -y install screen unzip unrar rsync lm-sensors htop sysstat iftop ncdu fuse sshfs curlftpfs netcat-openbsd cifs-utils nfs-common portmap ntfs-3g samba exfat-fuse exfat-utils hfsplus hfsutils hfsprogs ncdu iotop dstat nmap

in chroot environment of CUBIC, run

cd /usr/bin/

then drag and drop the myscript.sh file & click on COPY (green-highlighted)

chmod 777 myscript.sh
  1. paste the below content in a text file out side of CUBIC named autostart.desktop

Content:

[Desktop Entry]
Type=Application
Exec=gnome-terminal -- /usr/bin/myscript.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=run-myscript
X-GNOME-Autostart-Delay=20
Comment=Run's My Custom Script after 20seconds of Login
Name[en_IN]=autostart.desktop

run

cd /etc/xdg/autostart/

then drag and drop the autostart.desktop file & click on COPY (green-highlighted)

run

chmod 777 autostart.desktop
  1. for point

    (1) start as toram, like when you go in f6, additional commands and write "toram" at start so that all system goes in ram and you can remove the cd after the loading.

Proceed with Next (green Highlighted) in CUBIC and at "Generate" screen edit the kernel parameter to add the option toram

  1. Click on Generate --> Finish --> Close in CUBIC.. and your Custom ISO is ready..

Some Screenshots while doing this work

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

3

Creating a custom iso file to use as a live CD/DVD disk

It is rather complicated to create a custom iso file to use in a CD/DVD drive.

You can find many links via the internet, but unfortunately several of them are obsolete.


Creating USB drives is easier but will not create read-only systems

You can do most if not all these tasks with a

It is also possible to create a

sudodus
  • 47,684