Change boot partition in Tumbleweed

Working with Tumbleweed for 5+ years
Updated monthly with zypper dup
Install is on ext4, no btrfs
Installed in a partition on a nvme drive

That partition is now almost full, no room for the last zypper dup
Luckily I have on the same drive an unused partition with plenty of room.
I copied a snapshot from my current working Tumbleweed with the timeshift app to that empty partition.
But I do not know how to activate that partition.
Tried with Yast Bootloader
grub2 for efi is current
But the partition is not visible in default boot option in yast
I see a lot of posts the last couple of months with grub/efi changes, and I am not sure what a simple solution is.
I have to update the grub/efi config, but how?
I have already changed the fstab on the new partition to the new UUID
nvme0n1p5 is the partition that want to boot from.

Can someone give me advice?

nvme0n1 259:0 0 465,8G 0 disk
├─nvme0n1p1 259:1 0 1000M 0 part /boot/efi
├─nvme0n1p2 259:2 0 1000M 0 part
├─nvme0n1p3 259:3 0 39,1G 0 part /
├─nvme0n1p4 259:4 0 39,1G 0 part
└─nvme0n1p5 259:5 0 55,9G 0 part

Current Tumbleweed default partitioning:

erlangen:~ # fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 970 EVO Plus 2TB            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F5B232D0-7A67-461D-8E7D-B86A5B4C6C10

Device              Start        End    Sectors  Size Type
/dev/nvme0n1p1       2048    1050623    1048576  512M EFI System
/dev/nvme0n1p2    1050624 3804628991 3803578368  1.8T Linux filesystem
erlangen:~ # lsblk -f /dev/nvme0n1
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
├─nvme0n1p1 vfat   FAT32       19CF-0B54                             510.4M     0% /boot/efi
├─nvme0n1p2 btrfs              0e58bbe5-eff7-4884-bb5d-a0aac3d8a344    1.3T    28% /var
│                                                                                  /root
│                                                                                  /usr/local
│                                                                                  /opt
│                                                                                  /srv
│                                                                                  /home
│                                                                                  /boot/grub2/x86_64-efi
│                                                                                  /boot/grub2/i386-pc
│                                                                                  /.snapshots
│                                                                                  /
erlangen:~ # 

Keep it simple and go with defaults.

Thanks for that invaluable advice!
But not what I asked
Do you also have a answer for my question.
I want the disk in the same status as it now is, I do not want btrfs.
I was just asking if someone knew the command so I could update the grub2/efi config.
No discussion over file systems or other things.
Your time is valuable, my time also.

Is this of any help to the OP?
Please stop posting information that only seems to say: throw anything away, and start all over again in the way I, Karl, think is the best one.



Why don’t you just use Gparted to resize your partition ext4?

You won’t have to make any changes in Grub2, or fstab if you keep part of the “large partition”.

The easiest way might be to boot into your current system then changeroot into your system on nvme0n1p5 and run grub2-install and after that grub2-mkconfig -o /boot/grub2/grub.cfg.

While his partition listing is not one of the easiest to understand, I think it looks like the present root partition is sda3 and the new one is sda5, with sda4 in between. Thus enlarging is not simple.

Thanks for this answer
I’m not novice in Linux, but some things never done.
I’m cautious not to destroy my current working system.

in my current running tumbleweed :
make a directory p5 in /mnt
Mount the nvme0n1p5 partition in “/mnt/p5”
chroot /mnt/p5
and do the commands as you describe.
Is that the path to follow?

Yes I know gparted but I know that there are some risks in playing with sizes.
I have a large free partition so why not use that.
I did not know that is was difficult to add a partition to the grub2/efi bootmanager.

I usually do (as “root”):

mkdir /mnt/p5
mount /dev/nvme0n1p5 /mnt/p5
mount /dev/nvme0n1p1 /mnt/p5/boot/efi
mount -o bind /dev /mnt/p5/dev
mount -o bind /sys /mnt/p5/sys
mount -o bind /run /mnt/p5/run
mount -o bind /proc /mnt/p5/proc
chroot /mnt/p5
grub2-mkconfig -o /boot/grub2/grub.cfg


Gparted is very reliable. He never let me down in all these years.

Why do you absolutely want to modify grub2 when fstab manages the partitions?

If you really want to tweak the grub2 files, the official documentation can provide you with more information:

I don’t know how timeshift works but doing a copy of the root directory of a running system might cause problems.

Thanks, this are commands that I understand.
Now I’m gathering up the courage to exercise this :blush:

Please note susejunky’s remark! His commands are OK, but is your copy?

I also do not know what timeshift is. But what you need is a byte for byte copy of the partition while it is not in use (unmounted). My advice is dd, but there may be some more “sophisticated” tools that might be able to do the same.

It copies all directories
It is a kind of shell for rsync
The directories dev/sys/run/proc are copied without content
I have my home directory on another drive so that’s no problem i think.

In the past 4 years I have recovert 2 times a snapshot, that went well.
fingers crossed.
Is there a better route?

I’m a kind of scared with dd
I have a friend who once issued a command witch emptied his root drive (oops wrong command)
What sophisticated apps are there?

As I’m not familiar with timeshift I can’t tell what’s “better”.

However I would follow @hcvv advice:

  • Start up a LIVE- or Rescue-system
  • Copy nvme0n1p3 to nvme0n1p5 with dd
  • Expand the ext4 filesystem on nvme0n1p5 to cover the whole partition.
  • Repair the boot situation as already described.

They will erase your root partition in the same way if you use them wrongly in the same way.

I never use these what I call “sophisticated” tools. Because then you have to see that you remove all sophistication and press them to do just one thing: copy byte by byte (like dd does > 40 years already).

I would never trust a copy on the file level of a running system to be an exact copy, but your mileage may vary. (maybe your finger crossing did help :wink: )

If system is booted from the current root partition (and not from the live medium) /boot/efi partition is already mounted so this is not possible. It should be mount --bind (or umount it first).

Also on EFI platform Tumbleweed needs additionally

mount -o bind /sys/firmware/efi/efivars /mnt/p5/sys/firmware/efi/efivars

otherwise NVRAM cannot be updated from within chroot.

I am really tired of posting it over and over again and nobody apparently listening, but - the correct way to reinstall bootlader on (open)SUSE is

update-bootlader --reinit

unless you took some efforts to actually understand the configuration and to find out exactly what bootloader is used, how it is configured and what commands to reinstall it are needed. Blindly using grub2-install without as much as even trying to find out the above will have high probability of introducing hard to troubleshoot misbehavior (which could strike after a long time so nobody will remember and associate problems with this command). On EFI it is not that bad - the worst that can happen is inability to boot due to Secure Boot.

Yes, indeed! Sorry, my fault (I use LIVE media in most cases).

So mount -o bind /sys /mnt/p5/sys will not suffice?

I never used update-bootloader on any of my systems (and all of them are still up and running) so I cannot comment on this.

Ah, to late for me
I have run those commands already and my grub config has changed.

I’m now running from the P5 partition(P5 see above) .
What i have done:
On my existing running install
run the (wrong) commands grub2-install grub2-mkconfig -o /boot/grub2/grub.cfg
The boot options contain after this the de p5 partition.
Made a new snapshot with Timeshift from my existing partition and wrote it to P5.
Timeshift automatic alters my fstab on the new P5 partiton with the correct UUID for /
Took a deep breath, closed everything and did a reboot.
Now I could chose to start from P5 and was running from the new partition
pff lucky me.

Is it wise to run the update-bootlader --reinit after this or is the possible harm already done?