[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hmmm... /boot is too small. what's the best way to increase it's size?



On Sat 09 May 2020 at 20:05:48 (-0700), Rick Thomas wrote:
> I recently did a "apt update ; apt upgrade" and it died for lack of space in /boot when trying to install the latest kernel.
> 
> I purged a couple of old kernel packages (still present in the 'stable' repo, so they weren't obsolete) to make enough space and tried again.  Worked this time, but I would have liked to have the old kernels around as fallbacks just in case of a regression...
> 
> Here's the disk layout:
> 
> rbthomas@milli:~$ lsblk
> NAME                  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> sda                     8:0    0 111.8G  0 disk 
> ├─sda1                  8:1    0   512M  0 part /boot/efi
> ├─sda2                  8:2    0   244M  0 part /boot
> └─sda3                  8:3    0 111.1G  0 part 
>   ├─debian--vg-root   253:0    0    28G  0 lvm  /
>   ├─debian--vg-swap_1 253:1    0   7.9G  0 lvm  [SWAP]
>   └─debian--vg-home   253:2    0  75.2G  0 lvm  /home
> sdb                     8:16   1   239G  0 disk 
> └─sdb1                  8:17   1   239G  0 part /media/rbthomas/Spare
> mmcblk0               179:0    0 238.3G  0 disk 
> └─mmcblk0p1           179:1    0 238.3G  0 part /media/rbthomas/Downloads
> rbthomas@milli:~$ 
> 
> rbthomas@milli:~$ df -HTP | grep -v tmpfs
> Filesystem                  Type      Size  Used Avail Use% Mounted on
> /dev/mapper/debian--vg-root ext4       30G  9.9G   19G  36% /
> /dev/sda2                   ext2      248M   78M  158M  34% /boot
> /dev/sda1                   vfat      536M  144k  536M   1% /boot/efi
> /dev/mapper/debian--vg-home ext4       79G  4.4G   71G   6% /home
> /dev/sdb1                   ext4      252G   63M  239G   1% /media/rbthomas/Spare
> /dev/mmcblk0p1              ext4      251G   63M  238G   1% /media/rbthomas/Downloads
> rbthomas@milli:~$ 
> 
> 
> What's the best way to increase the size of /boot ?
> 
> I can easily create a gig or so of space by a shrink/resize of /home, but how do I add that space to /dev/sda2 ?
> 
> I can't just move up the end of /dev/sda2 = start of /dev/sda3 without backing up and restoring, can I?

Apparently you have at least two kernels in under 80M, so one wonders
how many you need to have available for booting at any one moment.

If the answer is many, you could shrink some of them by rebuilding
their initrd.img files with MODULES=dep, which could reduce each
kernel's size from ~40M to <10M.

75G for /home is pretty small (the only disk I have that small is a
2004 laptop) so I'd look for an opportunity to repartition in the
near to mid-term. (Is this one that you've converted to sysv, for
example, or is it encrypted—excuses like that.)

All of which assumes that you actually need a separate /boot …
… and that you didn't repartition it already, before dawn.

Cheers,
David.


Reply to: