Author Topic: How To: Building the VSIDO Installer  (Read 1300 times)

VastOne

  •      v-ger
  • Posts: 3784
    • View Profile
    • VSIDO Community
How To: Building the VSIDO Installer
« on: February 03, 2016, 08:50:03 PM »
For several years I have looked at different Linux installers and what could be done in the debian installer space.  I have always come away disappointed that what was/is out there was seldom documented or shared in a way that could be used anywhere else

Two weeks ago misko_2083 introduced us to Trios Linux.  For the first time I got to see an installer I was interested in (semplice linstaller) used in a practical debian setup I was familiar with

Since then there has been non stop development and collaboration with Filip Danilović and Miloš Pavlović that started here and was discussed more here.  The end result is VSIDO now has a new installer that will continue to grow

For complete transparency these are the steps I use to convert the TRIOS installer to the VSIDO installer.  This is for anyone in the future looking for these steps, who may find it easier than the Semplice team did, Filip and Miloš and the Trios team did, or certainly I did when we began looking at different installers

Here is the How To build and install the Semplice/Trios/VSIDO linstaller for debian:



Build the Installer

First some requirements and dependencies to build

Code: [Select]
sudo apt-get update && sudo apt-get dist-upgrade
Code: [Select]
sudo apt-get install python-all screen python-notify2 python-progressbar python-parted imvirt cryptsetup fatresize hfsprogs pastebinit reiser4progs jfsutils debhelper dh-python dpkg-dev devscripts git
Keeptalking build

Code: [Select]
git clone https://gitlab.com/trios-linux/keeptalking.git && cd keeptalking

dpkg-buildpackage -uc -us

Bricks build

Code: [Select]
git clone https://gitlab.com/trios-linux/bricks.git && cd bricks

dpkg-buildpackage -uc -us

Installer build

For a Standard Build:

Code: [Select]
git clone https://gitlab.com/trios-linux/trios-installer.git && cd trios-installer

dpkg-buildpackage -uc -us

For Testing Build: (Can only be Standard or Testing, NOT both)

Code: [Select]
git clone https://gitlab.com/trios-linux/trios-installer.git && cd trios-installer && git checkout testing

dpkg-buildpackage -uc -us



Install the VSIDO Installer

First some requirements or dependencies:

Code: [Select]
sudo apt-get update && sudo apt-get dist-upgrade

sudo apt-get install python-all screen python-notify2 python-progressbar python-parted imvirt cryptsetup fatresize hfsprogs pastebinit reiserfsprogs jfsutils xfsprogs btrfs-tools

Now install the debs In This Order

cd to each directory these are in (Put them all in one single directory) ... the tab to complete fills out the remaining portion of the file name.. saves time and gets it correct for whatever version is there (version numbers will change)

Code: [Select]
sudo dpkg -i python-t9n (tab to complete)
sudo dpkg -i python-keeptalking (tab to complete)
sudo dpkg -i python-libbricks (tab to complete)
sudo dpkg -i keeptalking (tab to complete)
sudo dpkg -i bricks (tab to complete)
sudo dpkg -i linstaller-modules-base (tab to complete)
sudo dpkg -i linstaller-frontend-cli (tab to complete)
sudo dpkg -i linstaller-frontend-glade (tab to complete)
sudo dpkg -i linstaller_ (tab to complete)
sudo dpkg -i linstaller-config-trios (tab to complete)
sudo dpkg -i linstaller-session (tab to complete)
sudo dpkg -i live-config-linstaller (tab to complete)

After Installation

Now edit these files:

Code: [Select]
sudo medit /usr/share/linstaller/linstaller/modules/network/inst/_init_.py
and make this

Code: [Select]
auto lo
iface lo inet loopback
""")

this

Code: [Select]
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
""")

Edit these files to take care of eufi refind that is not a part of VSIDO (yet)

Code: [Select]
sudo medit /usr/share/linstaller/linstaller/modules/bootloader/inst/_init_.py
Find and comment out these lines:

Code: [Select]
def refind_install(self):
""" Install REFIND """

if "uefidetect.inst" in self.moduleclass.modules_settings and self.moduleclass.modules_settings["uefidetect.inst"]["uefi"] == True:
verbose("Installing refind...")
m.sexec("/refind-inst.sh")
else:
pass
         
and comment this line in same file:

Code: [Select]
self._refind_inst = {"grub":self.install.refind_install}         
and finally

Code: [Select]
sudo medit /usr/share/linstaller/linstaller/modules/bootloader/inst/glade/_init_.py
Find and comment out these lines (53,54 and 55)

Code: [Select]
                          #Pass 5: Install Refind
        self.parent.progress_set_text(_("Installing REFIND..."))
self.parent.moduleclass._refind_inst[bootloader]()
self.parent.progress_set_percentage(5)

Next create or convert these in /etc/linstaller directory (these must replace the trios files that are in /etc/linstaller directory)

