Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot install the kernel sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
DanielC
n00b
n00b


Joined: 07 Sep 2015
Posts: 25
Location: Sweden

PostPosted: Mon Sep 07, 2015 5:43 pm    Post subject: Cannot install the kernel sources Reply with quote

Hello,

I am installing Gentoo on Virtual Box. I am making my way through the Handbook and I am stuck on this page:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel

I ran the command:

# emerge --ask sys-kernel/gentoo-sources
...
>>> Failed to install sys-kernel/gentoo-sources-4.0.5, Log file:
...


But I do not see any errors in the log file. The last few lines say

Install...
Copying sources...
Completed installing sources ...
ecompressdir: bzip2 -9 /usr/share/doc


So, I'm not sure what to do. There is no apparent error in build.log.

Any ideas?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Sep 07, 2015 5:53 pm    Post subject: Reply with quote

Just guessing ... out of inodes?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Sep 07, 2015 5:56 pm    Post subject: Reply with quote

DanielCarrera,

What is the output of
Code:
df
and
Code:
df -i

What size is the drive allocated to your Virtual Wachine?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Sep 07, 2015 6:06 pm    Post subject: Reply with quote

DanielCarrera,

while actual Gentoo install is not too big, for instance it is 3 GB in my wife's machine, there are some additional requirements that take alot more disk space when installed locally. Most notably portage and kernel sources. I'd say if you want local portage and multiple kernel sources go for at least 20-25 GB.
Back to top
View user's profile Send private message
DanielC
n00b
n00b


Joined: 07 Sep 2015
Posts: 25
Location: Sweden

PostPosted: Mon Sep 07, 2015 9:10 pm    Post subject: Reply with quote

NeddySeagoon wrote:
DanielCarrera,

What is the output of
Code:
df
and
Code:
df -i


What size is the drive allocated to your Virtual Wachine?


This is very weird:

Code:

# df -i
df: cannot read table of mounted file systems: No such file or directory
# df
df: cannot read table of mounted file systems: No such file or directory


The virtual disk in the VM is 8 GiB and the partition allocated to the root directory is 6.5 GiB. I have never seen 'df' fail before.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Sep 07, 2015 9:16 pm    Post subject: Reply with quote

Are you in chroot? It looks like your mtab cannot be read.
Back to top
View user's profile Send private message
DanielC
n00b
n00b


Joined: 07 Sep 2015
Posts: 25
Location: Sweden

PostPosted: Mon Sep 07, 2015 9:16 pm    Post subject: Reply with quote

Buffoon wrote:
DanielCarrera,

while actual Gentoo install is not too big, for instance it is 3 GB in my wife's machine, there are some additional requirements that take alot more disk space when installed locally. Most notably portage and kernel sources. I'd say if you want local portage and multiple kernel sources go for at least 20-25 GB.


Oh. Yeah, maybe that's it. The partition is only 6.5 GiB. How did you figure out that I am out of inodes? (I have never hit an inode limit before). Does portage produce a huge number of small files?
Back to top
View user's profile Send private message
DanielC
n00b
n00b


Joined: 07 Sep 2015
Posts: 25
Location: Sweden

PostPosted: Mon Sep 07, 2015 9:19 pm    Post subject: Reply with quote

Buffoon wrote:
Are you in chroot? It looks like your mtab cannot be read.


Yes, I am in chroot. I don't know what mtab is.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Sep 07, 2015 9:20 pm    Post subject: Reply with quote

You get an error "no space left on device" if your filesystem is too small. Often there is no usable error message if you are out of inodes.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Sep 07, 2015 9:23 pm    Post subject: Reply with quote

DanielCarrera,

You are in the chroot, so /etc/mtab is not present.

8G is too small for a Gentoo install. Without a GUI. you will need 20G and thats a squeeze.
Allow 40G for a GUI.

The kernel download is about 70Mb. It expands into temporary space te be 300Mb. The original 70 Mb is still there.
The 300Mb is copied, not moved, to its final home. So you need 670Mb to install the kernel as you transiently have two copies.

The kernel in a lot of small files. Each file needs an i-node. You may be out of i-nodes rather that disk space.

Your downloads accumulate in /usr/portage/distfiles
Broken builds accumulate in /var/tmp/portage. You decompressed kernel will still be there.

Some big packages need 8G of space in /var/tmp/portage just to build. You get this back once the install completes.

My portage tree uses 182538 i-nodes and takes up 436466k on a filesystem with a 1k block size.
With the default 4k block size, it will take up 2G. Thats just the portage tree.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Mon Sep 07, 2015 9:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
DanielC
n00b
n00b


Joined: 07 Sep 2015
Posts: 25
Location: Sweden

PostPosted: Mon Sep 07, 2015 9:25 pm    Post subject: Reply with quote

If I am out of inodes, I should not be able to create new files, right?

Code:

# echo "foo" > foo
# ls foo
foo
# cat foo
foo


So it's not the inodes.
Back to top
View user's profile Send private message
DanielC
n00b
n00b


Joined: 07 Sep 2015
Posts: 25
Location: Sweden

PostPosted: Mon Sep 07, 2015 9:30 pm    Post subject: Reply with quote

NeddySeagoon wrote:
DanielCarrera,

You are in the chroot, so /etc/mtab is not present.

8G is too small for a Gentoo install. Without a GUI. you will need 20G and thats a squeeze.
Allow 40G for a GUI.

The kernel download is about 70Mb. It expands into temporary space te be 300Mb. The original 70 Mb is still there.
The 300Mb is copied, not moved, to its final home. So you need 670Mb to install the kernel as you transiently have two copies.

The kernel in a lot of small files. Each file needs an i-node. You may be out of i-nodes rather that disk space.

Your downloads accumulate in /usr/portage/distfiles
Broken builds accumulate in /var/tmp/portage. You decompressed kernel will still be there.

Some big packages need 8G of space in /var/tmp/portage just to build. You get this back once the install completes.


Yeah, I see a copy of gentoo-sources-4.0.5 in /var/tmp/portage, so that's at least two copies of the kernel.

Ok. I will start over with a ~40G disk. Thanks for the help.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue Sep 08, 2015 2:09 pm    Post subject: Reply with quote

You can install Gentoo on 8G (I have), but you need a lightweight GUI (or none).
To increase the number of inodes on a device format it with eg: mkfs -t ext4 -T news,
which I've usually found to be sufficient.

Will
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Tue Sep 08, 2015 2:48 pm    Post subject: Reply with quote

cwr,

That makes a file system with 1k blocks. These days, you probably only want to do that for things like /usr/src/ and the ebuild tree.
Consider the slowdown using a filesystem with 1k blocks on underlying hardware that has a 4k physical block size.
If its a read mostly filesystem and you don't much care about write speed, go ahead and do it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Wed Sep 09, 2015 1:17 pm    Post subject: Reply with quote

Interesting - I always thought the -T option changed the proportion of inodes to data
blocks. Possibly I'm confusing it with -i.

Will
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum