[SOLVED] My LFS doesn't connect to the internet by itself on the boot-up
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
[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...
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157
Rep:
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157
Rep:
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.