Upgrading a Dual-boot Fedora and other Operating System

This entry is part 3 of 3 in the series Upgrading Fedora

This article will cover the steps for upgrading a dual-boot Fedora/other operating system (in my case Ubuntu and Windows Vista), where the other operating system handles the GRUB Bootloader. As always the first thing you should do is back up everything. This protects you from losing your data, in case something goes wrong. Because I’ll be doing this on a live system, I won’t have screenshots for the process. However the steps and images should be the similar to a single boot installation. Because this is more complicated than a single-boot installation, I won’t go into any steps for upgrading a pre-Fedora 18 system (although it should work with Fedora 17 also). Personally I think if you’re using anything older than Fedora 16, you’re most likely better off doing a clean installation than an upgrade. But if you want to do an upgrade, you *should* be able to follow the steps for upgrading to Fedora 17/18 using pre-upgrade. But you’re doing this at your own risk.

In my particular case, the steps to upgrade follow these:

Boot into the Fedora 18 partition, and login as root (or use su).

Upgrade rpm as per the single-boot instructions

yum update rpm

Update the entire system, as per the single-boot instructions

yum -y update

Clean the yum cache, as per the single-boot instructions

yum clean all

Reboot, and check your GRUB to see if it includes the “System Upgrade (fedup)” option. If so, follow the single-boot instructions. If not, then follow these steps:

Boot into the operating system that handles GRUB (in my case Ubuntu).

Open a terminal.

If you’re using Ubuntu, you’ll update grub with sudo update-grub, otherwise you’ll follow the steps for whatever distribution you’re using.

Reboot and check GRUB to see if it includes the “System Upgrade (fedup)” option. If so, choose that. If not, repeat the above steps.

After the upgrade, the computer will reboot (at least it happened in my case). Check your GRUB to see if it’s updated for Fedora 19. If not, then you’ll have to boot into the operating system that handles GRUB and update it again.

Now you’ll be able to reboot into Fedora 19 or your other operating system(s).

Upgrading a Single Boot Installation of Fedora

This entry is part 2 of 3 in the series Upgrading Fedora

This article will cover the steps involved with upgrading a single boot installation of Fedora to Fedora 19. If you’re running an older version (pre- Fedora 17), you’ll have to upgrade to either Fedora 17 or Fedora 18 before you can upgrade to Fedora 19. The easiest way of doing that is with pre-upgrade (which will allow you to upgrade to Fedora 17 only) and then following these steps to upgrade using FedUp (the Fedora Update Manager).

If you’re running Fedora 17 or Fedora 18, these steps are for you. All of these steps are done using the root (or su) account. You can either do them from a text console (CTRL+Alt+F2 through F7) or from inside of Terminal in the desktop.

Step 1:

First you need to make sure that you have the latest version of rpm installed. You can do this by running

yum update rpm

Next you’ll want to do a complete update of your system. The easiest way to do this is with

yum -y update

(the -y bypasses it asking you if you want to update–assume “yes”). Check the list of updates after it’s completed to determine whether you have a new kernel or not.

After the update is complete, you’ll clean the yum cache using

yum clean all

If you had a new kernel in the list of updates, you’ll want to reboot and then login as root/su again.

reboot

After you’ve rebooted/cleaned the cache you need to install the FedUp package

yum install fedup

You’ll want at least 4 GB of free space available on your / drive. If you need to clear space do so before you start the upgrade.

When you start the upgrade, you can either use the network or iso method (network is preferred as it gets you all of the updates in one shot). To use the network option, you type

fedup-cli –network 19 (that should be two dashes – – not one long hyphen)

First, fedup will install it’s repositories and download it’s kernel images (vmlinuz-fedup and intramfs-fedup), and then it will check the updates needed. It will download these updates (I had 1,293 listed plus others afterwards) and prepare everything for the upgrade. One thing it does is change the GRUB listing to include the System Upgrade (fedup) option. When it’s ready to go, you’ll be prompted to reboot the system again. You’ll choose the System Upgrade (fedup) option to start the actual upgrade.

fedup-upgrade-19-startfedup-upgrade-19-downloading

 

 Downloading Updates Screen

  fedup-upgrade-19-ready

Ready for Reboot Screen

fedup-upgrade-19-grub

GRUB Bootloader Screen

fedup-upgrade-19-upgrading

The Upgrade Screen

 

The upgrade consists of both a graphical upgrade screen (the “f” with a progress bar) and a text-based upgrade screen (showing everything that’s happening). When it’s completed, you’ll be presented with the Fedora 19 login screen.

Upgrading to Fedora 19

This entry is part 1 of 3 in the series Upgrading Fedora

