Skip to content

Instantly share code, notes, and snippets.

@misho-kr
Last active July 10, 2018 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misho-kr/8034617 to your computer and use it in GitHub Desktop.
Save misho-kr/8034617 to your computer and use it in GitHub Desktop.
Fedora 20 Installation

Fedora 20 Installation Notes

This page describes the steps to prepare for and perform the installation of Fedora Linux on my laptop and desktop machines.

The process is fairly straightforward, and thanks to the efforts of the Fedora team really easy to carry on. Still, there are steps (mostly customizations) that require looking up man pages and other documentation, and there is benefit to record that information somewhere. I also tend to forget what custom scripts I have created and used, so unless I remember to preserve them I have to write them again (and again). This notes should serve as reminders to copy over such scripts.

Download and other links

Preparations

Installation media

I am getting tired of burning CDs and DVDs, and i don't have USB drive that is big enough to hold the full DVD ISO (+4GBt). Therefore I always opt for network installation, but instead of downloading packages from some remote server I set up one myself in my local network. Here is how it goes:

  1. Download the "Minimal Boot Media" (netinstall ISO), and copy it to USB drive
# dd if=Fedora-20-x86_64-netinst.iso of=/dev/sdg bs=64M
5+1 records in
5+1 records out
336592896 bytes (337 MB) copied, 133.635 s, 2.5 MB/s
  1. Mount the DVD ISO
mount -t iso9660 /space/download/Fedora/Fedora-20-x86_64-DVD.iso /run/media/Fedora-20-x86_64-DVD
  1. Update the Apache server config file, or whatever web server is being used, to add the mounted DVS to the server's document root. Restart the Apache server and verify the DVD content is accessible.
Alias /fedora20 "/run/media/Fedora-20-x86_64-DVD"

<Directory "/run/media/Fedora-20-x86_64-DVD">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Backup laptop's filesystem

I use external hard drive with USB interface to archive files. An alternative is to use my other computer, a desktop machine, with the help of ssh or rsync, but in that case I may end up deleting the backup files when I move to upgrade the other machine. There is no knowing when I may need those backups so the external drive is preferable.

  1. User home directoties
  2. Additional user-owned filesystems, like documentation, rpms and other downloaded files
  3. Preserve all useful virtual machines, as well as docker images and containers
  4. Scripts and configuration files I have created extensively modified which I do not want have to recreate
    • /etc/profile.d/
    • /etc/init.d/
    • /etc/systemd/system/
    • /usr/local/bin/
    • /opt/bin/
  5. Make a copy of /etc/fstab and the output of fdisk -l /dev/sda as a record of the disk filesystems layout
  6. Use Gnome Evolution's export function to create backup of all emails

Installation

Fedora's recommended approach is, or was because things have probably greatly improved in this area, to upgrade by doing fresh installation. So after all important files have be saved it is time to bring the latest and greatest Fedora version.

Hardware Setup

  1. Reboot the laptop and login to the BIOS menu
  2. Disable secure EFI boot so I can specify alternative boot source, save and restart
  3. Plug in the USB drive with the minimum installation media
  4. At the start of the bootup sequence, press F12 and choose the USB drive, continue the boot process

Software Setup

  1. Commence the installation
  2. At the prompt for installation source, choose HTTP and enter the URL of Apache server running on the desktop machine and the location of the installation DVD
  3. Customize the disk partition, either copy the layout that existed on the laptop, or make adjustments as desired. I usually go for plain disk partitions, no LVM. After all this is a laptop machine so nothing fancy is expected:
    • /boot -- 512M as recommended
    • swap -- 32G which is more than generous
    • /home -- encrypted, 64G is plenty
    • / takes the remainder
    • /tmp and /var/tmp are tmpfs filesystem (explained below)
  4. Select Gnome desktop profile, add more packages are desired (skip Eclipse as that will be downloaded from Eclipse.Org and installed manually)
  5. Finish the installation
  6. Don't forget to enable secure EFI boot in the BIOS after the installation

System configuration

  • Use the archived custom scripts and configuration files to setup, enable and start all needed services
  • Take extra steps to minimize where possible the I/O activity against the SSD drive on my laptop
    • For all regular filesystes, disable update of i-node access time
    • Make all temp filesystems to be type tmpfs
    • Enable and start make_tmpcache service to create file caching folder under /tmp for all regular users (only me at this time)
    • For every regular user, remove $HOME/.cache folder and create a soft link to file caching folder just created under /tmp
    • Enable the TRIM command on all SSD drives
      • Mount the filesystems with the discard option
      • Update LVM config -- in /etc/lvm/lvm.conf set the issue_discards option to 1 (issue_discards = 1)
      • Update LUKS config -- in /etc/crypttab file add discards to the end of the appropriate luks lines
# /etc/fstab
# Created by anaconda on Sat Jul 13 05:08:07 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=0B75-2195          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
#
UUID=5fd08605-0f73-4435-97d5-0afc9f46aa4a /        ext4    defaults,noatime,nodiratime,commit=15        1 1
UUID=71c279a8-216d-4b9c-b3ba-5c04b7638166 /boot    ext4    defaults,noatime,nodiratime        1 2
/dev/mapper/luks-e738748c-2e48-43a7-a8d7-e3d8aee8a47c /home    ext4    defaults,noatime,nodiratime,commit=15,x-systemd.device-timeout=0 1 2
UUID=5a51814d-4bc0-4641-a6d3-f24836ad858e swap                    swap    defaults        0 0
#
# Fedora does not list /tmp anymore
# tmpfs		/tmp		tmpfs	defaults,noatime,nodiratime,mode=1777	0 0
tmpfs		/var/tmp	tmpfs	defaults,noatime,nodiratime,mode=1777	0 0

User account and files

  • Create a user account, pick name and uid to match the accounts on my other machines I have. No central user database as I don't want to have to run a server 24/7 to host LDAP, Kerberos, NIS, etc. Add that user to sudoers list.
  • Restore user home directories, be careful to selectively skip the so called hidden ".something" files. In the past I had problems due to these outdated config files when upgrading to newer version of Gnome desktop, Gnome Evolution an other software packagges
  • Restore all additional user filesystems from the backup files

Software Packages

GNOME 3

SublimeText 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment