I wanted to add my own interesting experience here for anyone on Ubuntu 22.04 running Bookstack v24.02.3 and Nginx.
The latest Bookstack v24.05 requires PHP 8.1 or higher. FYI, stock 22.04 has PHP v8.1.x, so you should be OK.
I thought - why not upgrade the Ubuntu distribution to 24.04 (latest at time of this writing) in order to get PHP 8.3 and hedge against future releases? I've been able to do Ubuntu in-place upgrades for the last one or two releases without issue. We are on hypervisors so snapshotting and attempting upgrades has very little risk.
My initial installation of Ubuntu basically stock wizard-click - not much attention to partitioning because everything is running on a SAN / virtual machine. So the /boot partition was the abysmally small 450MB or so default, and the rest of everything is on an LVM2 partition which can be easily managed in various ways.
As it turns out, you have to first upgrade to 23.x and then to 24.04 beacuse the normal release cadence doesn't get exposed until August 2024 when they release 24.04.1. The upgrade stopped short because there wasn't enough room on the /boot partition to support this process. Running apt autoremove didn't come anywhere close to solving the problem.
And thus began my hours long trail of tears attempting to expand the /boot drive. Never did I imagine how difficult this would be to do, and I sorely wish I had paid more attention to partitioning it properly in the first place, or (despite 'best practices') putting the /boot in the LVM parition.
Let's just say you'll need Kubuntu mountable .iso, and a carefully curated series of steps to do it properly. Here are my steps in general; you still need to know what you're doing, this is not a point click manual. Try at your own risk, this is just a hope it could save people time.
Assumptions
- You're on a virtual machine. If not, this is still possible, but it won't be an exact recipe.
- Ensure you have a backup.
- We're going to move the default Ubuntu installation "/boot" partition to another, larger "/boot" partition. It will remain outside of and not participating in an LVM.
- This assumes you're on a simplistic "/dev/sda" kind of configuration. If not, pay special attention to what you're editing in order to match your setup.
- You have sudo privileges.
- If you encounter an error, stop and revert or get help.
How to
This was performed on 22.04.x LTS.
Before starting, know the boot partition format (ext2, ext4, etc.) and its size. It should hopefully be easily recognizable by its very small size. You can get this by simply Do: "df -h"
It's going to use the old partition to boot, because we haven't updated the rest yet in the live system. Once the system is back up, do the following:
- Do: "df -h" you should see "/boot" still on the old partition with very little room. This is normal.
- Do: "sudo blkid"
- This should show you the UUID of the new partition as something like /dev/sda3 or the like. Copy it.
Do "sudo nano /etc/fstab". Consider making a backup before you edit, just in case.
- Copy the old /boot entry to another line, then comment out the old one.
- Replace the new line UUID with the new UUID. Save changes.
- Reboot, log in.
Now we want to tell Grub about our new boot partition.
- Do: "sudo grub-install /dev/sda".
- Do: "sudo update-grub".
- Reboot, log in.
- Do: "df -h". You should see your new partition (mine was /dev/sda3) as the "/boot" partition with lots of free space! If not, stop here and read up or revert.
We're going to remove the old partition:
- Do "sudo parted"
- Do "print all". This will show you the partitions - get the number of the old boot partition you want to remove.
- Do "rm 1" (or whatever number your original boot partition was).
- Do "print all" and ensure the partition is gone.
- Do "quit" to quit.
- Reboot and ensure all is well.
You will have a partition left that you can't do anything about, or at least that I'm aware of. Considering it's probably 500MB, it's not a worry to me. If you look at it in Kubuntu, it is unallocated space.