Recently I wrote an article about installing Fedora 19 on a computer. This series of posts will cover the upgrading procedures for Fedora 19. Specifically, I’m going to cover upgrading a single-boot installation of Fedora 18 to Fedora 19 using fedup (the Fedora Updater), and upgrading both a dual-boot installation with Ubuntu–where both Fedora and Ubuntu handle the bootloader (two separate articles). In theory the installation should be the same either way. But in reality, depending on which operating system handles GRUB, there might be more steps involved.

Unlike the earlier installation guide, I won’t include screenshots in this guide. This is because most of the steps will be done through the command line, or through fedup. The command line (yum) will handle everything in the typical fashion that yum does things. FedUp may have GUI dialog boxes, but they probably won’t be as intensive as the full-installation is. If I find that they are, I’ll include some screenshots.

*** Originally I was going to show how to upgrading using yum, but in reading about the method, I found that the Fedora project doesn’t support it. If you absolutely must use yum to upgrade, here is the fedora document for that.

Setting up a Google Relay host using Postfix on Fedora 19.

When I set up my Amahi Home Server a few years ago, one of the things that I wanted to do was be able to send the logs and other emails that normally go to the root account to my gmail account. This way, I could quickly scan the information without having to actively log into the server. My options were to either register my own domain name and go through the steps to set up MX records and servers, or to relay it through another gmail account. I chose the second, since I already have the accounts, and registering and hosting the domain costs money (plus I’m already given a .yourhda.com domain with Amahi).

When I started to set up the relay, it took a while. I ended up finding quite a few sites on the Internet with different methods of configuring the relay (most of which didn’t work right). When I reinstalled my Amahi Server this past weekend (upgrading it to their latest version), I forgot to save the postfix configurations, so I had to redo them. Thankfully it was a simple matter this time. I’ve only done this on Fedora 14/19, but I’m pretty sure the steps will be similar, if not the same, for an Ubuntu based distribution. All of these steps are being done as the root (superuser) account. If you’re using your administrator account, you’ll have to precede each command with sudo.

Creating your Relay

If you haven’t done so already, you need to install postfix first.

yum install postfix

Next you need to open the /etc/postfix/main.cf file in your favorite editor (I use nano, but you can use whatever you prefer).

nano /etc/postfix/main.cf

At the bottom, add the following lines:

# sets gmail as relay
relayhost = [smtp.gmail.com]:587

# use tls
smtp_use_tls=yes

# use sasl when authenticating to foreign SMTP servers
smtp_sasl_auth_enable = yes

# path to password map file
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# list of CAs to trust when verifying server certificate
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

# eliminates default security options which are imcompatible with gmail
smtp_sasl_security_options =

Next you’ll have to edit (or create) the sasl_passwd file that’s used in the postfix configuration above

nano /etc/postfix/sasl_passwd

The format of this file is this:

[smtp.gmail.com]:587 username:password

After creating this file, you need to run the postmap command to create the hash of the password file and then make sure that postfix owns the files (as they are created by root originally).

postmap /etc/postfix/sasl_passwd

and

chown postfix /etc/postfix/sasl_passwd*

Finally reload postfix using this command:

/etc/init.d/postfix reload

Testing your configurations

If everything worked correctly, you should be able to test your mail setup by sending an email from the command line.  There are multiple methods for this, but I’ll show you two of them here.

The first method uses the mail command. (you should be able to do this as either root or a regular user) youruser@emaildomain.com should be replaced with your intended recipient’s email address.

mail -s “Subject: Test email from linux server” youruser@emaildomain.com

The editor will open up, so you can type a message in the body. You’ll use CTRL+D to exit this editor.

Next, if you want to CC anyone, you can add their email addresses, and/or press CTRL+D to exit this portion.

The email should send. Check your inbox (and spam folders) to see if it’s arrived. If not, you can check /var/log/maillog (or in /var/log/mail) to find out what’s wrong.

The second method uses the echo command to send everything to the mail command for you.

 echo “Enter the body part of the email” | mail -s “Subject: Test email from linux server” youruser@emaildomain.com

If you want to CC someone else into the email, the format of the command is

 echo “Enter the body part of the email” | mail -s “Subject: Test email from linux server” youruser@emaildomain.com -c seconduser@emaildomain.com

Forwarding the root emails to your relay

Now this is all pointless unless you make sure that all emails destined for the root mailbox get forwarded to your external account. You could do this a number of ways (such as configuring each application that might send an email to your root to send them to the external account also), but the two easiest ways are to create a .forward file, or create an alias.

Creating a .forward file:

nano /root/.forward

Add the email address that you want to forward the emails to and save the file.

youruser@emaildomain.com

Note that this will bypass the root mailbox altogether. If you want root to continue to receive the emails, you have to add root to the file with the following format

