Merging sda1/sda2 partitions in YAST without losing grub boot on sda3

This computer has Tumbleweed installed on sda3, with the ‘Write to Partition’ setting checked in YAST → Boot Loader → Boot Code Options. sda1 and sda2 (formerly occupied by Windows) are free. Boot is BIOS. The sda3 Tumbleweed partition is formatted as ext4, and does not have a swap partition.

I want to combine sda1 and sda2 as a single storage partition.

If I combine them, I assume I’ll then have a big sda1, and the formerly-on-sda3 Tumbleweed now on sda2. My concern is that grub then won’t know on reboot where to find the boot code, and will halt.

I think I can get around this in YAST by:

  • YAST → System → Partitioner to delete sda2 and to resize sda1. (With both sda2 and sda1 unmounted first.)

  • YAST → System → Boot Loader to change and restore a setting, to induce a reinstallation of the boot loader. (At least if I correctly understand the ‘Reinstalling the Boot Loader’ section at The boot loader will then be reinstalled on the formerly-sda3/now-sda2 partition, and the computer should boot normally.

Does this sound right?

I’ve created and resized partitions before in gparted, but haven’t yet done anything like the task described in this post, so thought I’d ask here first.

I’ll make a copy of the whole disk first, to be safe.

I would just delete partition 1 and 2. And then create a new partition 1. That will give you what you want.

You will then have “/dev/sda1” and “/dev/sda3” but no “/dev/sda2”. The partition numbering is based on the slot used in the partition table, and not on the relative position on the physical disk.

If you are set for booting from a partition, that should still work (as long as “/dev/sda3” is still flagged as the active partition). However, I would recommend having a bootable USB live system available in case you need to boot it for repairs.

I support @nrickert, but be aware that the advice is based on what you say and not on what you showed. Because you showed nothing.

When asking about your partitions, the minimal you should show is of course

fdisk -l

Worked! Thanks very much, nrickert. I did the job in gparted.

Henk, apologies for the omission.

Nice you got it. Good for your self confidence. :wink: