LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-06-2013, 09:59 AM   #1
giuliom_95
Member
 
Registered: Feb 2013
Distribution: Fedora
Posts: 47

Rep: Reputation: Disabled
My LFS doesn't connect to the internet by itself on the boot-up


I get this error during the boot-up of my LFS 7.2 machine (line copied from /var/log/boot.log):
Code:
Apr 06 17:59:39 +02:00 localhost  Bringing up the eth0 interface... skipped
It does not connect to the internet interface in the boot-up so I must bring it up as root after logging in (that's very annoying!). For debugging I've read the /etc/rc.d/rc3.d/S20network file, an default boot script provided by the LFS community for their book:
Code:
   start)
      # Start all network interfaces
      for file in /etc/sysconfig/ifconfig.*
      do
         interface=${file##*/ifconfig.}

         # Skip if $file is * (because nothing was found)
         if [ "${interface}" = "*" ]
         then
            continue
         fi

         /sbin/ifup ${interface}
      done
      ;;
So, I've supposed that it doesn't find the /etc/sysconfig/ifconfig.eth0 file but it exist because I write it by myself and it works because, as I've said before, I can connect to the internet by typing "ifup eth0" as root after logging in!
What's wrong?
 
Old 04-06-2013, 11:30 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
What do you get if after logging in you use the start up script ie
Code:
/etc/rc.d/init.d/network start
Does this bring it up? if not it looks like the script is not being run, the exec bit may not be set the symlink may be bad etc.
 
Old 04-06-2013, 11:36 AM   #3
giuliom_95
Member
 
Registered: Feb 2013
Distribution: Fedora
Posts: 47

Original Poster
Rep: Reputation: Disabled
Here's the output:
Code:
[root@localhost giulio]# ifdown eth0
  *  Removing IPv4 address 192.168.1.2 from the eth0 interface...                                                          [  OK  ]
  *  Bringing down the eth0 interface...                                                                                   [  OK  ]
[root@localhost giulio]# /etc/rc.d/init.d/network start
     Bringing up the eth0 interface... 
  *  Adding IPv4 address 192.168.1.2 to the eth0 interface...                                                              [  OK  ]
  *  Setting up default gateway...                                                                                         [  OK  ]
I've brought down the interface first for simulating boot-up conditions...
 
Old 04-06-2013, 11:46 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
As the script when called directly starts fine and brings up the interface it's probably a symlink problem you may not have a symlink in the right place at the right run mode check to make sure that the symlink is ok and not broken.

What is your default runmode set to? it will be in the inittab.

Last edited by Keith Hedger; 04-06-2013 at 11:47 AM.
 
Old 04-06-2013, 11:53 AM   #5
giuliom_95
Member
 
Registered: Feb 2013
Distribution: Fedora
Posts: 47

Original Poster
Rep: Reputation: Disabled
My default runlevel is 3. There is a symlink called S20network that points to /etc/rc.d/init.d/network script
 
Old 04-06-2013, 12:02 PM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Do a reboot and post the output of
Code:
ifconfig
BEFORE manually bringing up the network
 
Old 04-06-2013, 12:24 PM   #7
giuliom_95
Member
 
Registered: Feb 2013
Distribution: Fedora
Posts: 47

Original Poster
Rep: Reputation: Disabled
Well, that's look very strange... it seems that there isn't a command called 'ifconfig'! Maybe I miss a package?
 
Old 04-06-2013, 12:38 PM   #8
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
Hi

Ifconfig is part of blfs
http://www.linuxfromscratch.org/blfs...net-tools.html

Hi Keith
 
Old 04-06-2013, 01:06 PM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Hi Spiky

Sorry forgot to say that you may have to install it!
 
Old 04-07-2013, 06:14 AM   #10
giuliom_95
Member
 
Registered: Feb 2013
Distribution: Fedora
Posts: 47

Original Poster
Rep: Reputation: Disabled
Here's the output:
Code:
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436  metric 1
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
Old 04-07-2013, 06:29 AM   #11
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Looks a bit odd, can't say why, but definitely no eth0, so for some reason I still think the network script is not being run, do you have a single partition with lfs on it? I mean do you have /usr /etc on different partitions?
As a work around you could just tack the command to bring up the network into /etc/init.d/rc somewhere but obviously it would be best to find out why the script is not running/failing.
Can't think of anything else to suggest at the moment, sorry
 
Old 04-07-2013, 08:20 AM   #12
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by giuliom_95

I get this error during the boot-up of my LFS 7.2 machine (line copied from /var/log/boot.log):
Code:
Apr 06 17:59:39 +02:00 localhost  Bringing up the eth0 interface... skipped
Quote:
Originally Posted by giuliom_95

I can connect to the internet by typing "ifup eth0" as root after logging in!
Maybe your ifconfig.eth0 file has ONBOOT=no. The following is from /sbin/ifup...
Code:
# Do not process this service if started by boot, and ONBOOT
# is not set to yes
if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
   log_info_msg2 "skipped"
   exit 0
fi
Anyway, it fits the described problem. No harm looking.
 
1 members found this post helpful.
Old 04-07-2013, 02:18 PM   #13
giuliom_95
Member
 
Registered: Feb 2013
Distribution: Fedora
Posts: 47

Original Poster
Rep: Reputation: Disabled
Ops... sorry this great fuss over nothing. Thanks stoat!
 
  


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
I use mobile with usb-modem to connect to internet , how do i configure it in my LFS? aashayshah Linux From Scratch 14 07-01-2014 11:29 AM
internet doesn't connect in backtrack mr.cracker Linux - Newbie 1 02-06-2013 04:42 PM
[SOLVED] ASUS P5SD2 VM motherboard doesn't connect to Internet hpasi Linux - Newbie 1 05-09-2011 01:55 PM
MEPIS doesn't connect to the internet. Joe_User Linux - Networking 8 08-15-2006 04:31 PM
SUSE Doesn't Connect to Internet with SBC Yahoo! DSL Ninurta SUSE / openSUSE 14 10-08-2005 12:24 AM

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

All times are GMT -5. The time now is 03:25 PM.

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