Personal computing discussed

Moderators: renee, SecretSquirrel, notfred

 
bthylafh
Maximum Gerbil
Topic Author
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

/boot too small

Wed Apr 04, 2018 10:41 pm

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.
Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
whm1974
Emperor Gerbilius I
Posts: 6361
Joined: Fri Dec 05, 2014 5:29 am

Re: /boot too small

Thu Apr 05, 2018 3:31 am

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.
 
chuckula
Minister of Gerbil Affairs
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: /boot too small

Thu Apr 05, 2018 7:12 am

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.
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
just brew it!
Administrator
Posts: 54499
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: /boot too small

Thu Apr 05, 2018 7:27 am

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.
Nostalgia isn't what it used to be.
 
chuckula
Minister of Gerbil Affairs
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: /boot too small

Thu Apr 05, 2018 7:30 am

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
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
just brew it!
Administrator
Posts: 54499
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: /boot too small

Thu Apr 05, 2018 7:56 am

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.
Nostalgia isn't what it used to be.
 
Waco
Maximum Gerbil
Posts: 4850
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: /boot too small

Thu Apr 05, 2018 8:09 am

If you're using LVM already, you could just expand the /boot partition as well.
Victory requires no explanation. Defeat allows none.
 
just brew it!
Administrator
Posts: 54499
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: /boot too small

Thu Apr 05, 2018 8:13 am

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.
Nostalgia isn't what it used to be.
 
bthylafh
Maximum Gerbil
Topic Author
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: /boot too small

Thu Apr 05, 2018 8:16 am

It is not. /boot is a plain ext2 partition.
Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
Waco
Maximum Gerbil
Posts: 4850
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: /boot too small

Thu Apr 05, 2018 8:28 am

Ah, gotcha. I blame pre-coffee haze combined with a TSA/airline headache this morning. :)
Victory requires no explanation. Defeat allows none.
 
bthylafh
Maximum Gerbil
Topic Author
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: /boot too small

Thu Apr 05, 2018 8:45 am

LEEROY JENKINS!
Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
bthylafh
Maximum Gerbil
Topic Author
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: /boot too small

Thu Apr 05, 2018 8:47 am

Yep, that did it. Thanks for pointing out that entry in the Arch wiki - the Grub module for LVM wasn't loaded before.
Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
chuckula
Minister of Gerbil Affairs
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: /boot too small

Thu Apr 05, 2018 8:58 am

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!
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On