December 16, 2023

Fedora 39 -- setup after full reinstall

There are a million things to do after a full clean reinstall.

KiCAD

Will this work? It used to be hopelessly slow. I do "dnf install kicad" -- let's us try it.

It actually looks pretty good!! I seems snappy and useful. It used to be impossible.

opt tools and /home/tom/bin

Links have saved the day in all three of these cases. In each case the real files are on /u1 and a symbolic link "regenerates" the purpose for each as follows: More on these in detail for specific cases follows ---

Google Earth

They claim to offer a 64 bit RPM, but their download site doesn't download. It used to give me google-earth-pro-stable-current.x86_64.rpm which is a bit lame with no version number in the filename, but now we don't even get that.

I try a plan B (and it works). I used to have google earth pro installed, and the files were in /opt. I can get these as follows (along with other stuff).

su
rmdir /opt
ln -s /u1/opt /opt
cd /bin
ln -s /opt/google/earth/pro/googleearth-bin
ln -s /opt/google/earth/pro/googleearth google-earth-pro
I type "google-earth-pro" on the command line, and it works! And it seems to work well.

Expecting that someday google earth will come out with a broken new version, I use tar to create the file "earth.tgz" in /opt/google. Someday it may save my bacon.

Google chrome

This might be best handled by a fresh install, but working on google earth makes me wonder.

Note that /opt/google also has a "chrome" directory.

My old bin directory has:

tom@trona:/oldroot/bin$ ls -l *chrome*
lrwxrwxrwx 1 root root 31 Apr 21  2021 google-chrome -> /etc/alternatives/google-chrome
lrwxrwxrwx 1 root root 32 Nov 30 13:14 google-chrome-stable -> /opt/google/chrome/google-chrome
I do this:
su ; cd /bin
ln -s /opt/google/chrome/google-chrome
After this, typing "google-chrome" on the command line does work, and brings up my old tabs. It also generates a lot of disk activity.

My temperature plotter and logger

I type "temp_plotter" and work on providing the missing python packages.
su
dnf install python3-numpy
dnf install python3-ephem
Now the plotter works (with a deprecation warning about datetime.datetime.utcnow()).

Getting the logger going involves copying my old rc.local into etc/rc.d and then seeing if it still works (most of what used to be in rc.d is now gone). Apparently rc-local.service is supported by systemd and will handle this.
But I need to do this:

dnf install ruby
The server listens on port 2001, but I need to set the static IP of the server properly since my weather station is sending to that fixed IP.

ARM cross compilers and tools

I need "arm-none-eabi-gcc" and such.
dnf install arm-none-eabi-gcc-cs
dnf install openocd
And I am back in business, at least with the stm32f103.
I later discover a couple of other things:
dnf install picocom
dnf install arm-none-eabi-newlib
I found newlib quite essential, not for my own work, but for STM32Cube when I started to work with it.

dnf-automatic (like the old yum-cron)

This is easy:
dnf install dnf-automatic
vi /etc/dnf/automatic.conf
systemctl enable dnf-automatic.timer
systemctl start dnf-automatic.timer
I change just one line in the conf file:
# TJT apply_updates = no
apply_updates = yes

Reactivate my /u1 - /u2 mirror scheme

I copy the file /etc/cron.daily/tjt_backup into place from the old root filesystem.

Restore the crontab for user "tom"

This should be in /var/spool/cron. And it is (on the old system) with name "tom".
-rw------- 1 tom tom 58 Dec 18 20:19 tom

Then I copy the old file:

cd /var/spool/cron
cp /oldroot/var/spool/cron/tom .

Allow hyperlinks in email to be displayed

I use thunderbird, and a accustomed to clicking on hyperlinks in email to see them displayed in the browser. I inspect /etc/alternatives on my old system and find this link:
lrwxrwxrwx 1 root root 29 Apr 21  2021 google-chrome -> /usr/bin/google-chrome-stable
I could do this:
cd /etc/alternatives
ln -s /bin/google-chrome
But I am now using chromium (mostly), so this makes more sense:
cd /etc/alternatives
ln -s /bin/chromium-browser
However, neither works.

XFCE has settings, default applications that allows me to select chromium or google chrome, but fiddling with this does not work.

Thunderbird itself has a list of preferences for files and attachments. Use Edit, Settings to find this. It has entries for http and https. They were set to "use default browser". I change both to "always ask". This does nothing. Clicking on a link yields nothing at all, even if I right click and select "Open in Browser" from the menu.

