Results 1 to 5 of 5

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

  1. #1

    Default 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 https://doc.opensuse.org/documentati...cha-grub2.html). 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.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,855
    Blog Entries
    3

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

    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.
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,966

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

    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
    Code:
    fdisk -l
    Henk van Velden

  4. #4

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

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

    Henk, apologies for the omission.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,966

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

    Nice you got it. Good for your self confidence.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •