LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-07-2020, 09:55 PM   #1
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Rep: Reputation: Disabled
Unhappy failed to start network service LFS systemd 9.1


I Was trying to configure the LFS systemd network configuration and i finished it but while booting the system shows error message:

failed to start network service

my .network file looks like this

[Match]
Name=eth0

[Network]
Address=192.168.43.12
Gateway=192.168.43.1
DNS=192.168.43.1

LinkLocalAddressing=no
IPv6AcceptRA=no


the screenshot
https://firebasestorage.googleapis.c...0-2c1b05ea9e78
 
Old 04-09-2020, 01:37 PM   #2
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I see you're doing that in Qemu. What you are trying to do with the static configuration in the guest like that simply will not work with the "user" (NAT) networking that will be in use by default as you will have no communication with the network. You would need to create a bridged interface on the host, a TAP interface on the host, and use the TAP interface in the guest in order for that to work.

How you would do so depends on the distro you are using. Kali Linux on the host? I'm not familiar with it, but I believe it's debian based. You can use your network manager, or search for information on the network system you are using. For example ifup/down or systemd-networkd.

https://kali.training/topic/configuring-the-network/
https://www.hiroom2.com/2017/07/22/k...7-1-bridge-en/
 
Old 04-09-2020, 01:46 PM   #3
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thankyou I'll try
 
Old 04-09-2020, 01:48 PM   #4
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
Even though I boot it in my original system it's the same issue
 
Old 04-09-2020, 03:03 PM   #5
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
OK, so you just loaded up what you built so far in Qemu so you could take screenshots etc.

So then, what does

"systemctl status systemd-resolved.service" say? Any useful information as to why the service is failing?

For a static config like that, I'd still put my nameserver in /etc/resolv.conf

[grogan@getstuffed:~]$ cat /etc/resolv.conf
#nameserver 208.67.222.222
#nameserver 208.67.220.220
nameserver 192.168.0.1

I used to specify them directly, but I'm running dnsmasq on my router (that's why I have those OpenDNS nameservers commented out, they are configured in my router). I would not put a search domain in my resolv.conf as most instructions say to do. It tends to cause delays.
 
Old 04-09-2020, 03:19 PM   #6
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Another thing, if you're going to use your NIC as "eth0" you probably need to edit a udev rule or it's going to want to use that "enp?S?" naming. Something like:

/etc/udev/rules.d/70-persistent-net.rules

Code:
# net device module
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="y:o:u:r:mac:address", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*" NAME="eth0"
 
Old 04-09-2020, 09:58 PM   #7
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
here are the screenshots
when i run systemctl status systemd-networkd.service
https://firebasestorage.googleapis.c...9-23d3d7fe2393

https://firebasestorage.googleapis.c...4-01e0eb0b77b4

when i run ip a i get
https://firebasestorage.googleapis.c...f-2a6ec01a8286

when i boot in my original system the enp0s3 is also missing
 
Old 04-09-2020, 11:10 PM   #8
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Well, your NIC is not eth0, it's enp0s3 so there's no way it's going to start with the network config you have. You can just make it easier on yourself and use Name=enp0s3

Now that error that systemd-networkd is throwing (200/CHDIR) generally means the service's working directory is unavailable at the time the service is trying to start. That could simply be due to a misconfiguration.

The first step would be to fix your network configuration and go from there.

Are your tempfs mounts like /run getting mounted?
 
Old 04-09-2020, 11:15 PM   #9
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
Yes
 
Old 04-09-2020, 11:17 PM   #10
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
I try to make the kernel with the host system config file,now I'm screwed so I'm rebuilding LFS systemd from beginning.

So from where should I have to take care of this problem(i mean which chapter)
 
Old 04-09-2020, 11:28 PM   #11
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Well, the chapters for systemd and networking would be:

6.73. Systemd-244
7.2. General Network Configuration

I have never built a LFS system with systemd and while I've had to use it in various distros, I'm not as familiar with it. I find it pretty cryptic when things are broken.
 
Old 04-09-2020, 11:43 PM   #12
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thankyou I'll finish it and let you know
 
Old 04-10-2020, 04:33 PM   #13
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I thought of something else later... your NIC is enp0s3 in the Qemu guest, that may not be what it is in the host. It should be the same as in your Kali Linux host distro, for the real install of LFS.

You can also figure it out from lspci. It works like this:

enp0s3

en - type of device, ethernet
p - from bus type (PCI includes PCI-E)
0 - PCI bus number (00:00.0) <---- unlikely on the host
s3 - slot number
 
Old 04-11-2020, 10:56 PM   #14
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
I tried rebuilding from scratch but same error. I loaded alx kernel module which is used by my host syatem. But after booting into LFS and type lspci it is showing e1000 but why is it not changing i also tried modprobe alx
 
Old 04-12-2020, 01:07 AM   #15
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
at last i changed the kernel module but staill the problem exist
 
  


Reply

Tags
linux from scratch, network, systemd



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
systemd service failed to start with errror : “main process exited, code=exited, status=3/NOTIMPLEMENTED” prcm Red Hat 10 02-25-2022 02:15 AM
Systemd service: AUTOSSH.service does not start at boot, how can I fix this? The_Linux_Machine Linux - Newbie 1 07-06-2016 12:00 PM
Can't access full journalctl from script via systemd service even though user is in systemd-journal group iwtbf Linux - Newbie 0 02-19-2016 02:44 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM

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

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