February 14, 2017
Fedora 25 -- fresh install using XFCE Spin
I have tried mate and cinnamon, but I like XFCE.
When I switched from mate to xfce (on Fedora 24), my sound stopped working.
Don't get me started on linux sound, it is such a train wreck.
It either just works, or it is totally hopeless.
This puts us in the windows scenario of doing a complete reinstall to
get something to work. But we were going to upgrade to F25 anyway
(but we would have done a painless dnf upgrade).
Plan ahead
A recent backup on separate media would be a fine idea. I do the install entirely on my SSD, which is /dev/sda.
I trust that my actual hard drive, which is /dev/sdb and has a huge /u1 partition will be unmolested by the install.
I use tar to backup /etc and /home/tom into file in /u1. I also did this for the entire root partition,
but really only /opt would have been required (but better safe than sorry).
the --one-file-system switch to tar is key to doing this for the root partition.
Having a copy of the files in /etc is a true lifesaver and is quite compact.
I find that the only thing I need from root are some of the files in /opt (my ESP8266 cross compiler)
and some files in /var/lib (in particular the samba password database in /var/lib/samba/private).
I also copy the contents of /var/lib/tftpboot, which is handy, but not strictly irreproducable.
So in the future I could just backup:
- /etc
- /home/tom
- /opt
- /var/lib
Backing up all of root covers my bets, but is excessive and should be deleted as soon as I am sure
I have not forgotten anything.
Do the install
For the first time ever, I burned and did the install from an XFCE Spin live DVD.
This boots up running from the DVD and offers you an "install to hard drive" icon.
I double click on that and away I go. There was some kind of hitch installing the
boot loaders. The first time I selected "standard partitions" and it told me flat out
it failed to install the boot loader. Then I let it "take the defaults", figuring
the Fedora dudes would have tested that. I install to my SSD, and had to delete all
the partitions on the SSD and tell it to reclaim space. This sets up an LVM scheme, and seemed to
work, but would not boot (the bios asks me to give it a bootable device).
So I booted the live DVD again and did this:
su
mkdir /x
mount /dev/fedora/root /x
mount /dev/sda1 /x/boot
grub2-install --root-directory=/x /dev/sda
I am not sure if it was this or fiddling with some BIOS settings that got me to where I could
boot again (mind you this system was booting and running linux prior to this install).
The BIOS setting was something called "HD BBS priorities".
After this I can boot and then it is a business of restoring things I like.
Here is a partial list and some tips:
- copy ~/.ssh to get my SSH keys
- copy my personal files into the new ~
- dnf install thunderbird and set it up
- dnf install google-chrome-stable (after adding the chrome repo files)
- set my static IP (/etc/sysconfig/network-scripts/ifconfig-eno1
(this requires a reboot, service network restart does not cut it).
- edit /etc/hostname
- dnf update and reboot to new kernel.
Tweaks
The main things I use to interact with my computer are vim, chrome, and thunderbird.
The bash shell might be a distant fourth. So a fair bit of my work after a full
fresh install is getting these installed and set up the way I like them.
I find (and I am sure that most others are the same) that I click buttons by
just "going to the lower right corner" rather than reading the label on a button,
so having things in customary locations is vital to avoid my going crazy.
Desktop
Make one click launch applications and have focus follow mouse.
Kill screensaver lock screen. Add my background.
Having the clock in the upper right the way I like it makes life good.
Select the following as a custom format:
%A, %b %-d, %Y - %-I:%M %p %Z
See this article:
Bash
Just copy my .bashrc and I am entirely satisfied.
There are some otherthings though:
- The .ssh directory
- The .gtopo directory
- The .gpg directory
- The .gitconfig file
Chrome
Install it, add the home button.
Add the new tab plugin so it goes to my home page when I launch a new tab.
Thunderbird
Move the delete button to the right edge where it always used to be.
Get rid of the return starts new paragraph "feature".
The real trick here is to recover my address book.
A person could plan ahead, export this from thunderbird, and save the
exported file. At this point my "profile", which contains the address
book is on backup media. The items of interest are in
~/.thunderbird . In particular:
./3pva2om0.default:
-rw-rw-r--. 1 tom tom 6924 Feb 13 22:47 abook.mab
-rw-rw-r--. 1 tom tom 21300 Feb 14 11:10 history.mab
So I move both of these files to the same location in the new profile
and that seems to do the trick.
Acroread
This ends up in /opt/Adobe, but rather than copy the files from my old F24
install, I would rather install from scratch, which is simple enough.
wget http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm
dnf install AdbeRdr9.5.5-1_i486linux_enu.rpm
This pulls in about 88 packages, but what the heck?
It does go to show that it would have been a mistake to just copy
over the files in /opt/Adobe from the old install.
Vim
You would think this would be trivial, but read on.
On Fedora vi and vim and very different things.
You and I absolutely do not want "vi" and I have been typing
"vi" from time immemorial and have no intention of changing.
So I add this to my .bashrc:
alias vi='vim'
On top of that, vim is not installed by default, so do this:
dnf install vim
Now we are getting close.
I have plugins and a .vimrc file. I copy all this via:
cd /u1/f24_tom
tar cvf /home/tom/vvv.tar .vim*
cd /home/tom
tar xf vvv.tar
rm vvv.tar
Cross compilers and stuff
dnf install git
dnf install gcc-arm-linux-gnu
dnf install ruby
dnf install ctags
dnf install picocom
This gives me gcc 6.1.1 for my ARM based projects.
To actually use picocom, I need to add myself to the dialout
group by editing a line in /etc/group like so:
dialout:x:18:tom
This requires logging out and in again to take effect.
I also need my esp8266 cross compiler in /opt.
This involves moving these files:
cd /opt
ls -l
drwxr-xr-x. 5 tom tom 4096 Nov 12 20:50 esp32
lrwxrwxrwx. 1 root root 12 Nov 12 20:43 esp8266 -> esp-open-sdk
drwxr-xr-x. 9 tom tom 4096 Nov 12 19:23 esp-open-sdk
qalculate
The standard gnome calculator is trash, so we want qalculate.
The package has a surprising name:
dnf install qalculate-gtk
Now it appears in the xfce accessories menu. Nice!!
dhcp and tftp servers
I use these for cross development projects.
They require (among other things) special rules in iptables
dnf install iptables
dnf install iptables-services -y
vi /etc/sysconfig/iptables
systemctl disable firewalld
systemctl stop firewalld
systemctl restart iptables.service
systemctl enable iptables.service
#systemctl status iptables
Then install tftp
dnf install tftp-server -y
systemctl enable tftp.service
systemctl start tftp.service
cd /var/lib
chown tom:tom tftpboot
--restore contents of /var/lib/tftpboot
And install dhcp
vi /etc/dhcp/dhcpd.conf
dnf install dhcp-server -y
systemctl enable dhcpd.service
systemctl start dhcpd.service
Automatic updates
I used to always run yum-cron, but the "new scheme" seems to be dnf-automatic.
dnf install dnf-automatic
vi /etc/dnf/automatic.conf
systemctl enable dnf-automatic.timer
systemctl start dnf-automatic.timer
Disable selinux
I got along fine ignoring this until I tried to start up my samba server.
To get rid of this:
vi /etc/selinux/config
Change enforcing to disabled, and reboot (I know of nothing short of rebooting here).
Sound works!
This is with my snd-intel sound chip. This has worked on and off and has been
impossible to troubleshoot, so we can count all of the time to do this upgrade and
reconfigure as "sound system maintenance overhead". A pox on the linux sound dudes.
Have any comments? Questions?
Drop me a line!
Adventures in Computing / [email protected]