Code: [Select]
sudo medit /etc/linstaller/vsido
Code: [Select]
## MAIN LINSTALLER CONFIGURATION FILE FOR VSIDO

[linstaller:extends]
source = vsido-base

# Do not ask for language, use the system's one instead.
#[module:language]
#ask = False

# Do not ask for timezone, use the system's one instead.
#[module:timezone]
#ask = False

# Disable root
#[module:userhost]
#root = None

Code: [Select]
sudo medit /etc/linstaller/vsido-base
Code: [Select]
## BASE LINSTALLER CONFIGURATION FILE FOR VSIDO -- END USER WILL NOT (HOPEFULLY) NEED THIS

[linstaller]
distribution = VSIDO
modules = uefidetect.inst welcome.front language.front timezone.front userhost.front partdisks.front bootloader.front summary.front partdisks.inst unsquash.inst virtualpartitions.inst language.inst timezone.inst network.inst supportrepo.inst bootloader.inst userhost.inst debian.inst clean.inst fstab.inst finish.inst end.front
special = partdisks.inst unsquash.inst virtualpartitions.inst

[module:language]
ask = True

[module:timezone]
ask = True
timezone = Etc/GMT

[module:partdisks]
swap_noformat = True

[module:unsquash]
image = /lib/live/mount/medium/live/filesystem.squashfs

[module:debian]
remove = /etc/linstaller/trios.packages-remove
autoremove = True

[module:bootloader]
bootloader = grub
custom_kernel_args = net.ifnames=0
should_hide_menu = False

[module:supportrepo]
path = file:///lib/live/mount/medium/support
binarydir = ./


Code: [Select]
sudo ln -s /etc/linstaller/vsido /etc/linstaller/default
(You may have to delete the original /etc/linstaller/default to complete that command)

Profit!

Thank you to the Semplice team who created the original.  I also am grateful to the Trios development team for the sharing of their wisdom with the best FOSS intentions I have seen in a long time. Specifically I want to thank Filip Danilović and Miloš Pavlović,  people I am honored to consider friends
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Snap

  • Posts: 462
    • View Profile
Re: How To: Building the VSIDO Installer
« Reply #1 on: February 04, 2016, 07:14:54 AM »
Thanks for this. I don't know if I will ever need to build the installer, but that's precious info and a very good reading.

misko_2083

  • Posts: 61
    • View Profile
Re: How To: Building the VSIDO Installer
« Reply #2 on: February 04, 2016, 05:27:34 PM »
@VastOne I'm glad you are sharing this with everyone. That's what FOSS is all about.
Just noticed dependancies.
Filip has made changes with dependancies. One is a switch from reiser4progs to reiserfsprogs.
Reiser4 and reiserfs are not the same fs. The switch from reiser4 to reiserfs happened because reiser4 kernel module is not mainlined yet, and therefore doesn't exist in the Debian kernel.
One can actually create/format a reiser4 partition, but can't use it without manually compiling the kernel module first.
Filip also added xfsprogs, jfsutils and btrfs-tools. Changes are here
https://gitlab.com/trios-linux/trios-installer/commit/5848e9069a4c90cff5d9ecbc2b201d6904498da0

VastOne

  •      v-ger
  • Posts: 3784
    • View Profile
    • VSIDO Community
Re: How To: Building the VSIDO Installer
« Reply #3 on: February 04, 2016, 05:35:18 PM »
@Misko... correct, this will be an evolving How To as it progresses

Thanks for those updates, I will correct them on the How To though I did already have all the required dependencies since I did build from Testing and had to have them
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

filip

  • Posts: 24
    • View Profile
    • GitLab
Re: How To: Building the VSIDO Installer
« Reply #4 on: February 04, 2016, 10:49:08 PM »
@Misko pretty much said it all. :)
Thanks for sharing and for the effort!

Few notes along the way:

@VSUDO config:

To avoid having to change it on every rebuild, you can do it once, build the packages and then tuck away somewhere the "linstaller-config-trios" ( you can change the "trios" to "vsido" in debian/control ).
You can then re-use it, since it doesn't have a versioned dependencies, so should work with any new version of the installer. :)

@UEFI:

You can also delete all those lines, instead of commenting them ( which is a pain whenever there's more than 2-3 of them, for me atleast :D ).

@pkg installation:

A (much) easier way would be to put them all in a script:
Code: [Select]
echo '#!/bin/bash
sudo dpkg -i python-t9n
sudo dpkg -i python-keeptalking
sudo dpkg -i python-libbricks
sudo dpkg -i keeptalking
sudo dpkg -i bricks
sudo dpkg -i linstaller-modules-base
sudo dpkg -i linstaller-frontend-cli
sudo dpkg -i linstaller-frontend-glade
sudo dpkg -i linstaller
sudo dpkg -i linstaller-config-trios
sudo dpkg -i linstaller-session
sudo dpkg -i live-config-linstaller' >> /tmp/install-installer && chmod +x /tmp/install-installer && /tmp/install-installer
^ copy/paste all at once. :)

Cheers!