Not enough space in /boot. Is there a way I can enlarge the /boot partition into the beginning of the /usr partition without having to re-install?

Asked by Dave Senger on 2010-06-18

Binary package hint: initramfs-tools

I think problem is I used the same partitions I originally made for an old Red Hat installation, which worked just fine for Ubuntu 9.10. /boot is ~107MB, and appears to be too small. I was able to boot my new 10.04 install, but when I ran Update Manager, it reported ~19MB too little space in /boot, and suggested I empty Trash and run "sudo apt-get clean", which I did to no avail. The very next partition on the disk is 32GB, which I have mounted at /usr (ext4). Is there a way I can enlarge the /boot partition into the beginning of the /usr partition without having to re-install?

Bug #515025 is close, but not exactly right. See info in summary. Can I enlarge /boot into adjacent /usr without having to re-install? On installation, I got:

Error while removing packages: E: Sub-process /usr/bin/dpkg returned an error code (1)

No packages were listed as broken. Error advised to "Look for details in /var/log/syslog." Install may fail. Look for newer versions of installer image or report problem.

On 1st attempted boot, I got a long list of similar errors, ending with:

[3027.152175] end-request: IO error, dev sr2, sector 510608.

I removed 10.04 install CD and booted normally, so GRUB must be OK in MBR.

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: initramfs-tools 0.92bubuntu78
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
AptOrdering:
 flashplugin-installer: Install
 initramfs-tools: Configure
 flashplugin-installer: Configure
Architecture: i386
Date: Thu Jun 17 23:59:44 2010
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
PackageArchitecture: all
SourcePackage: initramfs-tools
Title: package initramfs-tools 0.92bubuntu78 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Dave Senger (dave14922004) said : #1

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs#When%20not%20to%20file%20a%20bug.

Goh Lip (gohlip) said : #3

Dave, you have /boot of about 107 MB, right? And /usr at 32 GB? What is size of '/'?
Can you explain why you would think it is the size of /boot and not just / ?

If unsure please print output of 'sudo fdisk -l' and 'sudo blkid'

Dave Senger (dave14922004) said : #4

Hi, Goh Lip-

Thank you very much for your reply. Here are those terminal outputs:

********************************************************************************************

dave@pegasus:~$ sudo fdisk -l
[sudo] password for dave:

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b0210

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2611 20972826 83 Linux
/dev/sdb2 2612 6527 31455270 7 HPFS/NTFS
/dev/sdb3 6528 13054 52428127+ 5 Extended
/dev/sdb4 13055 30401 139339777+ 7 HPFS/NTFS
/dev/sdb5 6528 13054 52428096 7 HPFS/NTFS

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa332a332

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 3916 31455238+ 7 HPFS/NTFS
/dev/sda2 3917 4190 2200905 6 FAT16
/dev/sda3 4191 7845 29358787+ 83 Linux
/dev/sda4 7846 8368 4200967 5 Extended
/dev/sda5 7846 8368 4200966 82 Linux swap / Solaris

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc98daa43

   Device Boot Start End Blocks Id System
/dev/sdc1 * 1 68442 549760333+ 7 HPFS/NTFS
/dev/sdc2 68443 76274 62910540 5 Extended
/dev/sdc5 68443 72358 31455238+ 7 HPFS/NTFS
/dev/sdc6 72359 76274 31455238+ 7 HPFS/NTFS

Disk /dev/sdd: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x893f893f

   Device Boot Start End Blocks Id System
/dev/sdd1 * 1 2611 20972826 83 Linux
/dev/sdd2 2612 14359 94365810 f W95 Ext'd (LBA)
/dev/sdd5 2612 5222 20972826 b W95 FAT32
/dev/sdd6 5223 7833 20972826 b W95 FAT32
/dev/sdd7 7834 10444 20972826 b W95 FAT32
/dev/sdd8 10445 13054 20964793+ b W95 FAT32
/dev/sdd9 13055 14359 10482381 b W95 FAT32

Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x039d411f

   Device Boot Start End Blocks Id System
/dev/sde1 1 182401 1465136001 7 HPFS/NTFS
/dev/sde2 182402 243201 488376000 7 HPFS/NTFS
dave@pegasus:~$

********************************************************************************************

