cp -r /boot /boot2
umount /boot
mv /boot2 /bootAlso, where did boot2 come from? Because a lot of these machines don't have free space sitting around, and some of them are still using MBR partitions and don't even have the ability to create a new partition. (You might well object that nobody even makes machines with bios boot anymore and surely everybody must be using GPT, at which point I get to gesture at the astonishing number of cloud virtual machines that are somehow not even capable of UEFI booting)
Edit: s/on bootable/unbootable/
Only because Linux bootloaders suck as they completely fall over when misconfigured. It was implied that you update the configuration of the bootloader to be able to find the new partition that holds /boot. You would also want to format the former boot partition so that you can reuse for other stuff.
>Also, where did boot2 come from?
The cp command creates it
> Only because Linux bootloaders suck as they completely fall over when misconfigured.
Have you got a bootloader that doesn't do awful things when it has no configuration? I mean, I guess you could write a bootloader that searched through available filesystems and tried to find something it could boot, but that seems like a great way for unexpected surprises on boot (what, you didn't want to default to booting this 6-month-old backup kernel?)
(And it's not just the bootloader config that you have to deal with - like I said, you have to do something to tell the firmware to even run that bootloader)
Then let me explain with English:
Move all of your files from the boot partition into the main partition. Then setup the system to boot from the main partition. Since there is likely gigabytes to terabytes free you will not need to worry about a few 30 MiB files being added to the /boot directory.
Which can be reused to store other files.
>You'd pretty much be stuck with ext4 as your most modern filesystem option.
What do you mean? You can grub boot from a partition that even uses LUKS and ZFS.
However I do got one where UEFI boots the linux kernel directly, /boot is the EFI parition. And there it feels like a bit of a waste to have to expand /boot or insert a bootloader into the boot process because initramfs is getting bloated with files that aren't critical to mounting root.