October 29, 2020

Fedora -- New system checklist

I am setting up two new systems from scratch, so as I am setting up one, I am compiling this list to make the second go quicker.

Partitions

Select "standard partition" on the installer. We don't want this LVM rubbish. Watch it though, because it continually trys to sneak an LVM partition in on you.

Use custom and set up the following scheme:

/boot/efi	50M
swap		16G
/boot		1G
/		120G
/u1		rest of disk
This leaves /home inside of root, and I can make links to /u1/user as desired.

Network

Don't fight with the installer. We want a static IP, but need to use the network configuration tool after the install is done to straighten this out. For DNS, use:
208.67.222.222, 208.67.220,220
search as.arizona.edu
Yes, put commas between the entries.
su
hostnamectl set-hostname new-name

ssh keys

Do this right away to make life easier. On the new machine do "ssh xyz" to get the .ssh directory set up, (or create it with permissions "chmod 700 .ssh"). Then on my home machine, copy my public key to the new machine:
su
cd .ssh
cp trona_rsa.pub xyz:
Then either copy this to or append this to .ssh/authorized_keys

Adding a disk

Use fdisk to make partitions (perhaps just one), then:
mkfs -t ext4 /dev/sdb1
Then edit /etc/fstab
/dev/sda4                                 /u1                     ext4    defaults        1 2
/dev/sdb1                                 /u2                     ext4    defaults        1 2
Be sure the mount points exist.

Git and github

I don't want to distribute my public key from my home machine. But it seems to be possible to set more than one ssh key for a Github account. What would be better would be to set up some other github user, then I could add that user as a collaborator only to specific repositories, but we aren't going to tackle that for now.
ssh-keygen -t rsa -b 4096
Then I cut and paste the id_rsa_pub file into Githubs place. I get to that "place" by clicking on my tiny user photo at the upper right of my github account page, then clicking Settings. Along the left is a bunch of choices, one of which is GPG and SSH keys. I select that, then use the gadget to "add a key". This works, but the key I pasted ends in the hostname, so it will be curious to see if I can use the same key from any host.

IRAF

Oh, the misery. IRAF is a total train wreck of buried and wired in paths, and woe to you if you change the location of anything! I had hoped I could just make tarballs of an IRAF install on another system, but this is NOT possible. At least it is not possible unless you duplicate every directory and symbolic link on the target system. These people should be shot. If you do anything out of sorts, expect messages like this:
cl
/usr/local/bin/cl: /u1/iraf_2.16.1//unix/hlib/irafarch.csh: /bin/csh: bad interpreter: No such file or directory
ERROR:  No /u1/iraf_2.16.1//bin./vocl.e binary found.
Ah, well one thing -- I have to install the wretched csh for IRAF to work, along with other package:
dnf install ncurses tcsh xpa
dnf install libXmu
#dnf install libXmu.686
Years ago, I installed the libXmu.686 package, just for good luck, but that package doesn't seem to exist any longer.

I get an error that libncurses.so.5 cannot be found. This is in "ncurses-compat-libs", so we install that, and based on my previous notes, we install the 32 library as well, which does exist in this case.

dnf install ncurses-compat-libs
dnf install ncurses-compat-libs.i686
Now we get the errors:
cl
os.zgtenv: cannot open `/usr/include/iraf.h'
task `cl' has no param file
Fatal startup error.  CL dies.
Yes indeed, not clever shortcuts will do, we have to do the standard install procedure, which isn't that bad really, see my notes from 2 years ago: It turns out that copying the directory tree was not such a bad idea, but I needed to do two things.
  1. Install a bunch of packages
  2. su ; cd /iraf/iraf ; ./install --system
After this, I can "mkiraf ; cl" and get what I expect.

But there are still hidden wired in paths. The only thing that works is to entirely delete /u0/iraf/iraf_2.16.1 and extract the files fresh from the distribution tar ball. Then I can do:

su
cd /iraf/iraf
./install --system
I am hell bent on getting all these files on /u0 since it is my SSD.

Here is some classic IRAF stupidity for you. I try to run the cl after putting all the requisite files into /iraf/iraf (a link to /u0/iraf_2.16.1) and /usr/local/bin and I get:

cl
os.zgtenv: cannot open `/usr/include/iraf.h'
task `cl' has no param file
Fatal startup error.  CL dies.
There are at least two serious things wrong here. One is IRAF putting header files into system directories -- truly evil. The other is user code needing a C header file. I am not compiling anything, for crying outloud! That's IRAF for you!
The fix for this, by the way, turns out to be:
su
cd /iraf/iraf
./install --system
The thing with IRAF is not to waste energy fighting it. Imagine yourself driving down a freeway with wrecked vehicles everywhere. Gas tankers leaking fuel ready to burst into flame. Just work your way around them and get away from them with as little involvement as possible.

Get rid of selinux

vi /etc/selinux/config
Change enforcing to disabled, and reboot.

Setup

Sometimes a reboot now and then is good to ensure that your changes will persist when the system is rebooted. Better to find out now that to have the system reboot when you aren't around and have a late night phone call.
systemctl start sshd
systemctl enable sshd

dnf install dnf-automatic
vi /etc/dnf/automatic.conf (change apply to yes)
systemctl enable dnf-automatic.timer
systemctl start dnf-automatic.timer

Packages

dnf install -y ruby
dnf install -y git
dnf install -y python3-tkinter
dnf install -y ncurses-devel
dnf -y install cfitsio-devel

dnf -y install tigervnc tigervnc-server


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org