\root

youruser@emaildomain.com

Editing the aliases file and adding the root alias

nano /etc/aliases

Then add the following entry (replacing youruser@emaildomain.com with your external email address)

root: youruser@emaildomain.com

Finally run the newaliases command to make sure you’re using the updated version of /etc/aliases.

newaliases

With that, you should be set up. Now anytime an application sends a message to root, you’ll receive it on your external email account as well. Please note that you’ll still need to log in and clean out the root mail account occasionally, as the messages are still being sent there.

 

Troubleshooting and Updates for Fedora 19

If you run into any issues with postfix, you need to check /var/log/maillog for problems. The easiest way to do this is with cat /var/log/maillog | tail and then attempt to resend your email that you used to test the configuration.

If you run into any issues, such as gmail rejecting your email with something similar to “530 5.7.0 Must issue a STARTTLS command first.” (and you have the smtp_use_starttls=yes command in your main.cf) file, you need to do the following things:

In main.cf, add the following line

smtp_tls_policy_maps = hash:/etc/postfix/tls_policy

then create a tls_policy file in /etc/postfix that has the following line

[smtp.gmail.com]:587 encrypt

Then run postmap /etc/postfix/tls_policy to create the hash of the file.

If you run into a warning or error similar to “warning: TLS library problem: 25188:error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen(‘/etc/ssl/certs/ca-certificates.crt’,’r’):”, you need to change that line in main.cf to ca-bundle.crt. This is because Fedora 19 doesn’t have the ca-certificates.crt file anymore. It uses ca-bundle.crt instead. Something to note here is that after you fix the certificate issue, the email will send. So if you’re testing your configuration, you’ll end up with multiple test emails.

 

Fedora 19 Installation Guide with Screenshots

The Fedora Project recently released version 19 “Schrödinger’s Cat”, and because I may be using it to teach a course in the future (or a future release), I created an installation guide along with some screenshots. Full Disclosure, the basic outline of the guide came from an article on tecmint.com and the screenshots came from the Fedora Project’s documentation. There screenshots are a million times better than what I came up with.

Some caveats of course. You will be wiping data and applications from your computer and installing new applications. The operating system will change. If you want to dual-boot between Fedora and another operating system (most likely Windows), then you need to take some precautions before you start this guide. This guide is meant for someone who wants to wipe their computer and start over fresh.

If you’re planning on a dual- or more boot system, then my recommendation is to use one of your current operating systems to resize your hard drive. At a minimum you’ll want 25 GB of space available for Fedora (and you should know that you won’t be able to do much with that little space). Personally, I have Fedora installed on three computers as part of either dual- or triple- boot scenarios (and one as an Amahi Home Server). The minimum space that I gave Fedora was about 40 GB, knowing that I don’t plan on installing anything extra. The reason that I say to use one of your currently installed operating systems to resize the partitions is because it will definitely try to preserver your data (NOT that I don’t think Fedora would).

Also note that I’m providing download links to most (if not all) of the available versions of Fedora 19. The differences vary from the type of desktop environment that you’ll see, to whether or not you’ll even see a desktop environment.  My guide won’t go through to the actual desktop (if you want to see that, I recommend the tecmint article), so the steps will be the same regardless of which version you download (as long as you download a desktop version–not the Installation DVD or NetInstall CD).

So, without further ado, here we go:

Fedora 19 ‘Schrödinger’s Cat’ Installation Guide with Screenshots

Download Fedora 19 DVD ISO Images

Depending on which version of Fedora 19 you wish to install, you can find the downloads at the following links.

Download Fedora 19 DVD This is the complete installation DVD typically used for servers.

  1. Download Fedora 19 32-bit DVD ISO – (4.2 GB)
  2. Download Fedora 19 64-bit DVD ISO – (4.1 GB)

Fedora 19 GNOME Desktop This is the Gnome 3.x version of Fedora 19. It’s what the screenshots are based on.

  1. Download Fedora 19 GNOME Desktop 32-bit – (919 MB)
  2. Download Fedora 19 GNOME Desktop 64-bit – (951 MB)

Fedora 19 KDE Desktop This is the KDE version of Fedora 19.

  1. Download Fedora 19 KDE Live 32-Bit DVD – (843 MB)
  2. Download Fedora 19 KDE Live 64-Bit DVD – (878 MB)

Fedora 19 Xfce Desktop This is a minimalistic desktop environment. But still as effective as Gnome or KDE—just without the eye candy that they provide.

  1. Download Fedora 19 Xfce Live 32-Bit DVD – (588 MB)
  2. Download Fedora 19 Xfce Live 64-Bit DVD – (621 MB)

