I'm running a box under Gentoo. Said box is a server (no GUI, only SSH).
Since I used genkernel to generate my kernel, I've seen that it creates several images (System.map, initramfs, kernel) that takes some place:
$ du -ahd1|sort -k1h 0 ./boot 0 ./.keep 12K ./lost+found 1.4M ./memtest86plus 2.4M ./System.map-genkernel-x86_64-4.9.34-gentoo 2.7M ./System.map-genkernel-x86_64-4.12.5-gentoo 3.7M ./kernel-genkernel-x86_64-4.9.34-gentoo 4.2M ./initramfs-genkernel-x86_64-4.9.34-gentoo 8.1M ./grub 8.3M ./kernel-genkernel-x86_64-4.12.5-gentoo 31M
Indeed, my /boot partition is only 32M large and I'd like to change its size to some size that better accommodate this (like 256M).
/dev/sda is as follow; for reference, it is an Intel SSD (although it is an old model).
$ lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 37.3G 0 disk ├─sda2 8:2 0 37.2G 0 part / └─sda1 8:1 0 32M 0 part /boot
I know I can grow a partition on some condition (end of disk, etc) and shrink it. I also know it is risky and I'm not enough confident to do it without using a good GUI.
Can I do that:
/dev/sda2to get some space
- create and mount
- copy whole
/new_boot(either threw a simple copy, either threw dd ?)
Or is there a better solution ? (I have physical access to the server)