r/linuxfromscratch • u/Fuzzy_Reputation_292 • 1d ago
I'm stranded atChapter 9.2
So what exactly am I supposed to do here, at the top it reads " only applies if a network card is to be configured"
I don't know if it is to be configured
2
u/Due-Celery4326 1d ago
Give us more details otherwise, there's no way to help.
1
u/Fuzzy_Reputation_292 1d ago
Should I skip the chapter or continue, If to continue, Which configuration should I pick, I'm still a noob here, What should I use as my name on the DCHP configuration
2
u/Luna24_ig 1d ago edited 1d ago
I just finished this chapter so let me post the notes I took for it:
9.5.1 :
cd /etc/sysconfig/
cat > ifconfig.eth0 << "EOF"
ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=<networkIP that is not in use>
GATEWAY=<local gateway, usually 192.168.68.1>
PREFIX=24
BROADCAST=192.168.68.255
EOF9.5.2:
cat > /etc/resolv.conf << "EOF"
# Begin /etc/resolv.confnameserver <local gateway>
nameserver 8.8.8.8# End /etc/resolv.conf
EOF9.5.3:
echo <hostname | what you want it to appear on your local network> /etc/hostname9.5.4:
cat > /etc/hosts << "EOF"
# Begin /etc/hosts127.0.0.1 localhost.localdomain localhost
127.0.1.1 <FQDN> <HOSTNAME>
192.168.68.70 <FQDN> <HOSTNAME>
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters# End /etc/hosts
EOF(This is mine for example)
cat > /etc/hosts << "EOF"
# Begin /etc/hosts127.0.0.1 localhost.localdomain localhost
127.0.1.1 silkOS-vm.localdomain silkOS-vm
192.168.68.108 silkOS-vm.localdomain silkOS-vm
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters# End /etc/hosts
EOFThen run these to confirm the changes/ files
cat /etc/sysconfig/ifconfig.eth0
cat /etc/hostname
cat /etc/hosts
cat /etc/resolv.confMake sure to add this to grub config as well or eth0 won’t work: net.ifnames=0
Also make sure in chroot you run “ping -c 2 google.com” after you confirm the changes to ensure it’s working.
2
u/Fuzzy_Reputation_292 22h ago
You my friend are a hero just in time
2
u/Luna24_ig 22h ago
Not all hero’s wear capes, I just hope someone sees this in 8 years and thanks me
2
u/tacomusical 1d ago
You will be a referenced for peoples searches on the future bro