IMP: New format for net config in Gentoo (Read this!!!!!)
Beware if you update your world portage and accept the changes in /etc/conf.d/net when issuing "etc-update". It will replace the old file with one that has no config set by default (everything is commented out).
Do NOT reset your linode before editing /etc/conf.d/net. If you do, well … read on.
When booting, you will receive an error message like:
* Please make sure that /etc/conf.d/net has one of the following set:
* $iface_eth0 for old-style configuration
* $ifconfig_eth0 for new-style configuration
* $ipaddr_eth0 for iproute2-style configuration
.. and all following net dependant services (practically all of them) will fail to start since no net interface is up. If that happens and if you don't have another distro in which you can boot and neither the space to create one (debian-small is the smallest) then you're pretty much screwed
You will see the new net file has 3 possible configs you can choose from. I recommend the new-style one (the 1st one). You must uncomment the appropriate lines.
If you use dhcp then just uncomment the first line with the dhcp option.
If you use a static Ip like I am, then go some lines below and you will find the config lines for static IPs. Uncomment and modify to look like the one below:
ifconfig_eth0=(
" <your linode="" ip="">netmask 255.255.255.0"
)</your>
then again some lines below to activate the default gateway:
routes_eth0=(
"default gw 64.62.190.1"
)
… and replace 64.62.190.1 with your gateway.
That's about it. Go to the Linode web interface and reboot.
Cheers
p.s. There is one more issue though. If you boot into lish (your host's ssh) then everything goes ok, services start until "local", like this:
...
* Setting DNS domainname to mentalgate.net... [ ok ]
* Starting local... [ ok ]
INIT: no more processes left in this runlevel
And the lish hangs there … you no longer get the login prompt as you did before this update … You can login to your linode's ssh though with no problems.
Chris? any ideas on this one?
14 Replies
@mastabog:
p.s. There is one more issue though. If you boot into lish (your host's ssh) then everything goes ok, services start until "local", like this:
... * Setting DNS domainname to mentalgate.net... [ ok ] * Starting local... [ ok ] INIT: no more processes left in this runlevel
And the lish hangs there … you no longer get the login prompt as you did before this update … You can login to your linode's ssh though with no problems.
Chris? any ideas on this one?
Make sure your /etc/inittab's # TERMINALS section looks like this:
# TERMINALS
c0:12345:respawn:/sbin/agetty 115200 tty0 linux
#c1:12345:respawn:/sbin/agetty 38400 tty1 linux
#c2:12345:respawn:/sbin/agetty 38400 tty2 linux
#c3:12345:respawn:/sbin/agetty 38400 tty3 linux
#c4:12345:respawn:/sbin/agetty 38400 tty4 linux
#c5:12345:respawn:/sbin/agetty 38400 tty5 linux
#c6:12345:respawn:/sbin/agetty 38400 tty6 linux
PS. I just recently brought the Gentoo filesystem up to date, as noted by its new label "Gentoo Linux 2004-06-29", but I didn't have to make this change.
Can you share this section of your /etc/inittab that's not working properly?
Thanks,
-Chris
@mastabog:
If that happens and if you don't have another distro in which you can boot and neither the space to create one (debian-small is the smallest) then you're pretty much screwed
:( . Assuming you have the space to create a new distro, use the web-interface and install a new distro and mount the gentoo disk in it in some /dev/ubdX … then boot the new distro, login as root, mount the gentoo partition /dev/ubdX somewhere to gain access to it and start editing /etc/conf.d/net as shown below.
Lish would be an easier method to make the modifications (so long as it's working)…
-Chris
# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
.. there is no c0 and all other are uncommented. Thanks for the c0 line (could have taken it from my backup but …
@caker:
Lish would be an easier method to make the modifications (so long as it's working)…
That was the point:) . If you accept the changes in /etc/inittab then lish is dead and so's your linode if you do not edit your /etc/conf.d/net file accordingly:) .
Thanks a lot for the info.
Cheers
Adam
emerge sync
emerge -uDav world
etc-update
, accept the changes in etc/conf.d/net and etc/inittab and then you will
You are prolly still using the old /etc/conf.d/net file. The new structure is official. Try to sync before emerge-deep'ing world.
But I know for a fact that any updates I have done in the last 2 weeks I have not done anything special to the inittab and net updates.
Adam
preup_macchanger()
postup_bonding()
predown_bonding()
preup_linkdetect()
and the file is not around 12 Kb then you have the old format.
Cheers
Which package was emerged for the update and I will run it
Adam
>>> Unpacking sysvinit-2.84.tar.gz to /var/tmp/portage/sysvinit-2.84/work
>>> Unpacking rc-scripts-1.5.1.tar.bz2 to /var/tmp/portage/baselayout-1.10.1-r1/work
My guess is that the new rc-scripts-1.5.1 (part of baselayout) is responsible for the net file update. FWIK, sysvinit (init) is the parent of all processes creating processes from /etc/inittab. (Am I wrong?). sysvinit should be responsible for the /etc/inittab problem i described above which Chris helped solving.
So I would say you can just emerge the new baselayout package.
Note: I am using ACCEPT_KEYWORDS="~x86". This might be one reason for why you didnt have the update.
If I set that I have 112 items to upgrade!!
It also shows how much rubbish is on my linode.
I really need to start from scratch again.
Adam
Recently they discovered a bug in apache 2.0.4x (up to 2.0.49) which can eat up all system memory .. its on the front page of http.apache.org.
So instead of unmasking everyting everytime I emerged a package, i set ACCEPT_KEYWORDS in make.conf …
Or ask caker nicly to mainitain an x86 and a ~x86 image.
Adam
@caker:
PS. I just recently brought the Gentoo filesystem up to date, as noted by its new label "Gentoo Linux 2004-06-29", but I didn't have to make this change.
I just realised now … I did those updates when I installed the "ftp" package because in your Gentoo filesystem there is no ftp client. Try and see.
Cheers