Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can someone help me on how to extend /boot partition filesystem which is not formatted as LVM? I want to upgrade the CentOS 6.5 to 6.6 version but it is requiring more space in /boot partition.
Device Boot Start End Blocks Id System
/dev/sda2 * 26 65 40960 83 Linux
/dev/sda3 66 32768 33487872 83 Linux
/dev/sda4 32769 38912 6291456 82 Linux swap / Solaris
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Possible but very risky and hard. You need to shrink sda3 or sda4 and make room behind sda2. Parted might be able to do that (there is a liveCD version of parted that you should use).
Are there no files you can delete? Well, 39MB is a bit small anyway, I guess.
It's probably less work to just reinstall. By the way, Centos 6.6 is not supported anymore, and Centos 6.10 will reach end of live later this year.
Thank you for your reply.
Actually there is an application installed Arcsight Logger 6.0 and I need to re-install it from the scratch and re-configure if I go for OS reinstall.
We are upgrading CentOS 6.5 as a pre-requisite for the Arcsight Logger upgrade procedure.
Can I delete any of these files? initramfs-2.6.32-431.el6.x86_64.img for example?
It may be possible to reconfigure the content of the initrds to make them smaller, thus reducing space required on the /boot filesystem. Certainly if the existing installation has more than one installed kernel, reducing the count to one also ought to allow to succeed to upgrade without need to do any resizing, such as uninstalling Plymouth. cf. https://forums.opensuse.org/showthre...02#post2947702
These would be the ones you cannot delete. However, these removals would be only a temporary workaround that lasted only until a new kernel installation or a grub upgrade. Removing memtest could be made permanent via package removal. The others are part of individual kernel packages.
There may be files within grub and efi that can also be removed and not be temporary, in part or in full also via package management. These would have to do with graphical grub and booting, such as Plymouth. I can't be more precise because I haven't even looked at CentOS in many years.
I take a different view. Moving partitions/filesystems these days is pretty easy and safe. That means using a current gparted liveCD if the system can be taken offline.
For such a small disk, I'd look at removing 1G (at least) from the swap and sliding the root over, and give the space to the the boot. Not sure if gparted will keep the same UUID for the swap when it reduces it, but I'd guess not, so that would have to be corrected or fstab updated. I simply delete the swap and move stuff around then reallocate/mkswap later, so I'm not sure what gparted does.
Yes, there is very little you can delete. This is not your solution.
If you save the Arcsight config files and/or database and restore them at the precise locations, surely you don't have to reinstall the tool?
In case you want to try increasing /boot, I see three options.
Easiest: Remove swap from /etc/fstab, shut the server down. With an offline version of parted, remove sda4, move sda3 to the end of the disk, then grow sda2. Reboot, use resize2fs to grow /boot (assuming the filesystem is ext2/ext3/ext4, which is likely for Centos 6). If you need swap space, the next option is probably better, or you can set up file swap.
Slightly harder: Don't delete but shrink swap space (sda4) and move it to the end of the disk. Move sda3 towards the end of the disk without overlapping sda4. Grow sda2. Then grow /boot as in the first option.
Risk: If you make sda3 and sda4 overlap by mistake, you risk losing data.
EDIT: This is basically syg00's suggestion.
Hardest and riskiest: With a liveCD or recovery disk, use resize2fs to shrink root, then use parted to shrink sda3 and grow sda2. After that, use resize2fs to grow /boot.
Risk: You might shrink sda3 too much, thereby destroying data.
Last edited by berndbausch; 07-21-2020 at 05:15 AM.
How can I move /dev/sda3 to the end of the disk, using gparted ? Sorry, I'm not very familiar with these Linux staff.
It's not Linux stuff; it's very similar to equivalent disk management tools in Windows. However I would have to read the manual to answer that question. It looks like your case is roughly addressed by https://gparted.org/display-doc.php%...een-partitions.
Quote:
Am I protected if I take a VMware snapshot in case something goes wrong doing these changes ?
If I had known it's virtual, I would have suggested you extend the disk, then move sda3 and sda4 further to the end to make room for extending sda2.
I suppose a snapshot, or better a clone of the disk is effective protection if anything goes wrong. Also take a backup, just in case.
How can I move /dev/sda3 to the end of the disk, using gparted ?
When swap is its own partition in a system using LVM, it can be removed, and a new swap can be created by using LVM to free space within itself and using LVM to create the new swap. Once the original swap has been removed, the space freed is available to add to the /boot and/or the LVM partition(s).
Ultimately, a larger /boot is the right way forward. I was only suggesting workarounds that would ultimately be temporary, as kernel and initrd bloat are virtually certain to continue as time marches on.
I managed to extend /boot filesystem using gparted LiveCD. I expanded VMware virtual disk first then moved all the partitions after /boot partition to the end of the disk.
This procedure created free space for /boot partition and then I expanded it with 10GB.
Then, I ran yum update in order to upgrade CentOS 6.5 to 6.6 version but after the command completed the CentOS was upgraded to 6.10.
Is there any possibility to downgrade it to 6.6 (the one that I need) ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.