Views:
50,647β
Votes: 13β
Tags:
upgrade
system-installation
grub
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1035368
Title:
Is a clean install better than upgrading?
ID:
/2018/05/12/Is-a-clean-install-better-than-upgrading_
Created:
May 12, 2018
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
There are no guarantees in life
You can have crashes in a fresh install or in an upgrade. Most people will not experience a crash. If you are in that unlucky minority it is best to:
- have a backup you can restore or,
- test the install/upgrade on a separate partition.
Clean install advantages and disadvantages
For a clean install all that old garbage youβve installed over two years between LTS versions is gone. This however can be a disadvantage as you often forget the good stuff youβve added in /usr
and /etc
subdirectories.
Upgrade advantages and disadvantages
In the process of upgrading you are told for each configuration file what each new package version will be changing. You can select to keep the old or take the new version. For example during Ubuntu 16.04 LTS to 18.04 LTS upgrade these changed on my system:
- Scanner configuration -
/etc/sane.d/dll.conf
/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
- Sound override to keep HDMI TV active -
/etc/pulse/default.pa
- Grub override to hide menu at boot unless Escape pressed -
/etc/grub.d/30_os-prober
- Cron(you would loose all on fresh install!) -
/etc/cron.d/anacron
- Total network traffic monitoring utility -
/etc/vnstat.conf
Running the upgrade on May 6, 2018 I was told that 203 packages will be removed. Over time support for more packages will be added so fewer will be dropped during upgrade. It is best to ensure all your critical needs packages are there or you have alternatives from other developers to use.
Backup first or run upgrade on cloned partition
Backing up and restoring is a pain. Itβs time consuming and often times your restore doesnβt proceed as planned. An alternative is to clone your 16.04 LTS (or whichever version) to a new test partition and upgrade to 18.04 LTS (or whichever version) there.
I use a script to clone Ubuntu to a test partition for upgrading: Backup/clone live to a new partition which can be booted
The script will:
- Use
rsync
to ensure mirror image from real partition to test partition - Update test partition
/boot/grub/grub.cfg
with proper UUIDβs for booting - Update test partition
/etc/fstab
with proper UUIDβs for booting - Run
sudo update-grub
to add test partition to boot menu - Allow you now reboot and run upgrade on test partition
After upgrade on test partition you can take your time exploring all the new features and checking for bugs. You still have your original Ubuntu installation for day to day work. If you find bugs in the new version, you can rerun the cloning and upgrade a week or two later after they have been fixed. You would also re-clone and re-upgrade if packages critical to your work were not supported but now support has been added.