Bas's Installation and Configuration scripts

Share here your personal tips or creations: desktop, conky, docks, widgets or tweaks are welcomed here!
User avatar
bas_otten
Posts: 185
Joined: 19 Oct 2013 12:22
Location: Netherlands

Bas's Installation and Configuration scripts

Postby bas_otten » 24 Jun 2015 17:51

When belze asked me to share the scripts that I created to customize my SolydK64 installation from ISO-baseline, I hesitated a bit. Not because I wouldn't want to share them with you all (how off-Linux would that be :) ), but because of the challenge to provide enough explanation and environmental context for you to understand what is going on, while at the same time keep the story to the point, readable, and interesting enough.

Well, I will try... If anything is totally unclear, please let me know.

There are 3 users involved:
  • bas (me)
  • ciska (my wife)
  • otten (my parents, sharing one account)
There are 5 computers involved:
  • bashost (new laptop; primary user bas, secondary user ciska)
  • bashostx (old desktop; primary user bas; dual boot with XP)
  • ciskahost (new laptop; primary user ciska, secondary user bas)
  • ottenhost (new laptop; primary user otten, secondary user bas)
  • ottenhostx (old desktop; primary user otten, secondary user bas; dual boot with XP)

All three laptops are identical (Lenovo T420) and partitioned like this:

GpartedViewLinuxLaptops.png


Equally, both desktops are identical (Asus) and are partitioned like this:

GpartedViewWinLinDesktops.png


Globally, there were two major goals I was hoping to achieve:
  • create a single Image on my laptop that can be rolled out onto all 5 computers that should boot correctly and need only minimal post-configuration per host
  • configure only a single user that can be cloned to all 3 users (residing inside the Image) that should login correctly and need only minimal post-configuration per user
I can tell this was quite a challenge for the relative newbie Linux user I was one year ago, but I got it to work! The idea is to minimize the amount of repetitive work, no matter how much one-time effort this takes, more or less :) Side-challenge was to get familiar with Linux by taking this approach, and to - in the end - really spend less time on maintaining all family computers than formerly on Windows. Another side-effect is that I can relatively easily scale up to more users and more computers.

As for the second item of the cloning of users, I created a seperate Tutorial topic some time ago. It is highly recommended to read this alongside this topic, because it represents an important piece of the puzzle.

A little more in detail than the two main goals, there was quite a list of functional and technical requirements from all users; an incomplete list is:
  • offered functionality should be >=99% of what we were used to, hence the 'installist' that will show up later
  • boot time and performance should be top (at least on the new Lenovo T420 laptops, with 240GB SSD and 8GB memory)
  • data partitions, being on different sda#'s and having different filesystemtypes should mount automatically (/zData)
  • user ciska should be able to (un)mount our power-scheduled NAS drive, and do basic prolemsolving in this area (/zNasa)
  • thunderbird mail profiles should reside locally outside the Image, and be switchable between /zData <> /zNasa
  • 4 out of 5 computers should have fixed but different IP-addresses automatically (when wired) and a fixed eth#
  • all applications and functions selectable from the menu should work fine (hibernate disabled)
  • all file-extensions should be connected to the application most appropriate (took me literally days)
  • it should be possible to give remote support, so I can help my mother on a distance when she is in trouble
  • a couple of typical Windows games should run, my father likes to play 'Klaverjassen': PlayOnLinux/wine
  • dual-boot computers should not have time-conflicts and all computers should pick-up DST without manual intervention
  • users should be able to log in without password, but easily disable/reenable the automatic login (sudo)
  • users should be able to reconnect the troublesome wireless connection here with a single click
  • printers and scanners and other peripheral devices at both locations should (be properly set up to) work
  • performance and wear-minimization for the SSD's in the laptop should not have negative effect on the desktop HDD's
  • closing the laptop lid should not bring the thing to sleep, with external monitor that really makes me totally freak out :)
  • data partitions will need to be cross-computer accessible through samba, when in local network
  • functionality should include simple apache-php-mysql setup for Joomla website development
  • of course, we need to be able to chat on the local LAN, that's where iptux comes in

After this - probably too long already - story, let's take a look at the scripts...

    0. I start off with a clean ISO installation on bashost like this:

    InstallatieConfiguratie.png

(continued in next post, because of limit on number of attachments...)

User avatar
bas_otten
Posts: 185
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: Bas's Installation and Configuration scripts

Postby bas_otten » 24 Jun 2015 17:59

    1. the systeminstallscript.sh (actually post-install, renamed to txt as for attachment), takes care of all apt related actions:
    systeminstallscript.txt
    (1.8 KiB) Downloaded 46 times


    2. the systemconfigscript.sh (renamed to txt as for attachment), takes care of all configuration, including cloning of users from a prepared referentie.tar:
    systemconfigscript.txt
    (7.85 KiB) Downloaded 44 times


    3. as you can see the systemconfigscript.sh copies a lot of stuff from a resources directory, most of which I tarred here (partially, for security and size reasons), untar with tar -xzf:
    resources.tar
    (185.07 KiB) Downloaded 31 times

(continued in next post, because of limit on number of attachments...)

User avatar
bas_otten
Posts: 185
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: Bas's Installation and Configuration scripts

Postby bas_otten » 24 Jun 2015 18:04

    4. after the Images are rolled out, each host has its own small post-configuration script to be run (selection shown, renamed to txt as for attachment), then reboot:

    bashost.txt
    (881 Bytes) Downloaded 39 times
    bashostx.txt
    (882 Bytes) Downloaded 33 times
    ottenhost.txt
    (787 Bytes) Downloaded 36 times

(continued in next post, because of limit on number of attachments...)

User avatar
bas_otten
Posts: 185
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: Bas's Installation and Configuration scripts

Postby bas_otten » 24 Jun 2015 18:08

    5. for reference, my current referentiescript.sh (renamed to txt as for attachment), as an aid for cloning users (not to be run from top to bottom, more like copy/paste source, never mind the Dutch)
    referentiescript.txt
    (4.13 KiB) Downloaded 42 times


    6. for reference, my mailscript.sh (also a copy/paste source, renamed to txt as for attachment), to give an impression how I keep Thunderbird profiles safely outside the Image and move them around
    mailscript.txt
    (4.87 KiB) Downloaded 44 times

BTW, not all of the mentioned requirements can be found up until here: many are inside the referentie.tar homedir configurations... On request I can email this if you are interested, it is simply too big (~17M) to post. Send me a PM in case.

Creating and distributing the Images I do with the FSArchiver utility launched from the SystemRescueCD, which is commandline based, very reliable and supports ext4.

Developing all of this has been a wonderful journey, and there is much of knowledge from the SolydXK forum that I used. So thank you for sharing and thank you for reading.

Regards,
Bas.

User avatar
simgin
Posts: 2
Joined: 02 Jan 2014 00:38
Location: Brighton, UK

Re: Bas's Installation and Configuration scripts

Postby simgin » 12 Jul 2015 21:38

^ That is very impressive bas, VERY. Wowowow, thank you for the post(s) mate.
Cheers
siimgin
Debian & Slackware User


Return to “Customizations”

Who is online

Users browsing this forum: No registered users and 1 guest