What is the correct way to upgrade a Fedora system with RPMFusion repos?

Anthony Thyssen a.thyssen at griffith.edu.au
Wed Nov 9 00:22:23 CET 2016


I myself prefer a fresh install on each release, though I tend to skip
every second release.

Rather that install over the old system, I typically install into a
partition separate from the old one, so both old and new systems are
bootable, and accessible from each other, for a period of time.  Home and
data partition are separate to root.

The last time I did this I did not use a bootable disk (USB) to install,
but use the DNF running on the old system to install the new system onto
the new partition!  Quite an experience, some quirks, but it worked!

The attached text file is the steps I took (for fedora 24)

Comments welcome.



On Wed, Nov 9, 2016 at 8:03 AM, Reindl Harald <h.reindl at thelounge.net>
wrote:

>
>
> Am 08.11.2016 um 22:29 schrieb Matt Shindala:
>
>> I am currently running Fedora 24 with RPMFusion repos. Fedora 25 is
>> scheduled to be released today. What is the correct process I should
>> take to upgrade my system and upgrade my RPMFusion repos to the Fedora
>> 25 version?
>>
>
> just wait until the repos are ready and use "dnf --releasever=25
> distro-sync" as always
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.rpmfusion.org/pipermail/rpmfusion-users/attachments/20161109/4bdd8794/attachment.html>
-------------- next part --------------

  Upgrade via DNF into the alturnative Root
  http://dnf.readthedocs.io/en/latest/command_ref.html?highlight=installroot

  /dev/sda1   -- current root partition (FC22)
  /dev/sda2   -- new root partition (to install - FC24)

    # Clear the new root partition
    umount /mnt/alt
    mkfs.xfs /dev/sda2
    mount /mnt/alt

    # Information about that partition
    dnf --installroot=/mnt/alt grouplist
    dnf --installroot=/mnt/alt list installed

    # set server release version for the new root partition
    dnf --installroot=/mnt/alt --releasever=24 --nogpgcheck \
        install system-release

    # Install Base Environment
    dnf --installroot=/mnt/alt --nogpgcheck \
        groupinstall 'Fedora Workstation'

    dnf --installroot=/mnt/alt --nogpgcheck install kernel
    dnf --installroot=/mnt/alt --nogpgcheck install grub2

    # set disk devices -- swap root partition mount points
    cp -p /etc/fstab /mnt/alt/etc/fstab
    vi /mnt/alt/etc/fstab

    # set initial host information
    vi /mnt/alt/etc/shadow
      :1r !head -1 /etc/shadow
      :1d
    grep ^anthony: /etc/passwd >>/mnt/alt/etc/passwd
    grep ^anthony: /etc/shadow >>/mnt/alt/etc/shadow
    cp -p /etc/hostname /mnt/alt/etc/hostname
    cp -p /etc/ssh/ssh_host_* /mnt/alt/etc/ssh

  Set up Boot of new OS in grub

    # Is new OS visible?
    os-prober
    linux-boot-prober /dev/sda2

    # Add to grub boot menu on current OS /boot partition
    cp /etc/default/grub /mnt/alt/etc/default/grub
    grub2-mkconfig -o /boot/grub2/grub.cfg
    grub2-install /dev/sda

    # Setup grub boot on other root partition (mounted)
    grub2-mkconfig -o /mnt/alt/boot/grub2/grub.cfg
    #grub2-install --root-directory=/mnt/alt /dev/sda

    # List entrys and the menu numbers
    sed -e '/^menuentry/!d' -e "s/[^']*\('[^']*'\).*/\1/" \
           /boot/grub2/grub.cfg | cat -n

    # reboot to new OS (menu 5 from above) (once only)
    grub2-reboot 5       # <-- simple    vs  ,--verbose
    grub2-reboot 'Fedora release 24 (Twenty Four) (on /dev/sda2)'
    grub2-editenv list   # what is loaded on next reboot
    reboot

You can now install software and configuration as normal.
The old system is still available from /dev/sda1


More information about the rpmfusion-users mailing list