The officially official Devuan Forum!

You are not logged in.

#1 2020-10-11 09:49:56

uther
Member
Registered: 2019-05-16
Posts: 65  

Automating post-installation steps

I'm curious about automating various post installation steps, and I've found that people recommend two contradictory ways to do it:
1. Copy entire /home, /ect, and other necessary directories.
2. Set everything with a script.

I really don't like the first idea because that way you can end with a lot unnecessary files and you risk copying something that is already broken or would break the fresh install.

Setting everything with a script is much better in a way that you write script once and you are done. Troubleshooting is much easier too IMO, and you dont need to care about backups for config files.
Right now I have a script that can cover basic configuration on couple different machines. Things like power management on a laptop with powertop, tweaking kernel parameters, installing firmware, drivers and software, ricing Desktop, etc.
It's still work in progress, but after using it twice already it's much faster than doing all the things by hand.

Aside from data handling is copying better than script when it comes to setting desktop environment?

inb4 - don't reinstall, fix what is broken :^)


soystemd-free diet

Offline

#2 2020-10-11 10:50:56

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: Automating post-installation steps

I use myself a mix of the two approaches: a lot of secuential scripts for installing and configuring some pieces and unpacking tar files for some other configurations. I use the second tecnique for some graphical environments that I know of fully configure only throughout a GUI (KDE mainly).

I configure the first user of the box and then modify the scripts to add new users using /etc/skel. See man adduser

Offline

#3 2020-10-11 22:40:34

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 582  

Re: Automating post-installation steps

I use a combination as well, but a little different.

I have many of my home folders on separate hard-drives (for a few reasons, plentitude (older spinners), security and convenience).

I have links setup those directories from a script after a fresh install, including fstab (not often but sometimes I have to rearrange or lookup the uuid's)

Once that is done I can install and setup packages for my system and favourite programs. (I backup nearly all the previous packages downloaded to help with reinstall/restore without a network.)

Then I use backup/restore scripts selectively to setup my system, networking, firewall, proxy, grub (graphics) and apt sources and then install nVidia graphics module.

After all of that I can check for updates.

I usually start using the user system from scratch and modify it to look and behave the way I (can) want. I do it this way as to avoid clutter and any mistakes I may have made in the last usable session when I broke it :-) .

I developed this approach over the years because I didn't have a reliable internet connection but wanted to reinstall as quickly as possible. It's not fully automated but I can have reinstalled in less than half an hour (utilising ss hd's and memory sticks rather than dvd for the Distro iso's)

So, yes it is possible. :-)

I hope this helps.

[edit]
p.s. I have no secrets, so ask if you want.

by the way, The first packages I make sure I have is nano, rsync and locate and gpm (mouse, cut copy and paste from a console). I don't use sudo.

Glenn

Last edited by GlennW (2020-10-11 22:45:20)


pic from 1993, new guitar day.

Offline

#4 2020-10-12 18:03:28

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Automating post-installation steps

I prefer to make packages containing the configuration (and also depending on other packages I want) then use the openSUSE Build Service to host them. Example here: https://build.opensuse.org/package/show … le-desktop

Another option is to create an ISO image to install a pre-configured system. I use live-build for that but fsmithred's live-sdk & refractasnapshot are alternatives.


Brianna Ghey — Rest In Power

Offline

#5 2020-10-26 21:26:13

uther
Member
Registered: 2019-05-16
Posts: 65  

Re: Automating post-installation steps

Thanks all of you.
GlennW - your approach is interesting even for a scenario when you do have internet connection. I've never considered home folder to be on a separate drive maily because I'm too lazy to learn how to install manually whole system with full disc encryption and separate partitions. I'll eventually do it ... tommorow :^).

HoaS - very efficient indeed, but a little above my skills right now.

As for the questions - I'm lookig where xfce writes custom keyboard shortcuts. I've foud file /home/user/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml but I'm not sure if this is it?


soystemd-free diet

Offline

#6 2020-10-28 15:53:39

bgstack15
Member
Registered: 2018-02-04
Posts: 205  

Re: Automating post-installation steps

The xml files for xfce4 underneath ~/.config are emphemeral. You cannot rely on modifying them yourself to actually take effect in the current session. Closing the current session will usually force update those files, additionally.
The way to modify keyboard shortcuts for window manager operations: https://bgstack15.wordpress.com/2018/06 … r-in-xfce/.
It links to https://bgstack15.wordpress.com/2017/10 … from-file/ where I describe xfconf-query.

xfconf-query -l | sed -r -e '/Channels:/d' | while read line; do xfconf-query -lv -c "${line}" | sed -r -e "s/^/${line} /"; done > my-settings.xfconf

Xfconf-query is the way to inspect, and modify, current settings which can then be made persistent upon properly closing Xfce4.


This space intentionally left blank.

Offline

#7 2020-10-28 18:02:59

uther
Member
Registered: 2019-05-16
Posts: 65  

Re: Automating post-installation steps

Thank you bgstack15, that's very useful information!


soystemd-free diet

Offline

Board footer