-2

I have a Ubuntu 24.04-Windows 11 dual-boot setup on a laptop. I started with Gnome with gdm then switched to KDE plasma with sddm.

My Ubuntu Gnome Desktop had quite a few things missing. I suspected the system is corrupted. One example is I couldn't install R with apt. Besides, my Firefox browser didn't work. There are a sleuth of other problems. So I'm thinking about reinstalling Ubuntu and start anew.

Any advice on how to safely reinstall Ubuntu (or replace Ubuntu with a different distro)? My Windows has a few professional software that I cannot afford to lose.

tcollar
  • 17
  • 3
    This question is similar to: How to reinstall Ubuntu in the easiest way?. If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. – guiverc Apr 25 '25 at 22:48
  • This is a Q&A site and not a forum, your question should online a single problem you're having (the question) that answers try and solve. If you have multiple questions, they need to be asked in different Questions, as this is not a forum, as you cannot ask for opinions (am I better of) as they're off-topic on Q&A site as being better handled by forums. All Ubuntu flavors are still Ubuntu, so difference is just packages installed by default & settings on an out of the box install.. its the same Ubuntu base under all so run the same software. – guiverc Apr 25 '25 at 22:51
  • FYI: If you read the update on that question relating to "Update for Ubuntu Desktop 24.04 & 24.10" you'll read a little about Quality Assurance testing I did; which included starting with one flavor, making changes & adding apps, then non-destructively re-installing other Ubuntu flavors or Ubuntu Desktop and expecting a good install (with different desktop & default apps). It was that QA that detected a flaw with ubuntu-desktop-installer + ubuntu-desktop-provision, but Kubuntu uses calamares so doesn't have that issue at 24.04/24.10/25.04... – guiverc Apr 25 '25 at 22:54
  • I'll go off-topic & provide opinion, I like KDE Plasma over GNOME in that I regularly find GNOME frustrating.. ie. a personal taste thing, so that can be a benefit based on tastes.. Kubuntu being a flavor using packages from universe, does mean Ubuntu Security Team don't check packages by default; thus Ubuntu Desktop (with GNOME) does have that security benefit; but you can get checks on some universe packages if you add Ubuntu Pro, thus there maybe security benefits to a Ubuntu Desktop install... (why some corporate policies forbid/restrict universe packages) – guiverc Apr 25 '25 at 22:59
  • Ubuntu and Kubuntu are almost the exact same thing, the only difference is the default applications installed. If you prefer KDE, install it, use it ... no need to install Kubuntu if you already have Ubuntu. – thecarpy Apr 25 '25 at 23:03
  • @guiverc my questions have to do reinstalling Ubuntu on a dual-boot laptop. It's very different from reinstalling Ubuntu in a single boot situation. I absolutely want to keep my Windows.

    Same here -- Gnome is horrible. KDS plasma is like a dream!

    – tcollar Apr 25 '25 at 23:20
  • Dual Boot: Always backup regularly. You never know when a Windows Update will wipe your Ubuntu/Kubuntu system, or when a user mistake will accidentally wipe Windows. Re-installing Ubuntu/Kubuntu should be similar to how you originally installed it. – user535733 Apr 25 '25 at 23:23
  • My duplicate answer has been used twice this year on my current box; which includes three OSes (Windows 11, Ubuntu 25.04 & Ubuntu 24.04 LTS currently) and I've suffered no data loss via non-destructive re-install. I don't see how Windows relates? ie. install method is the same if single-boot or dual-boot; its just easier to make a mistake in a more complex dual-boot environment. In fact I completed backups of my data overnight on this install, should I have time to re-install my system here today. I don't see any difference between dual boot or a single-boot install sorry. – guiverc Apr 25 '25 at 23:29
  • @guiverc I suspected that my Ubuntu system is corrupt. For example, I couldn't install R on my ubuntu with apt. So I'd like to do a clean reinstall if possible. – tcollar Apr 25 '25 at 23:43
  • If you non-destructively re-install (ie. unclean install) then you'll fix package issues but any problems in your user setup (ie. in config files in $HOME or anything specific to your user account & saved settings) will survive. A clean install means nothing from the prior install survives so all problems are gone (along with all data; after all a 'clean' install gives you a brand new system with nothing remaning). Both can be done; clean where nothing survives from prior install has best chance of success, and both can be done in dual boot environments. – guiverc Apr 26 '25 at 00:14
  • A clean install means you start with a fresh unused (ie. new) system. You then restore you data from backups; the unclean or non-destructive re-install is an alternative that means data restoration isn't required. Different alternatives that accomplish similar (what gets restored after clean install you can control; the non-destructive or unclean install changes less possible by default) – guiverc Apr 26 '25 at 00:18

1 Answers1

1

I think I figured it out. Here're the steps:

  1. Download a Linux distro and create a live USB.
  2. Boot up from the live USB to the Linux distro.
  3. Check the size of the partition that currently has Ubuntu on it by sudo fdisk -l. Ignore home and swap partitions. Remember the size of the root partition.
  4. Select to install the new distro.
  5. When asked about "Installation Type", choose "Something else" (or "Manual installation" in some distros).
  6. In the partition table, find the Ubuntu root partition. Double check the size and make sure it matches with the root partition.
  7. Delete the partition. Now you have a free space of the same size (or more if you have had free space before the deletion).
  8. Create a new partition from the free space. The type of the partition should be "primary" and mount it as "/".
  9. Check the "Format?" box so the new partition will be wiped out. If you want to keep files, do not check the "Format?" box.
  10. If you want to keep an existing home partition, you need to mount it as home again.
  11. Proceed to create user name and password. If you want to access an existing home partition, make sure you use exactly the same user name and password. Otherwise you will have authorization issues.

That's it. You can dual boot as usual.

Update on 04/26/2025:

I tried the method above and it worked. The only unexpected thing was a warning saying something like "efi partition is missing. If you proceed you won't be able to boot blah blah." I quit the installation and made sure I booted from the UFEI flash drive (some systems show two USB devices, one with UFEI in the name and the other without; choose the one with UFEI). If you are sure you booted from the UFEI flash drive, you should be fine.

As it turned out, Calamares provides an even simpler way to replace the ubuntu (replace here means clean slate reinstallation of a new distro). It is called "Replace Partition". With this option, you don't need to worry about deleting/creating partitions, the efi warnings, or existing home/swap partitions. You simply select the partition where the root of the outgoing Ubuntu is located and proceed with installation. Calamares will take care of the rest.

The whole process is like a breeze! It is truly worry free. Note the partition you choose will be wiped clean by default. This is exactly what I want, because I suspect my old system is corrupted. After the re-installation, everything works, including some packages I couldn't install before.

Happy Ubuntu'ing!

tcollar
  • 17