View Full Version : Scripted install?

Jeff Sadowski
6th December 2017, 05:07 PM
Is there a standard scripted install procedure?

I'd like a fast install that I can use my backed up configs for.
I can overwrite the root and boot partitions I just want it to remain raided and the root in the same lvm as my home directory I also need my home directory to be left intact.

I want a fast install with firewalld and the stuff it needs to act as a gateway (dhcp,radvd,firewalld,bind,...).
After installed and working as a gateway I'd like to script install more packages and copy their configs in two stages. Semi important stage and like stage.
The standard upgrade procedure was just taking way too long and a fresh install got my system up and working in a fraction of the time judging how long it took my laptop (8 hours).

My method got a working computer in 2 hours but most of that was because of me having to work with the quirks. Frustratingly copying configs using the boot disk. Also I decided since I was rebuilding it anyways to copy all my stuff to my dvr dump drive and rebuild the system as EFI over standard BIOS. Rebuilding my raid and lvm took me a bit of fighting as I didn't know what it was complaining about. Finally I decided to try automatic partitioning and saw all it wanted partition wise. Then I made it happy by creating 3 raided partitions one for boot one for efi and a third for lvm. And in LVM one for root another for home another for tmp and a fourth for swap. The installer made it really easy to build raid and lvm (excellent job there top notch who ever build the partitioner is awesome) after that it went smoothly. After it installed I figured out how to copy the firewalld rules and restart firewalld and that worked nicely. Luckily setup the network interfaces and installed dhcpd and its configs first so I could still reach it through the network,. Took me another two days to figure out the display issues. Still not done re-setting up all on my server but it is working as I need it and I can slowly get all the niceties back in place.

My plan for next upgrade to Fedora 28 is to modify the iso to a self contained installer image that I can boot from grub and build my system as desired only leaving important stuff in place. I'd like to work on a script to build the installer and that is why I asked about a scripted install and where I can read about what might already be supported? Screw uninstalling old packages blow most of it away it isn't needed. I just want my home directory and just some of the modified configs. Stock configs are good for almost everything.

6th December 2017, 07:59 PM
I do just what you are asking. I do the installation in two steps using an Everything network installation iso or the available network installation iso.

I install the minimum groups / files to get to a boot screen. Then I run my script "getgroup.sh". Oh yes, follow my tagline and you will see a message with a tarfile download or scroll a little and find an image of an older version

I run the download, and installation, then before bed, I run that script. One feature which is frowned upon that I use is yes|dnf -y .... That feature gives the go-ahead to the installation of rpm security keys.

My script can be adopted, as I have done, for Gnome (one version of script) and KDE (same script, different parameters).

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840 Comment 4

If you are including third party software. May I suggest this_ISO (http://mirror.yandex.ru/fedora/russianfedora/releases/RFRemix/27/Workstation/x86_64/iso/RFRemix-Workstation-netinst-x86_64-27.iso)

Jeff Sadowski
6th December 2017, 09:32 PM
Thank you, so much :-) I can't wait to take some time and look at it.

7th December 2017, 12:29 PM
Kickstart is the official way of doing automated installs which would cover most of your requirements like filesystem layout etc, anything outside of the default Kickstart options can be run in the %post section.


7th December 2017, 05:48 PM
Hi HaydnH,

The issue is the size of the updates after a system is booted. If everything could be done via kickstart, that would be great. But kickstart does not handle gnome extension activation, or installation of some external non rpm type application files.

I have not used kickstart. My reason is: If the application I want no longer exists, or a more recent version is available, the kickstart is not going to work for me.

Ideally, I would just like to be able to dump the dnf dictionary and use that information to create a rebuild script. I think that dumping the dnf, and determining dependencies for a rebuild is a lot of work, but it could be done.

I would start with dnf group list, followed up with dnf list. By the time I get something like my Ideal solution working, Fedora would have left me behind by one or two releases.

8th December 2017, 12:26 PM
Kickstart allows you to install a package groups or individual packages, I don't think I'd go the dnf dump route, just ask for what I need/use and let the system do the dependencies:

@X Window System

I'm not sure if you can specify a specific version of a package in the %packages section, if not you can always not install that package and add a "dnf install sqlite-N.N.N" line to the post install script.

For gnome extensions, again the post install script just needs a set of "gnome-shell-extension-cl -e extension-name" commands.

For non-rpm application types, would these be a specific or latest version? If specific then you could stick them in Copr or do create a tarball backup, if latest I guess you could add the "make && make install" or whatever to the kickstart post install. I think I'd leave those as a non-kickstart post install script though.

Having said all of the above, how often do you reinstall? I would guess not often so spending a lot of time on it would be counter productive (unless it's done for knowledge, love etc). If you're doing lots of installs with specific versions to meet tested environment demands then kickstart with a cobbler repo mirror, puppet or similar would be the way to go.