Problem with updates on a CentOS 6 VM

General support questions
Post Reply
awinkler
Posts: 5
Joined: 2011/07/11 11:55:46
Location: Hamburg, Germany

Problem with updates on a CentOS 6 VM

Post by awinkler » 2011/07/11 12:16:40

First of all, I would like to thank the CentOS developers for their fine work.

Unfortunately I run in a problem when I update the system right after the initial install. I've created a virtual machine with a 20GB vmdk (right: VMware). With the default settings I've got a boot partition of aroung 48 GB. When I try to update the system I've got the following error message:
"Test Transaction Errors: installing package kernel-2.6.32-71.29.1.el6.x86_64 needs 19MB on the /boot filesystem"
But there are only 8.3GB free.
Is there a solution without a complete new installation with a greater /boot filesystem?

Best regards,
Andreas

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Problem with updates on a CentOS 6 VM

Post by scottro » 2011/07/11 12:47:51

If you have LVM for root, you can shrink it, then grow your /boot partition with something like gparted.

If your / filesytem isn't LVM, then you can use gparted to shrink it.

Note that shrinking a file system does have an element of risk. Also, you might check your /boot partition--perhaps the problem is as simple as several old kernels and init images in there that can be removed.


EDIT--sorry, I misread your post. Is your /boot partition 48GB or your / partition is 48GB.

Default /boot, if you let it do its thing, is 200 MB or so as I recall. Or do you mean your /boot is 48MB.

awinkler
Posts: 5
Joined: 2011/07/11 11:55:46
Location: Hamburg, Germany

Re: Problem with updates on a CentOS 6 VM

Post by awinkler » 2011/07/11 14:01:13

Hi scottro,

Thank you for your rapid reply.

I mixed something up. My /boot partition has a size of 48 _MB_ and there are only 8.3 _MB_ free.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem with updates on a CentOS 6 VM

Post by TrevorH » 2011/07/11 14:03:15

How did you manage that! Whenever I've tried to set it smaller than a decent amount it has silently increased it to 100MB or more - Centos 5 used 100 and I think 6 uses 200MB.

awinkler
Posts: 5
Joined: 2011/07/11 11:55:46
Location: Hamburg, Germany

Re: Problem with updates on a CentOS 6 VM

Post by awinkler » 2011/07/11 14:20:29

I haven't set it manually. I only give it a 20GB virtual disk.
By now I try a new vm with a 40GB disk.
Here is the result:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 4031680 2142276 1684604 56% /
tmpfs 510608 124 510484 1% /dev/shm
/dev/sda1 49574 38512 8502 82% /boot
/dev/sda5 35167928 181056 33200404 1% /home
Again only 8.3 MB free.

I installed on VMware Workstation Version 7.1.4 build-385536.

awinkler
Posts: 5
Joined: 2011/07/11 11:55:46
Location: Hamburg, Germany

Re: Problem with updates on a CentOS 6 VM

Post by awinkler » 2011/07/11 15:04:06

I don't know why but it seems that it has to do with the 'Easy Install'-Feature from VMware Workstation. If I do a manual configuration from the vm I've got a 500MB /boot partition. With the manual configuration I gain a system with lvm but when I use the 'Easy Install' I come up without lvm.
I'll try to do some more investigation.

[This thread's subject line has been moderator edited to be more descriptive of the issue.]

awinkler
Posts: 5
Joined: 2011/07/11 11:55:46
Location: Hamburg, Germany

Re: Problem with updates on a CentOS 6 VM

Post by awinkler » 2011/07/12 15:10:46

I did a post in the VMware forum and got the following reply:

> Easy Install creates a custom Kickstart configuration file the autoinst.iso file created in the folder the Virtual Machine is created in and you'd have to change the following parameter in the KS.CFG file.
>
> part /boot --size 50
>
> This would entail extracting the KS.CFG file from the autoinst.iso file, editing the parameter and injecting the edited KS.CFG file into autoinst.iso file before starting the install. Or depending on you're needs this process can be scripted.

With a partition size of (e.g.) 200MB the updates get installed.

jullrich
Posts: 1
Joined: 2011/08/05 14:33:49
Contact:

Re: Problem with updates on a CentOS 6 VM

Post by jullrich » 2011/08/05 14:45:05

I ran into the same issue, after installing CentOS 6 on VMWare using the easy-install feature.

As a work around, I managed to update the kernel by just removing the old "initrd" files, then running yum update and finally rebooting.

The initrd files are only used during boot. Once your update is complete, the system will boot to the new kernel and use the new initrd files.

Of course, this is a less then ideal solution, but in my case, I usually only use the Cent OS VM to experiment and this solution was faster then a complete rebuild. I wouldn't recommend this for any kind of production setup. It may also be advisable to copy the initrd files to a USB stick so in case you need them during the next boot, you would still have them available.

Post Reply