LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 08-27-2013, 07:10 AM   #1
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
Building LFS in VirtualBox with Ubuntu 13.04 Host


Hey everyone, since I have finally got a working LFS build after several attempts spanning a few years I decided to post a couple tips that helped me get a successful build

Configuration

As per the title, I used VirtualBox and had Ubuntu 13.04 as a host.

VirtualBox had the network type changed to bridged, but other than that I used default settings.

Ubuntu has most everything you need, it is missing gawk and bison so you will ned to install those with apt-get. Run the script that is provided to ensure nothing else is missing, I am recalling off the top of my head and I am pretty sure it's just those.

Next, verify the sym links. They are most likely pointing to the wrong place.
Double check the following are point to the right place by typing:
  • ls -la /bin/sh
  • ls -la /usr/bin/awk
  • ls -la /usr/bin/yacc

I'm fairly certain sh points to dash and awk not to gawk. If they're not pointing to the right place, remove them and then create the appropriate sym links.

Once that's done, that's pretty much all there is to it. Just make sure to make regular snapshots as you go through. I needed it once myself at the very end with the grub boot loader. I though I'd be smart and "correct" the grub.cfg file from hd0,1 to sdaX (the partition I had my LFS on). Needless to say it would suck pretty hard starting from scratch at that point had I not made a restore moments earlier (then again, I could've used a ISO to boot from).

Also, if you plan on using the latest kernel, install bc first as it's a requirement. Also, I just did a make defconfig for the kernel and that is working fine (wasn't too adventurous to begin with )

Anyways, hope that's of help to some

Now for me to tinker some more..
 
Old 08-27-2013, 08:57 AM   #2
DeeGee
Member
 
Registered: Apr 2013
Distribution: Debian, Linux From Scratch, Mint
Posts: 118

Rep: Reputation: 24
Cool thanks...
My build on VB was with Debian. Building now on Ubuntu, my primary OS. I feel that Ubuntu adds much more bloat to the build in a way.
 
Old 08-27-2013, 09:14 AM   #3
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by DeeGee View Post
Cool thanks...
My build on VB was with Debian. Building now on Ubuntu, my primary OS. I feel that Ubuntu adds much more bloat to the build in a way.
I much prefer debian myself, not to mention ubuntu runs pretty shockingly in a VM. When 7.4 becomes stable I'll give it another try but will this time try with a minimalistic iso from suse studio. In saying that though, it did the job so I can't complain too much
 
Old 08-27-2013, 02:39 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Why use ubuntu OR debian when there are better oses to build LFS on without all that tedious mucking about in hyper space - sorry symlinks had a 'guide flashback.

Slackware works straight out of the box and if you are going to download and use an iso on VB why not save yourself at least some pain.
 
Old 08-27-2013, 06:29 PM   #5
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Original Poster
Rep: Reputation: 38
Thanks for the tip, Keith. Will keep that in mind next time I build the system
 
Old 08-30-2013, 10:59 AM   #6
yjy4321
Member
 
Registered: Apr 2011
Distribution: Ubuntu
Posts: 42

Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
Why use ubuntu OR debian when there are better oses to build LFS on without all that tedious mucking about in hyper space - sorry symlinks had a 'guide flashback.

Slackware works straight out of the box and if you are going to download and use an iso on VB why not save yourself at least some pain.
I just try slackware. But it does not have binutils... ld command is not found....
 
Old 08-30-2013, 11:03 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
I find that Arch is a great build environment for LFS. I've not used Ubuntu.
 
Old 08-30-2013, 11:32 AM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by yjy4321 View Post
I just try slackware. But it does not have binutils... ld command is not found....
Yes it does it wouldn't work without them!
You have to install it is not a full blown 'Live' cd.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking Problem with Slackware on VirtualBox 4.1 on Ubuntu 11.04 as host insomniacs Linux - Virtualization and Cloud 1 04-11-2012 08:48 PM
Modifying ubuntu 10.04 to be a host to lfs 6.7 bisonapp Linux From Scratch 1 11-04-2010 09:48 AM
64-bit LFS with Ubuntu as Host.Some Queries: deepclutch Linux From Scratch 5 06-30-2010 07:30 AM
slack13 in virtualbox on a ubuntu host mutexe Slackware 4 12-01-2009 12:52 AM
Ubuntu Host Virtualbox guest Networking weirdness ddales Linux - Networking 0 01-20-2008 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration