0

I know how to use gparted on a livecd to resize partitions, but here it's a bit more complex and I don't want to screw it up. I have a /boot which is ridiculously small (can hold only one kernel at a time, so it's very contrived to upgrade). Here's the setup:

$ sudo fdisk -l /dev/sda Disk /dev/sda: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disklabel type: dos Disk identifier: 0x000f146d Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 501758 1000214527 999712770 476.7G 5 Extended /dev/sda5 501760 1000214527 999712768 476.7G 83 Linux $ lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT sda ├─sda1 ext2 1.0 25830e25-c61f-466b-9239-ced150ccf577 58M 70% /boot ├─sda2 └─sda5 crypto_LUKS 1 3102b8d0-a320-49db-b764-1a23c495ab20 └─sda5_crypt LVM2_member LVM2 001 WJjfMf-xUhh-2iob-ow9v-RWfN-TG9L-cc3GOz ├─kubuntu--vg-root ext4 1.0 003987e7-8317-4cd2-b47b-561378ea0245 52G 84% / └─kubuntu--vg-swap_1 swap 1 3e69be10-8e23-4460-a16f-74ffef8fe290 [SWAP] 

Seems to me, before I can enlarge /dev/sda1, I need to shrink /dev/sda2 (or is that /dev/sda5 ?), move it forward and then enlarge /dev/sda1. But since /dev/sda2/5 is an encrypted partition holding the system, maybe I need to do extra things to /dev/sda5(_crypt) ?!?

As you can tell, I don't have a clear understanding of the relationship between sda2, sda5 and sda5_crypt. Note that those are listed here as seen from the booted system, not from the liveCD.

2
  • I do not know LVM, but you have the old MBR partitions. So sda2 is an extended partition and sda5 is fully using it. And then your LVM volumes fully use sda5. Now much better to use gpt, but that may erase drive, so you only want to convert when doing major reinstall or new drive. Your 243MB is not real small for /boot. Have you housecleaned it? askubuntu.com/questions/852019/… & askubuntu.com/questions/196125/… Commented Jun 14, 2021 at 14:19
  • What do you mean, 'not really small' ? 5.11.0-18-generic takes 137Mb in /boot, so there's no space for another kernel... Commented Jun 15, 2021 at 12:03

1 Answer 1

0

First, /boot is not too small. It is small enough to be uncomfortable, but since a typical ubuntu kernel is maybe 12MB, initrd 55MB + some config files, you should have space for two, if not three different kernels. What else is there?

And, if you really need/want bigger /boot, I'd suggest reusing the swap partition - you'll have to shrink the encrypted vlume, though. Unless you need hibernation.

If you have an external 1TB or so USB drive, I'd suggest making a (verbatim) copy of your disk there and experiment only after that.

1
  • Like stated, the latest kernel takes up 137Mb, so more than half. And look at the lsblk output: reusing swap is not possible as it is part of the encrypted partition, part of the sda5, part of sda2. Commented Jun 15, 2021 at 19:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.