1 |
On 05/03/2017 23:33, thelma@×××××××××××.com wrote: |
2 |
> After upgrading my machine. I rebooted, everything went as planned. |
3 |
> So I decided to upgrade to a newer kernel. I was using: |
4 |
> linux-3.10.7-gentoo-r1 |
5 |
> |
6 |
> and decided to switch to: |
7 |
> linux-4.9.6-gentoo-r1 |
8 |
> |
9 |
> 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: |
10 |
> |
11 |
> "GRUB" and blank screen, not even a kernel selection. |
12 |
> I scramble, boot strap the system and copied two file in /boot/ |
13 |
> kernel-old --> kernel-current |
14 |
> System.map-old --> System.map-current |
15 |
|
16 |
You could do this: |
17 |
|
18 |
Boot into the old kernel |
19 |
Delete the new kernel from /boot |
20 |
Fix space issues with /boot |
21 |
Re-install new kernel. This goes quick, it's already built in /usr/src |
22 |
|
23 |
> |
24 |
> 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. |
25 |
> |
26 |
> ll -h /boot/ |
27 |
> total 17M |
28 |
> lrwxrwxrwx 1 root root 1 Dec 17 2011 boot -> . |
29 |
> -rw-r--r-- 1 root root 109K Mar 5 10:20 config-current |
30 |
> -rw-r--r-- 1 root root 90K Mar 5 10:13 config-old |
31 |
> drwxr-xr-x 5 root root 1.0K Mar 5 11:48 grub |
32 |
> -rw-r--r-- 1 root root 5.5M Mar 5 11:03 kernel-current |
33 |
> -rw-r--r-- 1 root root 5.5M Mar 5 10:12 kernel-old |
34 |
> drwx------ 2 root root 12K Dec 17 2011 lost+found |
35 |
> -rw-r--r-- 1 root root 2.9M Mar 5 11:03 System.map-current |
36 |
> -rw-r--r-- 1 root root 2.9M Mar 5 10:12 System.map-old |
37 |
> |
38 |
> df -h |
39 |
> /dev/sda1 30M 29M 0 100% /boot |
40 |
> |
41 |
> 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. |
42 |
|
43 |
30M is not enough unless you are building for an embedded device with |
44 |
flash memory for disk. |
45 |
I'd consider 128M the absolute MINIMUM for a modern machine, and that's |
46 |
still only 0.02% of the smallest spinning rust disk you can buy nowadays... |
47 |
|
48 |
> |
49 |
> What I my options to reduce kernel size or increase /boot partition? |
50 |
|
51 |
increase /boot can be done, but it's hard work and you are mostly |
52 |
screwed. You have to move the next partition in order (sda2) further up |
53 |
the disk leaving room for /boot to be reasonable (see end) |
54 |
|
55 |
> |
56 |
> Since I'm using VirtualBox the only module I'm rebuilding against kernel are: |
57 |
> modules="vboxdrv vboxnetflt vboxnetadp vboxpci" |
58 |
> + some Nvidia driver modules. |
59 |
|
60 |
Not really relevant. You have 2 out-of-tree modules and possibly a very |
61 |
large number of in-tree modules and none of them are in /boot |
62 |
|
63 |
> |
64 |
> 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? |
65 |
> Maybe it will reduce the kernel size. |
66 |
|
67 |
Modules do not go in /boot so completely irrelevant |
68 |
Modules go in /lib/modules/ |
69 |
|
70 |
> |
71 |
> The current (linux-4.9.6-gentoo-r1) kernel size : |
72 |
> -rw-r--r-- 1 root root 6.6M Mar 5 10:11 arch/x86/boot/bzImage |
73 |
> -rw-r--r-- 1 root root 3.6M Mar 5 10:11 System.map |
74 |
> |
75 |
> I think when I copied the new kerenl size to /boot it didn't copied correctly as /boot run out of room. |
76 |
> What are my other options? |
77 |
|
78 |
temporary solution: |
79 |
|
80 |
Go into your kernel config in /usr/src and for each kernel: |
81 |
- Configure as a module everything that can be a module |
82 |
- save, recompile, reinstall kernel |
83 |
|
84 |
That will reduce your kernel space consumption by about 20% |
85 |
|
86 |
> |
87 |
> I'm using grub-0.97-r16 |
88 |
|
89 |
|
90 |
So, it is possible to grow /boot. I have done it many times. It is |
91 |
tedious, boring and usually takes about 3 days longer than I have time |
92 |
to spare and involves me using all spare samba shares and portable |
93 |
drives I have |
94 |
|
95 |
Considering your general state of knowledge and the sort of mistakes you |
96 |
are making, I would advise you to backup your world file and |
97 |
/etc/portage. Then trash that VM and start over, this time making |
98 |
sensible choices about things like space for /boot |
99 |
|
100 |
|
101 |
-- |
102 |
Alan McKinnon |
103 |
alan.mckinnon@×××××.com |