Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How can I increase the /boot partition?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

How can I increase the /boot partition?

#1 Post by Scorpion »

Code: Select all

fdisk -l
Device       Start        End    Sectors  Size Type
/dev/sdb1     2048    1050623    1048576  512M EFI System
/dev/sdb2  1050624    1550335     499712  244M Linux filesystem
/dev/sdb3  1550336 7814035455 7812485120  3.7T Linux filesystem
To increase /dev/sdb2, mount point /boot, I need to reduce sdb3.
There is debian system there, with encrypted lvm and no empty space left.

Can I do it when I am using it?

Do I need to create a bootable media with gparted iso?
Can I use another OS and chroot? Now I do not have one.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: How can I increase the /boot partition?

#2 Post by p.H »

Scorpion wrote:To increase /dev/sdb2, mount point /boot, I need to reduce sdb3.
Or reduce sdb1, the EFI partition. I bet it is almost empty. How much extra space do you need in /boot ?
Didn't you already ask about this ?

Otherwise, you do not only need to reduce sdb3, most importantly you also need to move it. Moving a big partition takes a lot of time and requires that the partition is not in use. If reducing the EFI partition is not an option, I would reduce sdb3 without moving it and create a new /boot partition at the end of the drive. It may be done while the system is running.

In any case if you choose to reduce sdb3 (moving it or not), you must first reduce its contents, i.e. the LVM PV, which may require to reduce some LV (after reducing its contents) and move used blocks away from the end of the PV.
In summary :
reduce LV filesystem (may require to unmount it, depending on filesystem type)
reduce LV
move blocks from the end of the PV
reduce the PV
reduce the encrypted volume
reduce the partition

Of course you should prepare a rescue system.

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: How can I increase the /boot partition?

#3 Post by Scorpion »

Before using apt autoremove I ran out of sapce on /boot, I do not know how much extra space was needed, now:

Code: Select all

df -h
/dev/sdb2                               237M  142M   84M  63% /boot
/dev/sdb1                               511M  5.2M  506M   1% /boot/efi
Yes I can reduce the EFI partition instead of moving 3.7T, or create /boot at the end of the disk.
I did that:

Code: Select all

df -h
/dev/sdb2                               431M  142M  267M  35% /boot
/dev/sdb1                               312M  5.2M  307M   2% /boot/efi

Post Reply