From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-149986-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id B0A741381F3
	for <garchives@archives.gentoo.org>; Sun, 25 Aug 2013 19:53:43 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1EB41E0BCD;
	Sun, 25 Aug 2013 19:53:37 +0000 (UTC)
Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id F0923E0A80
	for <gentoo-user@lists.gentoo.org>; Sun, 25 Aug 2013 19:53:35 +0000 (UTC)
Received: by mail-wg0-f42.google.com with SMTP id j13so3156496wgh.1
        for <gentoo-user@lists.gentoo.org>; Sun, 25 Aug 2013 12:53:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=message-id:date:from:user-agent:mime-version:to:subject:references
         :in-reply-to:content-type:content-transfer-encoding;
        bh=M4YZ1veqY57g9Z5vGyxlCD4+nIFbFnldmzpsAmXLK70=;
        b=VffQFrmetZmLU0iXlIEoNTSjha9RDISjXQs7euBjf8EqOaxv5L737rvI3NIh2LppAd
         6M/n7DMlJss/naCw3M2yV25giCiW47Zg3dAllbN078flGQrl1HZtqNC3lOB1UFB3Trti
         WwhBtLYIw6wC2VtPxe7Q4ogkHONE/VFZx55Q8MJ8Hc5st9pTkegu5N8BaAdhSmxK2FPa
         VW5mTkYJ72EIXcTanUhUBC1YhRVdf/8hh5GgoaYmK3EhkDhgsKsz/iXmLBIJKT7XZpvX
         8Ttmtpgs+118yGDDqu18q0rDsDGDQMOunF3Zu6B5H3Zl2W5Hnao7AcpQhaXAZvIz9WhW
         t58A==
X-Received: by 10.180.126.9 with SMTP id mu9mr5077801wib.16.1377460414637;
        Sun, 25 Aug 2013 12:53:34 -0700 (PDT)
Received: from [172.20.0.41] (196-210-127-228.dynamic.isadsl.co.za. [196.210.127.228])
        by mx.google.com with ESMTPSA id bh5sm6402936wib.7.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 25 Aug 2013 12:53:34 -0700 (PDT)
Message-ID: <521A5FEC.6000308@gmail.com>
Date: Sun, 25 Aug 2013 21:50:04 +0200
From: Alan McKinnon <alan.mckinnon@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130809 Thunderbird/17.0.8
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] gentoo on a kvm - can't install kernel sources
References: <1753073.v6jMLBITqg@asterix> <521A2F6B.5050603@gmail.com> <2077307.k2HumuzRxI@asterix>
In-Reply-To: <2077307.k2HumuzRxI@asterix>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 45fee07f-3b5d-4845-85dd-d9b6e2a367f4
X-Archives-Hash: 3127a0fcb830abd3cc9fbfcf1d21b4ab

On 25/08/2013 19:01, Michael Mair-Keimberger wrote:
>  
> 
> On Sunday 25 August 2013 18:23:07 Alan McKinnon wrote:
> 
>> On 25/08/2013 15:51, Michael Mair-Keimberger wrote:
> 
>> > Hi List,
> 
>> >
> 
>> >
> 
>> >
> 
>> > Since a few days i'm trying to install gentoo on a kvm guest from
> 
>> > edis.at. They support to boot from a gentoo minimal live-cd in order to
> 
>> > install your own gentoo. The system has 5GB storage and 256MB ram.
> 
>> > Actually that should be enough for a minimal installation. However, till
> 
>> > now i couldn't get over that point where i'm trying to install the
> 
>> > kernel sources...
> 
>> >
> 
>> >
> 
>> >
> 
>> > The partition of the hd looks like this right now:
> 
>> >
> 
>> >
> 
>> >
> 
>> > 64MB /boot
> 
>> >
> 
>> > 256MB swap
> 
>> >
> 
>> > ~4,3GB /
> 
>> >
> 
>> >
> 
>> >
> 
>> > Swap is active and i also made sure there are enough inodes on / (i had
> 
>> > to raised them).
> 
>> >
> 
>> >
> 
>> >
> 
>> > Even though there is enough space and 256mb ram + 256mb swap should be
> 
>> > enough ram i can't install (copy) the kernel sources. They just stop
> 
>> >
> 
>> > suddenly. There is nothing in the build.log. Last view lines are:
> 
>> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa2xx-ac97.c
> 
>> >>>>
> 
>> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa2xx-pcm.c
> 
>> >>>>
> 
>> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa-ssp.c
> 
>> >>>>
> 
>> >>>> /usr/src/linux-3.10.7-gentoo/sound/soc/pxa/pxa2xx-i2s.c
> 
>> >
> 
>> > However i'll get errors in dmesg and it seems i'll get out of memory
> 
>> > while installing:
> 
>> >
> 
>> >
> 
>> >
> 
>> > [snip]
> 
>> >
> 
>> > [63599.551452] emerge invoked oom-killer: gfp_mask=0x201da, order=0,
> 
>> > oom_score_adj=0
> 
>> >
> 
>> > [63599.551466] Pid: 12358, comm: emerge Not tainted 3.8.13-gentoo #1
> 
>> >
> 
>> > .
> 
>> >
> 
>> > .
> 
>> >
> 
>> > .
> 
>> >
> 
>> > [63599.552434] Out of memory: Kill process 13382 (emerge) score 635 or
> 
>> > sacrifice child
> 
>> >
> 
>> > [63599.552435] Killed process 13382 (emerge) total-vm:438472kB,
> 
>> > anon-rss:206552kB, file-rss:0kB
> 
>> >
> 
>> > [snip]
> 
>> >
> 
>> >
> 
>> >
> 
>> > Any idea what i can do here, except buying an better kvm? From the docs
> 
>> > 256MB should be fine so i don't know why it doesn't work?
> 
>>
> 
>> I cannot untar kernel sources on my virtualbox VMs with <=256M either,
> 
>> and that goes back at least 18 months. tar just consumes too much
> 
>> memory. Your options:
> 
>>
> 
>> - untar somewhere else and copy the uncompressed sources over
> 
>> - get more memory
> 
>>
> 
>> when you build the kernel, you will find the same issue. gcc is going to
> 
>> use much more ram than 256M to get the job done.
> 
>>
> 
>> Do keep in mind that you can probably get that VM to *run* in teeny
> 
>> amounts of memory - maybe even only 64M - but building a kernel is a
> 
>> hugely memory-intensive task
> 
>  
> 
> Thx for crosschecking.
> 
>  
> 
> Well it looks like docs are out of date, 256MB ram is definitely not
> enough. I already though about to extract it here and than copy it to
> the vm. However, uploading uncompressed kernel sources would take quite
> some time over my slow internet connection and i really wanted to avoid
> that.
> 
>  
> 
> Anyway, either copy or buy a better vm. I guess i'll gonna make my own
> vm at home and copy the full system over...


I'd recommend cross-building just a kernel and modules locally and
copying that to the vm, it will only be about 6 to 8M


Some food for thought:

I do question the wisdom though of running Gentoo on a VM like that.
I've always found that Gentoo (despite all it's fantastic awesomeness
elsewhere) is really not fitted for that specific task very well - it
tends to be a lot of pain and not much gain.

Why do you want Gentoo on the vm? Is there a very good reason, or is it
because you are familiar with it?

If the second reason, you might want to have a look at FreeBSD or one of
the binary distros based of Gentoo like Sabayon. You might find the best
of both worlds in that space.


-- 
Alan McKinnon
alan.mckinnon@gmail.com