Fedora 19 LXDE Desktop This is another minimalistic desktop environment. It’s look is similar to the “Classic Windows” look from XP and other Windows versions.

  1. Download Fedora 19 LXDE Live 32-Bit DVD – (656 MB)
  2. Download Fedora 19 LXDE Live 64-Bit DVD – (691 MB)

Download Fedora Net-Install CD This CD provides you with the bare essentials to get started installing Fedora 19. If you do not have access to a broadband network, I don’t recommend this one.

  1. Download Fedora 19 32-bit Net-Install CD – (353 MB)
  2. Download Fedora 19 64-bit Net-Install CD – (317 MB)

Fedora 19 ‘Schrödinger’s Cat’ Installation Guide Steps

Step 1. Boot the computer with the Fedora 19 installation media. To install Fedora 19, press the ‘ENTER‘ key to Start Fedora 19, or it will start automatically. If you need specific troubleshooting options, you can choose ‘Troubleshooting’. Once Fedora 19 boots, you’ll be presented with the login screen below. You do not need to enter a password to log in at this screen. Also, if your computer goes to screensaver mode, you will be presented with this same screen.

bootscreen-livecd  livedesktop-login

Boot Fedora 19 Media Image

Step 2. Choose “Install to Hard Drive” to start the installation. Or you can choose the “Try Fedora” option to try it out, without making any changes to your computer. You’ll have to option to install from inside of the Activities menu. Either way, once you’ve decided to install Fedora 19, you’ll proceed on from here.

try_or_install

Choose Install Hard Drive Screen

Step 3. Select your language and click on “Continue“. You can also choose to automatically select the keyboard layout based on the language you select by clicking the appropriate check box near the bottom. If you don’t do this, you’ll have the option of choosing your keyboard layout later on.

langselection-GUI

Select Language Screen

Step 4. The next screen is the “Installation Summary” screen, where you’ll configure the location, date and time, keyboard, software packages (not available in the Live CD), network hostname, and storage. To make the changes, you’ll click on each option. If there are conflicts, you’ll see a yellow triangle and a warning at the bottom of the screen. The “Begin Installation” button will be grayed out until you’ve fixed any conflicts.

preinstall_hub-live

Fedora 19 Installation Summary Screen

Step 5. Date, Time and Time Zone settings.

If you need to change the Date and Time settings, click on “Date & Time” from the main summary screen. You can select your location (or a near-by city) from the drop-down lists or by clicking on the country. Then click on “Done” to return to the main summary screen. If you want Fedora to automatically update your time from Internet Time Servers, leave Network Time set to “On”, otherwise click it to turn it off. It’s recommended that you leave this on, unless you won’t be connected to the Internet.

timezone

Date and Time Zone Screen

Step 6. You’ll need to click on the “Installation Destination” option, and choose Installation destination i.e hard drive and click on ‘DONE‘. You should be prompted to select the type of installation after this. If it returns to the summary screen, come back in, and de-select then select your hard drive (by clicking on it), then click Done.

disk-setup

Choose Installation Drive Screen

Step 7. Next, you’ll see the Installation options, where you can view and modify your file-system as needed. In this post we will use automatic partitions. If you are dual-booting, you’ll want to review and modify your partitions manually.

install-options-live

Select Partition Type Screen

manual-partitioning

Manual Partition Screen (if you choose the “I want to review/modify my disk partitions before continuing” option).

Step 8. If you didn’t choose the option to automatically select your keyboard in the language settings, you can choose keyboard layout and click on ‘DONE‘.

keyboard

Select Keyboard Layout Screen

Step 9. In the network configuration screen, you’ll enter your hostname and click on ‘DONE‘.

networkconfig-live

Network Configuration Screen

Step 10. Once everything is configured you can click the “Begin Installation“ button to start.

write_changes-live

Main Summary Screen

Step 11. While the system is installing, you have the option to choose the Root password, and create a user.

Your password should follow these recommendations at a minimum to ensure security:

  • At least 8 characters in length.
  • Contains at least one upper-case character, one symbol, one number, and one lower-case character.
  • Do not use dictionary words (easily guessed) or publicly known information about yourself or people close to you (no pet names, anniversaries, nicknames, etc).

installing-packages

Installing Packages Screen

12. Click on Root Password to set your root password.

rootpassword

Add root Password Screen

Step 13. Click on User Creation to create your normal user. The recommendation is to make this user an Administrator, and create more “Standard” users after you’ve finished the installation. Otherwise, you’ll have to become “root” or “super user” in order to do any type of administrative tasks. If you follow this recommendation, you should use a “standard” user account for your normal day-to-day activities.

fb-createuser

User Creation Screen

Step 14. Installation completed. Reboot your system after ejecting media.

reboot

Installation Completed Screen