0

I have an old installation of 18.04 LTS.

  • /home is on /dev/sda. I want to leave this untouched
  • System and everything else is on /dev/nvme0n1p1 and /dev/nvme0n1p2 (swap I think)

I have a bootable USB drive with 22.04 LTS, and I want a fresh install which leaves /dev/sda untouched, and remaining configured for /home.

The installations options presented were not obvious to me - they all warned I was about to destroy all my file.

When I select "Choose Something Else", I am offered a partition editor. I've used such editors before, but I wasn't sure how to ensure that /dev/sda does not get destroyed.

What instructions or menu options should I be selecting?


UPDATE:

So in my impatience, I selected the option to erase Ubuntu and re-install. It felt risky, but it was the only option which explicitly told me what it intended to do. It said it was going wipe both partitions on /dev/nvme0n1, and made no mention of /dev/sda.

The result is that I now have a fresh install of 22.04 LTS on /dev/nvme0n1, and /dev/sda appears as a mounted SSD drive.

All my data under /home/stewart is present, which is great!

But now I want to tell Ubuntu to use this device of my /home, not the one it created under on the installation device.


Responding to Paul Benson, these are my partitions:

$ sudo parted -l
Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags 1 1049kB 500GB 500GB ext4 SSD

Model: Samsung SSD 970 PRO 512GB (nvme) Disk /dev/nvme0n1: 512GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:

Number Start End Size File system Name Flags 1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp 2 538MB 512GB 512GB ext4

Stewart
  • 586
  • 1
    From Live Ubuntu, run sudo parted -l and post output – Paul Benson Nov 25 '23 at 15:41
  • @PaulBenson Update added. Hopefully my impatience won´t frustrate your effort to help me. I went ahead and chose an installation option. – Stewart Nov 25 '23 at 16:21
  • 1
    I found some useful instructions here. https://help.ubuntu.com/community/Partitioning/Home/Moving – Stewart Nov 25 '23 at 16:34
  • And also here. https://www.linuxjournal.com/content/installing-ubuntu-two-hard-drives – Stewart Nov 25 '23 at 16:34
  • 1
    My understanding is that sda1 is still your 'Home' folder, as that is where you originally installed it and it was left untouched. And you re-installed your root folder on nvme01p2 Can you confirm this? So what is your problem? Are you saying you have an additional new 'Home' folder which is now the default? – Paul Benson Nov 25 '23 at 19:06
  • 1
    I'll add a link to https://askubuntu.com/questions/446102/how-to-reinstall-ubuntu-in-the-easiest-way/1451533#1451533 where I wrote an answer on re-installing Ubuntu Desktop systems (& flavors) that would allowed you to upgrade your existing system to the newer release (non-destructively). When you select "Something else" its more a partition viewer as you select which you want to use (though it can delete/add so has edit functions). If you're not happy with editing, I'd just recommend using gparted or other app you are more comfortable with, then use the partition viewer to select – guiverc Nov 25 '23 at 21:27
  • 1
    On the new system, the file-system table or /etc/fstab file controls what is mounted & where it is mounted. You can add an entry to mount your older bionic (18.04) home partition so it's used instead of the /home directory (which will exist on the new partition of the new install; which will cause the newer directory to be shadowed. Be warned, this can be problematic in the future if you forget what you did; as you'll have two /home directories, though 1 will be not seen when operating, but if you use a live system rather than installed, you'll find both still... – guiverc Nov 25 '23 at 21:29

1 Answers1

1

You should have (and probably should) boot from your install medium, choose the "Something Else" install option.

Configure /dev/sda as /home and (this is crucial) UNCHECK the box in the "Format" column for/dev/sda. DO NOT FORMAT /dev/sda.

I use this method for all my upgrades.

System configuration and customization information must be saved on /home, or recreated.

The Method:

  • /home on a separate partition.
  • "Something Else" install option.
  • /home configured correctly.
  • UNCHECK the box in the "Format" column.
waltinator
  • 36,399
  • I appreciate this answer. I did try selecting "Something Else", but on the next screen, there was no option to configure /dev/sda as /home, and no checkbox for formatting or not. I wish I had been able to take a screenshot. – Stewart Nov 25 '23 at 16:48
  • It would never be sda as that is a drive, not a partition. But it looks like you /home is still inside your old install which makes the paths different. Better to then move /home to its own partition like sda2 and then use the link on moving /home as it assumes it is a separate partition and not a sub-folder. – oldfred Nov 25 '23 at 18:39