On 05/03/2017 23:33, the...@sys-concept.com wrote:
> After upgrading my machine. I rebooted, everything went as planned.
> So I decided to upgrade to a newer kernel.  I was using:
> linux-3.10.7-gentoo-r1
> 
> and decided to switch to:
> linux-4.9.6-gentoo-r1
> 
> I've done kernel upgrade many, many times so it was a routine procedure. When 
> I re-booted the last thing on the screen were letter:
> 
> "GRUB" and blank screen, not even a kernel selection.
> I scramble, boot strap the system and copied two file in /boot/ 
> kernel-old --> kernel-current
> System.map-old --> System.map-current

You could do this:

Boot into the old kernel
Delete the new kernel from /boot
Fix space issues with /boot
Re-install new kernel. This goes quick, it's already built in /usr/src

> 
> I was under impression that something is wrong with the current (newest 
> kernel). But it seems to me I run out of room on the /boot partition.
> 
> ll -h /boot/
> total 17M
> lrwxrwxrwx 1 root root    1 Dec 17  2011 boot -> .
> -rw-r--r-- 1 root root 109K Mar  5 10:20 config-current
> -rw-r--r-- 1 root root  90K Mar  5 10:13 config-old
> drwxr-xr-x 5 root root 1.0K Mar  5 11:48 grub
> -rw-r--r-- 1 root root 5.5M Mar  5 11:03 kernel-current
> -rw-r--r-- 1 root root 5.5M Mar  5 10:12 kernel-old
> drwx------ 2 root root  12K Dec 17  2011 lost+found
> -rw-r--r-- 1 root root 2.9M Mar  5 11:03 System.map-current
> -rw-r--r-- 1 root root 2.9M Mar  5 10:12 System.map-old
> 
> df -h
> /dev/sda1        30M   29M     0 100% /boot
> 
> When I installed the system I followed standard, installation instructions, 
> and allocated disk space accordingly in Gentoo installation instruction 
> manual.  I think it wasn't enough.

30M is not enough unless you are building for an embedded device with
flash memory for disk.
I'd consider 128M the absolute MINIMUM for a modern machine, and that's
still only 0.02% of the smallest spinning rust disk you can buy nowadays...

> 
> What I my options to reduce kernel size or increase /boot partition?

increase /boot can be done, but it's hard work and you are mostly
screwed. You have to move the next partition in order (sda2) further up
the disk leaving room for /boot to be reasonable (see end)

> 
> Since I'm using VirtualBox the only module I'm rebuilding against kernel are:
>  modules="vboxdrv vboxnetflt vboxnetadp vboxpci"
> + some Nvidia driver modules.

Not really relevant. You have 2 out-of-tree modules and possibly a very
large number of in-tree modules and none of them are in /boot

> 
> But I've notice when new kernel was building where were a lot of other 
> modules: "M" which I don't use I think. How to find them and disable them?
> Maybe it will reduce the kernel size.

Modules do not go in /boot so completely irrelevant
Modules go in /lib/modules/

> 
> The current (linux-4.9.6-gentoo-r1) kernel size : 
> -rw-r--r-- 1 root root 6.6M Mar  5 10:11 arch/x86/boot/bzImage
> -rw-r--r-- 1 root root 3.6M Mar  5 10:11 System.map
> 
> I think when I copied the new kerenl size to /boot it didn't copied correctly 
> as /boot run out of room.
> What are my other options?

temporary solution:

Go into your kernel config in /usr/src and for each kernel:
- Configure as a module everything that can be a module
- save, recompile, reinstall kernel

That will reduce your kernel space consumption by about 20%

> 
> I'm using grub-0.97-r16


So, it is possible to grow /boot. I have done it many times. It is
tedious, boring and usually takes about 3 days longer than I have time
to spare and involves me using all spare samba shares and portable
drives I have

Considering your general state of knowledge and the sort of mistakes you
are making, I would advise you to backup your world file and
/etc/portage. Then trash that VM and start over, this time making
sensible choices about things like space for /boot


-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to