LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
LinkBack Search this Thread
Old 11-30-2012, 09:31 AM   #1
erkant
Member
 
Registered: Oct 2012
Posts: 51

Rep: Reputation: Disabled
LFS: Error during Linux-3.5.2 kernel compilation (LFS 7.2, Section 8.3)


I'm having a problem while compiling the kernel. I configured it, and closed as many options as I could (at least I think so). But when I try to build it I get an error that there isn't enough space. I have allocated about 4GB space for my LFS, because I read that just 2.8GB would be enough, but unfortunately I can't compile it. I attached some screenshots, just in order for you to see my problem. Please note that I'm using /mnt/lfs-full directory for my LFS. Also note that in my source directory I have deleted all the untarred folder, so the only untarred folder there is linux-3.5.2, the one of the kernel. Picture with Gparted shows the available space before compiling the kernel.

What if I compile the kernel in my host machine and then just copy the needed files over to my LFS directory?
Attached Images
File Type: jpg 1.jpg (262.7 KB, 12 views)
File Type: jpg 2.jpg (254.3 KB, 10 views)
File Type: jpg 3.jpg (112.6 KB, 11 views)

Last edited by erkant; 11-30-2012 at 10:04 AM.
 
Old 11-30-2012, 10:08 AM   #2
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Rep: Reputation: 166Reputation: 166
It seems your sources folder has taken all the space, after you untar an archive and build and install it are you removing the untared folder? if not this would help.
 
Old 11-30-2012, 10:30 AM   #3
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Yes, after installing the tools, I remove the untared folder. At the moment the only untared folder is linux-3.5.2. If you also look at the picture with Gparted, there you can see the free space I have when linux-3.5.2 is untared. But I don't know why it takes that much space while compiling.
 
Old 11-30-2012, 10:44 AM   #4
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Rep: Reputation: 166Reputation: 166
I just had a look at my kernel folder after compilation and without doing a make clean ( so all the object files are still there ) the folder size is 779,780 bytes, looks like something is haywire, maybe some sort of recursion? Delete the unarchived folder and preferably the archive itself and try again ( you might want to keep the config file ).
 
Old 11-30-2012, 10:47 AM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,611
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi

Another way untar the tarball in ubuntu then move the untarred dir to lfs as root

The tar ball is 70mb
 
Old 11-30-2012, 11:32 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
The linux 3.5.2 build is +/- 5.8 Gb after a make (using defaults gathered by running make mrproper and starting and save/stopping make menuconfig).

The book mentions the size to be anywhere between 540 and 800 Mb, which is wrong.

You might consider the following to reduce the size of the kernel build and create extra disk space:
- unsetting the kernel options that you don't need,
- make the options static instead of modular,
- deleting all, but the linux package from your sources directory. After untarring the linux package, also delete this file.

Not sure if you are going to get it done with the amount of disk-space you have available.....

Last edited by druuna; 11-30-2012 at 11:36 AM.
 
Old 11-30-2012, 11:43 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Update on my previous reply:

Try the following:
Code:
$ cd /sources
untar kernel tarbal if needed
$ cd linux-3.5.2
$ make mrproper
$ make defconfig
$ make (and follow the rest of the book chapter)
The linux build directory tops out at +/- 780 Mb when I do the above.

You probably do have to adjust the options to your liking (which might increase the size).
 
1 members found this post helpful.
Old 11-30-2012, 11:45 AM   #8
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
If the size of linux kernel is about 5.8GBs, I will never be able to get it. I have about 2.2GB of free space initially, even if I delete the packages in my source directory they will save about ~400MB. I also unsetted a lof of the options that I don't need. I even put it in my host machines /usr/src directory and did "make bzImage" command, and the created kernel image was about 3.4MBs. I will try the above mentioned methods and let you know. Thanks.

Last edited by erkant; 11-30-2012 at 11:48 AM.
 
Old 11-30-2012, 12:52 PM   #9
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 727

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by druuna View Post
The linux 3.5.2 build is +/- 5.8 Gb after a make (using defaults gathered by running make mrproper and starting and save/stopping make menuconfig)....
Really? That big? - Wow never noticed as I always use a big old partition just in case! You live and learn!

P.S. Just found this:http://www.freebsd.org/doc/faq/kerne...why-kernel-big
have a look

Last edited by Keith Hedger; 11-30-2012 at 12:59 PM.
 
Old 11-30-2012, 01:20 PM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by Keith Hedger View Post
Really? That big? - Wow never noticed as I always use a big old partition just in case! You live and learn!
If you activate all the available options and make them modular there's a whole lot that needs to be build nowadays

I did mention that the book was wrong, but I do wonder if the authors had a reasonably tuned kernel in mind. Building a lean and mean kernel is part of the LFS build after all

Quote:
P.S. Just found this:http://www.freebsd.org/doc/faq/kerne...why-kernel-big
have a look
This talks about the kernel itself (the bzImage/vmlinuz file in Linux). And although the general information is correct for Linux, its a freeBSD site.
 
Old 11-30-2012, 02:44 PM   #11
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Make defconfig solved the problem. Thanks druuna!
 
  


Reply

Tags
config, configuration, error, kernel, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS: Error during GCC-4.7.1-Pass 1 (LFS 7.2, Section 5.5) erkant Linux From Scratch 7 11-28-2012 06:03 AM
[SOLVED] LFS: Error during changing ownership (LFS 7.2, Section 5.34) erkant Linux From Scratch 2 11-27-2012 11:25 AM
[SOLVED] LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2) erkant Linux From Scratch 4 11-26-2012 01:26 PM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM


All times are GMT -5. The time now is 12:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration