Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jun 30, 2004 4:59 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
Recently (these days) Gentoo has changed the /etc/conf.d/net file format. I updated my apache 2.0.40 because of the new important bug they found in 2.0.4x versions and thought of updating my "world" also ... semi-bad idea :). Read on.

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:
Code:
 * 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 :(. 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.

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:
Code:
ifconfig_eth0=(
        "<your linode IP> netmask 255.255.255.0"
)

then again some lines below to activate the default gateway:
Code:
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:
Code:
...
 * 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?


Last edited by mastabog on Wed Jun 30, 2004 7:03 pm, edited 1 time in total.

Top
   
PostPosted: Wed Jun 30, 2004 6:29 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Thanks for the update...

mastabog wrote:
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:
Code:
...
 * 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:

Code:
# 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


Top
   
PostPosted: Wed Jun 30, 2004 6:33 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
mastabog wrote:
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


Top
   
 Post subject:
PostPosted: Wed Jun 30, 2004 7:00 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
Darn .. and I did notice that one single uncommented "c0" line before making the update but i overwrote it anyway :oops:. Here is the terminals section if you accept the change proposed by etc-update:
Code:
# 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 wrote:
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


Top
   
 Post subject:
PostPosted: Wed Jun 30, 2004 9:29 pm 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
Strange I brought my gentoo install up to date today and never ran into any of these problems.

Adam


Top
   
 Post subject:
PostPosted: Wed Jun 30, 2004 9:58 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
Code:
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.


Top
   
 Post subject:
PostPosted: Wed Jun 30, 2004 10:18 pm 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
Looks like I have already done that update, as some point.

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


Top
   
 Post subject:
PostPosted: Wed Jun 30, 2004 10:25 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
If your /etc/conf.d/net does not contain at the end some function definitions namely:
- preup_macchanger()
- postup_bonding()
- predown_bonding()
- preup_linkdetect()
and the file is not around 12 Kb then you have the old format.

Cheers


Top
   
 Post subject:
PostPosted: Thu Jul 01, 2004 8:52 am 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
looks like I still have the old one which is strange.

Which package was emerged for the update and I will run it

Adam


Top
   
 Post subject:
PostPosted: Thu Jul 01, 2004 9:48 am 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
From all the packages that I emerged before this update, only 2 seem eligible. Here are the log entries for the 3:

Code:
>>> Unpacking sysvinit-2.84.tar.gz to /var/tmp/portage/sysvinit-2.84/work

Code:
>>> 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.


Top
   
 Post subject:
PostPosted: Thu Jul 01, 2004 9:53 am 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
Using ACCEPT_KEYWORDS="~x86" is probably it.

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


Top
   
 Post subject:
PostPosted: Thu Jul 01, 2004 11:56 am 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
without the ACCEPT_KEYWORDS a gentoo system has some very (and i mean very) old packages. Take only php and apache2 for example ... 2 packages that should really be always up to date.

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 ...


Top
   
 Post subject:
PostPosted: Thu Jul 01, 2004 12:00 pm 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
It is probably something I will do next time I delpoy a gentoo image.

Or ask caker nicly to mainitain an x86 and a ~x86 image.

Adam


Top
   
 Post subject:
PostPosted: Thu Jul 01, 2004 12:01 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
Chris already updated the Gentoo image to the portage available on 2004-06-29 (very recent). But i'm afraid he didn't use ~x86


Top
   
PostPosted: Tue Jul 06, 2004 1:57 am 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
caker wrote:
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group