Thunderbird keeps resetting "https" back to "Use Web Browser (default)", which certainly looks like some kind of bug.

locate

I get the error
/var/lib/plocate/plocate.db: Permission denied
This looks more like a Fedora bug than anything else. I fix it with:
cd /var/lib/plocate
chmod 644 *.db
But the next time updatedb runs, it screws it up again. Even more peculiar is that it worked on my old system with the same ownership and permissions.

The old system had this:

ls -l plocate
-rwxr-sr-x 1 root 955 323360 Jan 19  2023 plocate
My new install has this:
-rwxr-xr-x. 1 root root 334728 Jul 20 17:00 /usr/bin/plocate
In other words the plocate executable was sgid for the plocate group and for some reason this is broken on Fedora 39. I do this:
su
dnf erase locate
dnf install locate
updatedb
This places proper ownership and permissions on the plocate executable.
Definitely a Fedora bug with the install.

My printer

This was extremely easy:
su
system-config-printer
I click on "Add", select "Network Printer" and select the first entry that says "Brother printer". There are two entries (who knows why), the first is "driverless IPP". Click finish and it just works.

lpq and lpr do what they should.

Xilinx vivado and such

Like Google Earth, I can bring these in via a symbolic link. They are expected to be in /tools/Xilinx so what I need to do is:
su
mkdir /tools
cd /tools
ln -s /u1/Xilinx
More than just this is required. When I type "vivado", I get:
application-specific initialization failed:
  couldn't load file "librdi_commontasks.so":
  libtinfo.so.5: cannot open shared object file: No such file or directory
I may be able to check my old vivado install notes and figure out what libraries I might be able to install to fix this. But it may be wiser to just reinstall vivado from scratch (I have been getting notices of new versions for quite some time now).

USB serial devices and permissions

I commonly use USB to serial devices along with picocom for various hardwre related projects. I plug these in and they show up as /dev/ttyUSB0 and such. But I get permission errors when accessing them as "tom". I thought this might be something I needed to fix via udev rules, but it is easier and more basic that that.

I need to add myself to the dialout group by editing a line in /etc/group like so:

dialout:x:18:tom
Then I need to log out and back in again for it to work.

What about them udev rules?

Dealing with USB serial has me thinking about the fact that I did once have a collection of important udev rules. And it will be a pain to trip over them one and one and figure out how to regenerate them. A wise thing to do when you do a full system reinstall is to keep a backup of the /etc directory. What I actually have is this:
mount
/dev/mapper/fedora-home on /oldhome type ext4 (rw,relatime)
/dev/mapper/fedora-root on /oldroot type ext4 (rw,relatime)
I did my install on a nice big (1T) ssd. Then I set up the following mount points to my old install on the old spinning disk. So I can find all that I might want in /oldroot/etc. But I also create a backup of /etc within my /u1 filesystem:
su
cd /oldroot/etc
tar cvf /u1/f38_etc.tar .
It turns out I have quite a collection of this sort of thing:
cd /u1
ls -ld *etc*
lrwxrwxrwx.   1 tom  tom         7 Aug 29  2016 etc -> f23_etc
drwxr-xr-x. 151 tom  tom     12288 Mar 18  2016 etc_OLD
-rw-r--r--    1 tom  tom  23941120 Sep 28  2012 etc_OLD.tar
-rw-r--r--    1 tom  tom  35287040 Mar 18  2016 f22_etc.tar
drwxr-xr-x. 163 tom  tom     12288 Aug 29  2016 f23_etc
-rw-r--r--    1 tom  tom  49008640 Aug 29  2016 f23_etc.tar
drwxr-xr-x. 151 root root    12288 Feb 14  2017 f24_etc
-rw-r--r--    1 root root 20541440 Feb 14  2017 f24_etc.tar
-rw-r--r--    1 tom  tom  35409920 Apr 18 11:11 f38_etc.tar
I expand f38_etc and change the link:
lrwxrwxrwx    1 root root        7 Apr 18 11:14 etc -> f38_etc
Those udev rules all need to go into /etc/udev/rules.d so I do this:
cd /u1/etc/udev/rules.d
cp -p * /etc/udev/rules.d
The "-p" switch to cp says to preserve permissions and ownership
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org