Repartitioning an old system

I have an older system. It was originally installed with F24 so it has a 1GB /boot partition on a 1TB disk.

I have to delete older kernels to get newer ones to install, which is annoying. I would like to expand the boot partition.

I have tried KDE Partition Manager, Gnome Disks, and GParted under both Gnome and KDE/Plasma. None of them will allow me to dismount the data partition. KDE Partition Manager said something about being unable to dismount 3 logical drives. There are only an sda1 and sda2 that I can see.

Is there a way to repartition the disk (without losing data) or do I have to do a full install?

I can easily fit 5 kernels into 1GB /boot with some tweaks.
That depends on the type of HW (GPU) your system has.

this system has currently 4 kernels + rescue kernel installed

$ df /boot/
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/nvme0n1p5    996780 632852    295116  69% /boot

$ ll /boot/initramfs-*
-rw-------. 1 root root 203217454 Oct 21 13:25 /boot/initramfs-0-rescue-567c7e0e03b242e4b5d672cc22fffe54.img
-rw-------. 1 root root  75149207 Oct 21 13:24 /boot/initramfs-6.17.4-300.fc43.x86_64.img
-rw-------. 1 root root  75153208 Oct 24 17:52 /boot/initramfs-6.17.5-300.fc43.x86_64.img
-rw-------. 1 root root  75158714 Oct 31 01:12 /boot/initramfs-6.17.6-300.fc43.x86_64.img
-rw-------. 1 root root  75162806 Nov  2 20:00 /boot/initramfs-6.17.7-300.fc43.x86_64.img

running Fedora updated since F24 collects a lot off old cruft, so I would recoment new install.

OTH you could try sysrescue running from an USB Stick with gparted buildin

1 Like

You should boot a live system from USB and use gparted or gnome disks whichever is available. But it depends on how the disk was partitioned and some configurations may not allow to resize your partitions.

Don’t use fdisk or parted because when resizing a partition you also need to resize the file system contained in that partition. The gparted utility knows how to resize both the partition and file system.

All true, but I’d recommend first to look into options to reduce the size of the initramfs files.
Should have checked the hash tags. My system also has a nvidia gpu, and usually you can ignore most of the nvidia gsp firmware files or omit the nouveau driver, debloating the initramfs files even more.

Delete the rescue kernel. You likely never need it and if you do you can boot a live iso and chroot into your system.

1 Like

Used the rescue image the other day to recover from problems after an upgrade. however.

And to be recreated at the next kernel update. What did I miss? :slight_smile:

I have an Nvidia GeForce GTX 950. Recently the initramfs ballooned from 105MB to 168MB. Right now they’re about 149MB.

I thought I’d taken out the nouveau driver, but that was probably a few upgrades ago. DNFDragora was useful in picking through files to install/uninstall, but that stopped working after the f42 upgrade.

thanks for the warning on fdisk & parted.

I’ll look around to see what I have in USB sticks.

1 Like

quick and dirty: rename, delete or truncate the GSP FW files in

# ll /usr/lib/firmware/nvidia/ga102/gsp/gsp*
-rw-r--r--. 1 root root 25639648 Oct 21 02:00 /usr/lib/firmware/nvidia/ga102/gsp/gsp-535.113.01.bin.xz
-rw-r--r--. 1 root root 51324396 Oct 21 02:00 /usr/lib/firmware/nvidia/ga102/gsp/gsp-570.144.bin.xz

you probably can do the same with these

 $ ll /usr/lib/firmware/nvidia/tu102/gsp/gsp*
-rw-r--r--. 1 root root 12589816 Oct 21 02:00 /usr/lib/firmware/nvidia/tu102/gsp/gsp-535.113.01.bin.xz
-rw-r--r--. 1 root root 13371848 Oct 21 02:00 /usr/lib/firmware/nvidia/tu102/gsp/gsp-570.144.bin.xz

you need to repeat this after every update of nvidia-gpu-firmware.

Or you could configure dracut to omit the nouveau driver from initramfs

$ cat /etc/dracut.conf.d/omit_nouveau.conf
omit_drivers+=" nouveau "

see man dracut.conf, important the space between the driver name and the quotation marks is mandatory!

which is weird since I can see it in Dolphin. I tried “sudo cat /etc*” and got the same error. I also tried putting the file in /usr/lib/dracut/dracut.conf.d - same error

Pardon me while I go pound my head on the wall.

ofc, it does not exist yet. it was an example

sudo vi …

or

echo 'omit_drivers+=" nouveau "' | sudo tee /etc/dracut.conf.d/omit_nouveau.conf

then run sudo dracut -f to recreate the initramfs for the current kernel version. Boot the same kernel to test.

If you remove the package dracut-config-rescue the rescue image won’t be generated.

2 Likes

or:

sudo echo ‘dracut_rescue_image=“no”’ > /etc/dracut.conf.d/02-rescue.conf

I had to delete the oldest kernel before the current one had enough space to rebuild, but it dropped the size from 149MB to 47.5MB.

System rebooted okay.

Still need to look into re-installing the OS

You could have deleted the initramfs file, which was going to be regenerated anyway, or moved it to another filesystem.

You can now try to regenerate the initramfs files for the other installed kernels.
To be sure, backup the initramfs files first.

Then sudo dracut --kver kernelversion -f, replace kernelversion with the version for the kernel you want to regenerate the initramfs file.
e.g. dracut --kver 2.6.40-1.rc5.f20

You can also use --regenerate-all instead of --kver <kernelversion> but this will recreate initramfs files for all kernels including the rescue kernel.

At this point, I wouldn’t reinstall just to extend /boot to 2GB.

I’m thinking about. Not going to do anything for a while. Not going to f43 until I can figure out if the Wacom tablet will work properly (it’s a bit squirrely on Wayland).