3

I would like to modify the ubuntu 20.04 installation iso to include (vlc, audacious,mc,rar,unrar, spanish support,etc), remove (totem,rhythmbox,english support, etc) and upgrade packages. Use Cubic but change the permissions of various system directories. Leading to a security risk. For example /etc and /usr have 777 I need customize installer becouse the computers I want installer don't have network acces I need customize installer because I live in Cuba and is very difficult access online repository from anywhere also the connections are too slow for example in this PC (256kbs).

4
  • In this question only cant change the installer. I cant include some packages(mc,rar,vlc,openssh-server,empathy, etc), remove other(totem, rhythmbox, ...) and upgrade from repository the rest. – Lazaro Daniel Alvarez Basanta Nov 5 '20 at 20:14
  • 2
    Unsure why this was closed with link to ancient question which has answers that are dead links or not relevant to this situation. – LuxZg Nov 10 '20 at 17:33
  • 1
    Post an updated answer on the dupe then. Unsure why this question must be reopened for that. – muru Nov 13 '20 at 5:18
  • Muru, because @Lazaro asked how to use Cubic. The other question asks something different. – PJ Singh Dec 15 '20 at 3:54
5
  1. Install Cubic

    First, make sure you have the latest version of Cubic following the instructions at the Cubic web page.

    sudo apt-add-repository ppa:cubic-wizard/release
    sudo apt update
    sudo apt install cubic
    
  2. Launch Cubic

    Navigate to the Terminal page.

  3. Add the necessary repositories

    add-apt-repository --yes main
    add-apt-repository --yes restricted
    add-apt-repository --yes universe
    add-apt-repository --yes multiverse
    

    Remove your existing packages.

    apt autoremove --purge totem rhythmbox
    

    You should probably leave the English language packages and let them automatically be removed by the installer after installation of the OS (see step 8 below).

  4. Upgrade packages

    apt upgrade
    
  5. Add your new packages

    apt install vlc audacious mc rar unrar
    
  6. Install your language packages

    (You will find these are already installed in the Live ISO).

    apt install language-pack-es language-pack-es-base language-pack-gnome-es language-pack-gnome-es-base
    

    Cubic Terminal Page

  7. Update permissions

    I recommend being very careful when doing this. Making files inside /etc accessible to all users may cause your system to not boot, because some files must only be readable by root.

    As an example, you can change permissions for /etc/network and all files or directories in it to 777:

    cd /etc/
    chmod -R u+rw,g+rw,o+rw network
    
  8. Tell the Ubiquity installer to not remove your language packages

    Navigate to the Packages page.

    Click (anywhere) on the list, and begin typing the word "language" to search for packages that begin with this word.

    Uncheck the following four packages:

    • language-pack-es
    • language-pack-es-base
    • language-pack-gnome-es
    • language-pack-gnome-es-base

    This will ensure that the installer does not remove your language packages. This is not strictly necessary, since we will select your language and locale in the preseed below (step 9), but it is a good measure nevertheless.

    You will also notice that the English language packages are flagged (check-marked) to be automatically removed by the installer after installation of your customized OS (if English is not selected as your default language).

    enter image description here

  9. Select your default language and locale

    Navigate to the Options page, and select the Preseed tab.

    Click on /preseed/ubuntu.seed in the left pane.

    Configure your locale and language by appending the following text at the end of this file. (Note that "es" = Spanish, and "CU" = Cuba).

    # Set language, country and locale.
    d-i debian-installer/language string es
    d-i debian-installer/country string CU
    d-i debian-installer/locale string es_CU.UTF-8
    
    # Specify additional locales to be generated.
    d-i localechooser/supported-locales multiselect es_CU.UTF-8
    
    # Set keyboard layout.
    d-i keyboard-configuration/xkb-keymap select es
    
    # Set time zone and region.
    d-i time/zone string America/Havana
    d-i debian-installer/region string es_CU.UTF-8
    

    Optionally, if you want multiple locales generated, separate them with commas as show here:

    # Specify additional locales to be generated.
    d-i localechooser/supported-locales multiselect es_CU.UTF-8, fr_CH.UTF-8, en_US.UTF-8
    

    Here are some references if you are configuring different languages or locales:

    enter image description here

  10. Generate your customized ISO

    Finally, navigate to Cubic's Generate page to create your customized ISO.

    enter image description here

3
  • Is step #7 "Update permissions" in any way required? If we just skip it, will customized OS retain original permissions? – LuxZg Nov 10 '20 at 16:46
  • 2
    Step #7 is optional. This was included to answer the original question which had asked how to change certain permissions (knowing that this would be a security risk). In fact, I recommend not doing step #7. – PJ Singh Nov 10 '20 at 17:39
  • Use sudo -E apt-add-repository ppa:cubic-wizard/release with option -E if you are behind a proxy. – stackprotector Dec 10 '20 at 7:40

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.