dave@pegasus:~$ sudo blkid
[sudo] password for dave:
/dev/sdb1: UUID="25b43ea3-fb88-4109-902e-57821c7c88a6" TYPE="ext4"
/dev/sdb2: LABEL="Programs" UUID="F854F38A54F34A40" TYPE="ntfs"
/dev/sdb4: LABEL="Storage2" UUID="3C308F50308F1056" TYPE="ntfs"
/dev/sdb5: LABEL="Storage" UUID="1CE078ADE0788EB0" TYPE="ntfs"
/dev/sda1: UUID="4450FAEA50FAE19A" TYPE="ntfs"
/dev/sda2: UUID="30c62716-fa70-4841-b4c1-6fe80f2e73e0" TYPE="ext4"
/dev/sda3: UUID="1d6c03cc-7ba9-4735-8a4d-a0466975021f" TYPE="ext4"
/dev/sda5: TYPE="swap"
/dev/sdc1: LABEL="Big Storage Box" UUID="B85C41675C41218C" TYPE="ntfs"
/dev/sdc5: LABEL="C-Mon-08-12-08_C1-09-01-04" UUID="5666A6BE69A5FCB3" TYPE="ntfs"
/dev/sdc6: LABEL="C-Mon-08-12-08_C2-09-01-04" UUID="FE023566393B9D19" TYPE="ntfs"
/dev/sdd1: LABEL="Old/" UUID="c72c5bb8-6414-47b4-8597-614b5428d34d" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdd5: UUID="8441-282F" TYPE="vfat"
/dev/sdd6: UUID="183B-A5A4" TYPE="vfat"
/dev/sdd7: LABEL="NEW VOLUME" UUID="1C82-CC1F" TYPE="vfat"
/dev/sdd8: LABEL="NEW VOLUME" UUID="78B5-3168" TYPE="vfat"
/dev/sde1: LABEL="System Backup" UUID="80B4836EB483658E" TYPE="ntfs"
/dev/sde2: LABEL="Big Storage Box 2" UUID="F0C04897C0486646" TYPE="ntfs"
dave@pegasus:~$

********************************************************************************************

A few days ago, I bit the bullet and repartitioned, enlarging /boot to ~2.1 GB, and reducing /usr by ~2GB, then re-installed 10.04 into / (which is and was about 20GB), /boot, and /usr; and my new install is working fine. I still think the problem was that /boot was too small, at ~102MB - ~107MB, depending on the definition of MB. After my first install of 10.04, /boot was right full, and I got install errors about broken files. I believe the problem was that before my install, /boot was loaded with old kernels, etc., from my previous installation of 9.10, and there wasn't enough room. But after enlarging /boot to ~2.1GB, the install went just fine, and everything works well. The only downside is that I can no longer boot from any of my previous 9.10 kernels, which I had been hoping to save, but I probably wouldn't have used them anyway. All's well that ends well. Thanks again for your trouble.

I still have a question, though. Some Linux people recommend installing into additional mount points in separate partitions, such as /home and /tmp, on the grounds that this will prevent the disk from being filled up. I am the only one who uses this system. Would this be necessary? Useful? Can you point me to some good information on the pros and cons of various partition/mount point schemes for Ubuntu? Thanks.

Goh Lip (gohlip) said : #5

Dave, glad to hear you got this solved, please change status of this report to solved.

For partitioning, see https://help.ubuntu.com/community/HowtoPartition
Different people have different viewpoints about partitioning and I can only say that you should do what is suitable or comfortable to you. Personally, I don't think it is necessary to have so many separate partitions, as long as you use a big partition to hold all your data, and not at /home. Just make sure you have a back up for your config files when you have a clean install, files like .mozilla or .thunderbird etc.

By the way, my current /boot usage is less than 20 MB, and I don't think that will ever exceed 150 MB. My /usr usage is at 2.3 GB. And if you set partition sizes badly, say a very large /boot or /usr, you may have problems as you may have run out of space for other required partitions. As for /tmp, the default is to clear these at shutdown unless you tell it otherwise.

My general recommendation to you is not to have these separate partitions.

Dave Senger (dave14922004) said : #6

Thanks again, Goh-

That should do it. I've bookmarked your link, and plan to follow your advice about no excessive partitioning, until I come across a good reason to do otherwise.

Best, Dave

Almufadado (almufadado) said : #7

I also had this problem.

I created a separated /boot partition as recommend in the foruns, and it in fact solves some problems I had with grub due to multi-booting. The partition I created back in Karmic for boot was only 80MB that people said it was enough.

This may be true ..or not ! With the constant updates this partition tends to get filled up by the older kernels.

Today I did a major update form Lucid to Maverick. The process went smoothly until I got an error from initramfs-tools.
In this installation process I got an error from this app saying "subprocess installed post-installation return a output status 1.
Not very helpful (as I could find an answer)!

