How to resize boot partition on centos ?

Discussion in 'Site & Server Administration' started by 0x3, Oct 17, 2011.

  1. #1
    Hello,

    I just try to update my server centos EX4 from hetzner with 16 GB DDR3 RAM.. more details can be found here

    http://www.hetzner.de/en/hosting/produkte_rootserver/ex4

    the server hd and free RAM is

    [root@CentOS-56-64-minimal ~]# df -h;free -m
    Filesystem Size Used Avail Use% Mounted on
    /dev/md2 691G 8.9G 648G 2% /
    /dev/md1 251M 200M 39M 84% /boot
    total used free shared buffers cached
    Mem: 7956 662 7294 0 84 295
    -/+ buffers/cache: 282 7674
    Swap: 2053 0 2053
    [root@CentOS-56-64-minimal ~]#

    when i try to update my server application using yum update i get at the end of the result error:

    Error Summary
    -------------
    Disk Requirements:
    At least 47MB needed on the /boot filesystem.

    Now i would like to re-size the boot from shell ssh (root permission) without effecting the server or the hard-disk.

    Thanks for anyone would share me useful information.
     
    0x3, Oct 17, 2011 IP
  2. Divided

    Divided Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    3
    Trophy Points:
    0
    #2
    http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-disk-storage-parted-resize-part.html

    I'd consider booting up from a live cd or something similar though, it's never wise to resize a partition that is currently in use.
     
    Divided, Oct 18, 2011 IP
  3. 0x3

    0x3 Active Member

    Messages:
    138
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    61
    #3
    Thanks i already see this link before, but i don't have that experience to make it on this srv as this a real srv not a srv lab... but i see 10 kernel images in the server considering witch command should i run now..

    i did run the first 2 commands, and here is the result:

    [root@www ~]# rpm -qa | grep kernel
    kernel-2.6.18-238.9.1.el5
    ovzkernel-2.6.18-238.12.1.el5.028stab091.1
    ovzkernel-xen-2.6.18-238.12.1.el5.028stab091.1
    ovzkernel-2.6.18-238.19.1.el5.028stab092.2
    kernel-2.6.18-238.19.1.el5
    kernel-2.6.18-194.17.1.el5
    kernel-2.6.18-194.32.1.el5
    kernel-2.6.18-238.12.1.el5
    ovzkernel-xen-2.6.18-238.19.1.el5.028stab092.2
    kernel-headers-2.6.18-238.19.1.el5
    [root@www ~]# uname -r
    2.6.18-238.19.1.el5.028stab092.2
    [root@www ~]# uname -a
    Linux www 2.6.18-238.19.1.el5.028stab092.2 #1 SMP Thu Jul 21 19:23:22 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux
    [root@www ~]#
     
    0x3, Oct 18, 2011 IP
  4. expertvm

    expertvm Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Remove the following kernel. You do not need them.

    You should be able to free up quite a bit of space in your /boot
     
    expertvm, Oct 22, 2011 IP