Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gentoo on a kvm - can't install kernel sources
Date: Sun, 25 Aug 2013 19:53:43
Message-Id: 521A5FEC.6000308@gmail.com
In Reply to: Re: [gentoo-user] gentoo on a kvm - can't install kernel sources by Michael Mair-Keimberger
1 On 25/08/2013 19:01, Michael Mair-Keimberger wrote:
2 >
3 >
4 > On Sunday 25 August 2013 18:23:07 Alan McKinnon wrote:
5 >
6 >> On 25/08/2013 15:51, Michael Mair-Keimberger wrote:
7 >
8 >> > Hi List,
9 >
10 >> >
11 >
12 >> >
13 >
14 >> >
15 >
16 >> > Since a few days i'm trying to install gentoo on a kvm guest from
17 >
18 >> > edis.at. They support to boot from a gentoo minimal live-cd in order to
19 >
20 >> > install your own gentoo. The system has 5GB storage and 256MB ram.
21 >
22 >> > Actually that should be enough for a minimal installation. However, till
23 >
24 >> > now i couldn't get over that point where i'm trying to install the
25 >
26 >> > kernel sources...
27 >
28 >> >
29 >
30 >> >
31 >
32 >> >
33 >
34 >> > The partition of the hd looks like this right now:
35 >
36 >> >
37 >
38 >> >
39 >
40 >> >
41 >
42 >> > 64MB /boot
43 >
44 >> >
45 >
46 >> > 256MB swap
47 >
48 >> >
49 >
50 >> > ~4,3GB /
51 >
52 >> >
53 >
54 >> >
55 >
56 >> >
57 >
58 >> > Swap is active and i also made sure there are enough inodes on / (i had
59 >
60 >> > to raised them).
61 >
62 >> >
63 >
64 >> >
65 >
66 >> >
67 >
68 >> > Even though there is enough space and 256mb ram + 256mb swap should be
69 >
70 >> > enough ram i can't install (copy) the kernel sources. They just stop
71 >
72 >> >
73 >
74 >> > suddenly. There is nothing in the build.log. Last view lines are:
75 >
76 >> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa2xx-ac97.c
77 >
78 >> >>>>
79 >
80 >> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa2xx-pcm.c
81 >
82 >> >>>>
83 >
84 >> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa-ssp.c
85 >
86 >> >>>>
87 >
88 >> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa2xx-i2s.c
89 >
90 >> >
91 >
92 >> > However i'll get errors in dmesg and it seems i'll get out of memory
93 >
94 >> > while installing:
95 >
96 >> >
97 >
98 >> >
99 >
100 >> >
101 >
102 >> > [snip]
103 >
104 >> >
105 >
106 >> > [63599.551452] emerge invoked oom-killer: gfp_mask=0x201da, order=0,
107 >
108 >> > oom_score_adj=0
109 >
110 >> >
111 >
112 >> > [63599.551466] Pid: 12358, comm: emerge Not tainted 3.8.13-gentoo #1
113 >
114 >> >
115 >
116 >> > .
117 >
118 >> >
119 >
120 >> > .
121 >
122 >> >
123 >
124 >> > .
125 >
126 >> >
127 >
128 >> > [63599.552434] Out of memory: Kill process 13382 (emerge) score 635 or
129 >
130 >> > sacrifice child
131 >
132 >> >
133 >
134 >> > [63599.552435] Killed process 13382 (emerge) total-vm:438472kB,
135 >
136 >> > anon-rss:206552kB, file-rss:0kB
137 >
138 >> >
139 >
140 >> > [snip]
141 >
142 >> >
143 >
144 >> >
145 >
146 >> >
147 >
148 >> > Any idea what i can do here, except buying an better kvm? From the docs
149 >
150 >> > 256MB should be fine so i don't know why it doesn't work?
151 >
152 >>
153 >
154 >> I cannot untar kernel sources on my virtualbox VMs with <=256M either,
155 >
156 >> and that goes back at least 18 months. tar just consumes too much
157 >
158 >> memory. Your options:
159 >
160 >>
161 >
162 >> - untar somewhere else and copy the uncompressed sources over
163 >
164 >> - get more memory
165 >
166 >>
167 >
168 >> when you build the kernel, you will find the same issue. gcc is going to
169 >
170 >> use much more ram than 256M to get the job done.
171 >
172 >>
173 >
174 >> Do keep in mind that you can probably get that VM to *run* in teeny
175 >
176 >> amounts of memory - maybe even only 64M - but building a kernel is a
177 >
178 >> hugely memory-intensive task
179 >
180 >
181 >
182 > Thx for crosschecking.
183 >
184 >
185 >
186 > Well it looks like docs are out of date, 256MB ram is definitely not
187 > enough. I already though about to extract it here and than copy it to
188 > the vm. However, uploading uncompressed kernel sources would take quite
189 > some time over my slow internet connection and i really wanted to avoid
190 > that.
191 >
192 >
193 >
194 > Anyway, either copy or buy a better vm. I guess i'll gonna make my own
195 > vm at home and copy the full system over...
196
197
198 I'd recommend cross-building just a kernel and modules locally and
199 copying that to the vm, it will only be about 6 to 8M
200
201
202 Some food for thought:
203
204 I do question the wisdom though of running Gentoo on a VM like that.
205 I've always found that Gentoo (despite all it's fantastic awesomeness
206 elsewhere) is really not fitted for that specific task very well - it
207 tends to be a lot of pain and not much gain.
208
209 Why do you want Gentoo on the vm? Is there a very good reason, or is it
210 because you are familiar with it?
211
212 If the second reason, you might want to have a look at FreeBSD or one of
213 the binary distros based of Gentoo like Sabayon. You might find the best
214 of both worlds in that space.
215
216
217 --
218 Alan McKinnon
219 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] gentoo on a kvm - can't install kernel sources Yohan Pereira <yohan.pereira@×××××.com>