After trying several other solution in I found in launchpad and ubuntu manuals, I was lead to the /boot partition which had no available space because of the "remains" of the last 4 kernel (I did not call "Bones" !) .

The point :
If you have a small /boot partition think giving it at least 150mb, to be safe.
You can safely delete the files related to the older versions of the kernel (see below).

In Portuguese :

Se ao fazer a actualização do kernel tiverem um erro do tipo :

update-initramfs: failed for /boot/initrd.img-2.6.35-22-generic-pae
dpkg: erro ao processar initramfs-tools (--configure):
 subprocesso instalado o programa post-installation retornou erro do status de saída 1

então têm a partição /boot (de arranque) cheia

Podem apagar os ficheiros relativos às versões anteriores do kernel para ganhar espaço.
Devem deixar as UMA ou DUAS últimas versões por causa de eventuais erros.
Por exemplo :
Podem apagar uma versão anterior apagando estes ficheiros que tenham o mesmo número

abi-2.6.??.??--generic-pae
initrd.img-2.6.??.??-generic-pae
vmcoreinfo-2.6.??.??-generic-pae
config-2.6.??.??-generic-pae
vmlinuz-2.6.??.??-generic-pae
System.map-2.6.??.??-generic-pae

Currente version is / A versão actual é initrd.img-2.6.35-25-generic-pae
leave the / deixem a initrd.img-2.6.35-22-generic-pae and delete the others / e apaguem as outras.

Hope this helps ! Espero ter ajudado !

Dave Senger (dave14922004) said : #8

Thanks, Almufadado-

Back in July, I solved the problem the same way by repartitioning; enlarging /boot (from ~102MB - ~107MB, depending on the definition of MB) to ~2.1GB (yes, that's GB, I have plenty of drive space).  Then I installed Lucid (10.04), with no problems since.  I have yet to upgrade to Maverick (10.10).  I wrote more about this in my previous reply, dated 2010-07-04.

Thanks again,

Dave

--- On Fri, 11/19/10, Almufadado <email address hidden> wrote:

From: Almufadado <email address hidden>
Subject: Re: [Question #115488]: Not enough
 space in /boot. Is there a way I can enlarge the /boot partition into the beginning of the /usr partition without having to re-install?
To: <email address hidden>
Received: Friday, November 19, 2010, 7:20 AM

Your question #115488 on initramfs-tools in ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/initramfs-tools/+question/115488

Almufadado posted a new comment:
I also had this problem.

I created a separated /boot partition as recommend in the foruns, and it
in fact solves some problems I had with grub due to multi-booting. The
partition I created back in Karmic for boot was only 80MB that people
said it was enough.

This may be true ..or not ! With the constant updates this partition
tends to get filled up by the older
 kernels.

Today I did a major update
 form Lucid to Maverick. The process went smoothly until I got an error from initramfs-tools.
In this installation process I got an error from this app saying "subprocess installed  post-installation return a output status 1.
Not very helpful (as I could find an answer)!

After trying several other solution in I found in launchpad and ubuntu
manuals, I was lead to the /boot partition which had no available space
because of the "remains" of the last 4 kernel (I did not call "Bones" !)
.

The point :
If you have a small /boot partition think giving it at least 150mb, to be safe.
You can safely delete the files related to the older versions of the kernel (see below).

In Portuguese :

Se ao fazer a actualização do kernel tiverem um erro do tipo :

update-initramfs: failed for /boot/initrd.img-2.6.35-22-generic-pae
dpkg: erro ao processar initramfs-tools (--configure):
 subprocesso instalado o
 programa post-installation retornou erro do status de saída 1

então têm a partição /boot  (de arranque) cheia

Podem apagar os ficheiros relativos às versões anteriores do kernel para ganhar espaço.
Devem deixar as UMA ou DUAS últimas versões por causa de eventuais erros.
Por exemplo :
Podem apagar uma versão anterior apagando estes ficheiros que tenham o mesmo número

abi-2.6.??.??--generic-pae
initrd.img-2.6.??.??-generic-pae
vmcoreinfo-2.6.??.??-generic-pae
config-2.6.??.??-generic-pae
vmlinuz-2.6.??.??-generic-pae
System.map-2.6.??.??-generic-pae

Currente version is / A versão actual é initrd.img-2.6.35-25-generic-pae
leave the / deixem a initrd.img-2.6.35-22-generic-pae and delete the others / e apaguem as outras.

Hope this helps ! Espero ter ajudado !

--
You received this question notification because you are a
 direct
subscriber of the question.