Page 1 of 1

/boot too small

Posted: Wed Apr 04, 2018 10:41 pm
by bthylafh
For reasons that totally made sense at the time, my Linux server has a 250 megabyte /boot volume. This is now uncomfortably small (InitRDs are stupid big now) and I want to switch to just / without a separate /boot.

The current / is ext4 and an LVM volume. The OS is Ubuntu Server 16.04. Can I simply update /etc/fstab, comment out the line for /boot, move that partition's contents into the corresponding /boot directory on the / partition, then update grub and profit? I don't really understand LVM and use it only because the Ubuntu installer did a good job of selling its future-proof capabilities.

If I can't do this easily, eh, it's getting about time to buy a bigger disk for that computer anyway and that'll give me an excuse to redo it less wrong.

Re: /boot too small

Posted: Thu Apr 05, 2018 3:31 am
by whm1974
I have never made a separate /boot partition, but instead have:

First SSD
/
/home
swap

Second SSD
/games

In very few cases, if any a normal user wouldn't need a /boot anyway.

Re: /boot too small

Posted: Thu Apr 05, 2018 7:12 am
by chuckula
Separate boot partitions are a bit of an artifact from the bad old days. I haven't had one in a long time.

The current / is ext4 and an LVM volume. The OS is Ubuntu Server 16.04. Can I simply update /etc/fstab, comment out the line for /boot, move that partition's contents into the corresponding /boot directory on the / partition, then update grub and profit? I don't really understand LVM and use it only because the Ubuntu installer did a good job of selling its future-proof capabilities.


That should work OK. As long as the bootloader is setup to grab vmlinuz and your initrd from the correct partition at boot, then changing the physical partition location of /boot to be in the larger partition should be ok. Watch out for the possibility of the bootloader not recognizing the partition on the first bootup though. Keep backups of your grub.cfg file and maybe a bootable USB key as a debugging option until you are sure it works.

Re: /boot too small

Posted: Thu Apr 05, 2018 7:27 am
by just brew it!
LVM might cause some additional complications though. I'm not sure if there are any additional steps required to get grub to load the system from an LVM volume. The grub-install tool may take care of this automagically for you, but then again it might not.

Re: /boot too small

Posted: Thu Apr 05, 2018 7:30 am
by chuckula
just brew it! wrote:
LVM might cause some additional complications though. I'm not sure if there are any additional steps required to get grub to load the system from an LVM volume. The grub-install tool may take care of this automagically for you, but then again it might not.


That's potentially true. Assuming your system is modern enough, Grub2 is purportedly supposed to be OK with booting from LVM partitions.

Read this post and take an appropriate salt dosage with it: https://askubuntu.com/questions/76095/w ... rtitioning

Re: /boot too small

Posted: Thu Apr 05, 2018 7:56 am
by just brew it!
chuckula wrote:
just brew it! wrote:
LVM might cause some additional complications though. I'm not sure if there are any additional steps required to get grub to load the system from an LVM volume. The grub-install tool may take care of this automagically for you, but then again it might not.

That's potentially true. Assuming your system is modern enough, Grub2 is purportedly supposed to be OK with booting from LVM partitions.

Read this post and take an appropriate salt dosage with it: https://askubuntu.com/questions/76095/w ... rtitioning

I'm sure there's a way to make it work; I'm just not sure how automatic (or not) getting it set up will be. Worst case, grub may still need to load from the existing /boot partition.

Re: /boot too small

Posted: Thu Apr 05, 2018 8:09 am
by Waco
If you're using LVM already, you could just expand the /boot partition as well.

Re: /boot too small

Posted: Thu Apr 05, 2018 8:13 am
by just brew it!
Waco wrote:
If you're using LVM already, you could just expand the /boot partition as well.

I assumed that LVM was being used for the root partition but not /boot.

Re: /boot too small

Posted: Thu Apr 05, 2018 8:16 am
by bthylafh
It is not. /boot is a plain ext2 partition.

Re: /boot too small

Posted: Thu Apr 05, 2018 8:28 am
by Waco
Ah, gotcha. I blame pre-coffee haze combined with a TSA/airline headache this morning. :)

Re: /boot too small

Posted: Thu Apr 05, 2018 8:45 am
by bthylafh
LEEROY JENKINS!

Re: /boot too small

Posted: Thu Apr 05, 2018 8:47 am
by bthylafh
Yep, that did it. Thanks for pointing out that entry in the Arch wiki - the Grub module for LVM wasn't loaded before.

Re: /boot too small

Posted: Thu Apr 05, 2018 8:58 am
by chuckula
bthylafh wrote:
Yep, that did it. Thanks for pointing out that entry in the Arch wiki - the Grub module for LVM wasn't loaded before.


Glad to see you are back in business!