LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-19-2011, 01:15 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Networking in LFS


I finally got my LFS system to boot again (), but I can't really continue without an internet connection to get more packages.

The LFS system is in a VirtualBox VM.

So how do I commect it to the internet? I know hardly anything about networks other than that you can enter a URL or address and you can magically transfer data to and from the address.

Last edited by MTK358; 06-19-2011 at 01:17 PM.
 
Old 06-19-2011, 02:38 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Is dhcp used by VirtualBox VM to give network access? If so: Have a look here: BLFS - DHCP and DHCP Client Configuration

LFS already covered the setup for the static configuration (chapters 7.11, 7.12, 7.13).

If dhcp is needed and you did do chapter 7.13.2, do remember to remove the ipv4 file. Make sure that directory holds just the one(!) config file, be it ipv4 for static or dhclient for dhcp.

Hope this helps.
 
Old 06-19-2011, 02:58 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
What do you mean by "used by VirtualBox"?

In case this is a misunderstanding about VMs, remember that a VM works just like a physical PC to the smallest detail.

As far as I know it the VirtualBox emulates a wired connection.
 
Old 06-19-2011, 03:01 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
If you setup your virtual machine to use the NAT-option for the network Virtualbox will run a DHCP-server for the network the VM is in. But off course you can setup your OS with static network settings.
 
Old 06-19-2011, 03:18 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by TobiSGD View Post
If you setup your virtual machine to use the NAT-option for the network Virtualbox will run a DHCP-server for the network the VM is in. But off course you can setup your OS with static network settings.
What is "NAT", and what do you mean by "the network the VM is in"?
 
Old 06-19-2011, 03:26 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
NAT is the abbreviation of Network Address Translation. If your VMs network controller is set to NAT Virtualbox acts the same way as a router. It runs a DHCP server and puts your VM into its own network. If you set it to Bridged the VM will act as it would be in the same network the host is in.
 
Old 06-21-2011, 11:28 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I started this thread to figure out some things that I don't understand: http://www.linuxquestions.org/questi...orking-887346/

Anyway the LFS system is not intented to be a server or router. All I want is to be able to download files from the Internet.

As far as I know, I have a dynamic IP address.
 
Old 06-21-2011, 11:45 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by MTK358 View Post
As far as I know, I have a dynamic IP address.
Quoting the now relevant parts from post #2:

Quote:
Have a look here: BLFS - DHCP and DHCP Client Configuration

If dhcp is needed and you did do chapter 7.13.2, do remember to remove the ipv4 file. Make sure that directory holds just the one(!) config file, be it ipv4 for static or dhclient for dhcp.
About the dhclient file: You probably do not need the <add additional start parameters here> parts, just leave the -q and -q -r setting as is.

Hope this helps.
 
Old 06-21-2011, 02:20 PM   #9
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I didn't get anywhere even close to that part of the LFS book. How do they expect me to do all the preceeding steps without networking?!?!?!?!?

I guess I have to download them on the host machine, make a CD image from them, and mount that on the VM.

Last edited by MTK358; 06-21-2011 at 02:21 PM.
 
Old 06-21-2011, 02:30 PM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
What part are you upto in lfs
 
Old 06-21-2011, 02:32 PM   #11
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by spiky0011 View Post
What part are you upto in lfs
Stuck at the beginning of chapter 4 (unable to download packages because of no networking).
 
Old 06-21-2011, 02:38 PM   #12
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Can you download them on to a pen drive then transfer them to lfs, I know it,s long way round, but if you get all the packages on to pendrive you could just get them as you want. I done lfs 6.7 they supply a tar ball of all packages, I just exploded it into source dir. 6.8 dosn't do a complete tar of all packages so a pendrive is next best
 
Old 06-21-2011, 02:39 PM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Until you have a working network you need to be a bit creative:

Just a thought:
- download, using host that runs VM, the needed packages and put on an usb stick,
- mount usb stick from LFS (VM client).

Hope this helps.
 
Old 06-21-2011, 02:48 PM   #14
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Will this help http://www.hotfilesearch.com/downloa...s-6.8.tar.html
 
Old 06-21-2011, 03:40 PM   #15
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Why use a USB stick? What I would do is make an ISO image and put it in the virtual CD drive.

Quote:
Originally Posted by spiky0011 View Post
How will the LFS packages help me do BLFS?
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
LFS Linux Live Networking Issues thomas55 Linux From Scratch 0 07-21-2009 05:49 AM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM

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

All times are GMT -5. The time now is 07:44 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