# Strange /etc/conf.d/net problems

## svidakovic

Hy all,

I have production server, running gentoo os. After UPS failure, the machine went in reboot. After that, nothing is working normally.

The NIC service is not starting, and because of that other services or not starting (Apache, MySQL, Named, netmount, etc...)

The output from console is:

```
server / # /etc/init.d/net.eth0 start

 * Please make sure that /etc/conf.d/net has $ifconfig_ set

 * (or $iface_ for old-style configuration)

server / #
```

The /etc/conf.d/net layout is:

```
config_eth0=( "xx.xx.xx.xx netmask 255.255.255.0 brd xx.xx.xx.xx" )

routes_eth0=( "default via xx.xx.xx.xx" )
```

The IP is static and public.

This server is also not near me, it is allocated in distance server farm. The admin in this farm, has told me that in boot some UDEV problems occur.

Help

Sasa

----------

## schachti

 *svidakovic wrote:*   

> After UPS failure, the machine went in reboot. After that, nothing is working normally.

 

Did you do a file system check?

----------

## svidakovic

 *schachti wrote:*   

>  *svidakovic wrote:*   After UPS failure, the machine went in reboot. After that, nothing is working normally. 
> 
> Did you do a file system check?

 

Can you help me, how can I do that?

----------

## svidakovic

 *svidakovic wrote:*   

>  *schachti wrote:*    *svidakovic wrote:*   After UPS failure, the machine went in reboot. After that, nothing is working normally. 
> 
> Did you do a file system check? 
> 
> Can you help me, how can I do that?

 

I did this:

```

damien ~ # fsck -n

fsck 1.38 (30-Jun-2005)

e2fsck 1.38 (30-Jun-2005)

Warning!  /dev/sda3 is mounted.

Warning: skipping journal recovery because doing a read-only filesystem check.

/dev/sda3 contains a file system with errors, check forced.

Pass 1: Checking inodes, blocks, and sizes

Deleted inode 1884127 has zero dtime.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 1962258 was part of the orphaned inode list.  IGNORED.

Inode 1962917 was part of the orphaned inode list.  IGNORED.

Inode 1966738 was part of the orphaned inode list.  IGNORED.

Inode 1966764 was part of the orphaned inode list.  IGNORED.

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

Block bitmap differences:  -9963 -13415 -25718 -(3779619--3779621) -(3779630--3779641) -(3779656--3779671) -(3779701--3779706) -(3779807--3779808) -(3779811--3779821) -(3779893--3779905) -(3779987--3780024) -3780029 -(3780056--3780073) -(3780080--3780123) -3934960

Fix? no

Free blocks count wrong (2456414, counted=2485109).

Fix? no

Inode bitmap differences:  -1884127 -1962258 -1962917 -1966738 -1966764

Fix? no

Directories count wrong for group #120 (51, counted=47).

Fix? no

Free inodes count wrong (1693471, counted=1691978).

Fix? no

/dev/sda3: ********** WARNING: Filesystem still has errors **********

/dev/sda3: 285121/1978592 files (2.8% non-contiguous), 1496994/3953408 blocks

damien ~ # 
```

----------

## schachti

ok, so there are errors on the file system - these corruptions most likely are caused by the power failure.

You could try to repair the file system, then copy a recent backup back to replace the damaged files.

----------

## svidakovic

 *schachti wrote:*   

> ok, so there are errors on the file system - these corruptions most likely are caused by the power failure.
> 
> You could try to repair the file system, then copy a recent backup back to replace the damaged files.

 

Can I do that on mounted file system? Can I execute without -n switch?

ps: I was born in Duderstadt

----------

## schachti

 *svidakovic wrote:*   

> Can I do that on mounted file system?

 

The file system should be mounted read-only. The best solution is to reboot using a live cd and repair it from the live cd. Another approach suggested some days ago in some other thread was to go to runlevel 1 where all file systems are mounted read-only, then do the checks.

 *svidakovic wrote:*   

> ps: I was born in Duderstadt

 

It's a small world!   :Wink: 

----------

## svidakovic

 *schachti wrote:*   

>  *svidakovic wrote:*   Can I do that on mounted file system? 
> 
> The file system should be mounted read-only. The best solution is to reboot using a live cd and repair it from the live cd. Another approach suggested some days ago in some other thread was to go to runlevel 1 where all file systems are mounted read-only, then do the checks.
> 
>  *svidakovic wrote:*   ps: I was born in Duderstadt 
> ...

 

Only problem is that server is in remote farm. It must be done local admin.

Anyway, tnx for fast reply.

----------

## svidakovic

What is more strange thing:

```
damien init.d # /etc/init.d/sshd start

 * Caching service dependencies ...                                                                        [ ok ]

 * Please make sure that /etc/conf.d/net has $ifconfig_ set

 * (or $iface_ for old-style configuration)

 * Please make sure that /etc/conf.d/net has $ifconfig_ set

 * (or $iface_ for old-style configuration)

 * ERROR:  cannot start named as net.eth0 could not start

 * ERROR:  cannot start sshd as net.eth0 could not start

damien init.d #  rc-status | grep ssh

 sshd                                                                                                           [ stopped  ]

damien init.d #  rc-status | grep net.eth

 net.eth0                                                                                                      [ stopped  ]

damien init.d # 
```

But I'm remotely connected to this machine!!!   :Shocked: 

----------

## UberLord

You need to etc-update and ensure that

1) /etc/init.d/net.lo gets updated

2) net.eth0 is a symlink to net.lo in /etc/init.d

----------

## svidakovic

 *UberLord wrote:*   

> You need to etc-update and ensure that
> 
> 1) /etc/init.d/net.lo gets updated
> 
> 2) net.eth0 is a symlink to net.lo in /etc/init.d

 

TNX TNX

working!!!

Sasa

----------

## svidakovic

 *UberLord wrote:*   

> You need to etc-update and ensure that
> 
> 1) /etc/init.d/net.lo gets updated
> 
> 2) net.eth0 is a symlink to net.lo in /etc/init.d

 

Hy UberLord, others...

everything works fine, except

```
damien ~ # rc-status 

Runlevel: default

 apache2                                        [ started   ]

 courier-authlib                               [ stopped  ]

 courier-imapd                                [ stopped  ]

 courier-imapd-ssl                           [ stopped  ]

 courier-pop3d                                [ stopped  ]

 courier-pop3d-ssl                           [ stopped  ]

 hotplug                                          [ started  ]

 local                                              [ started  ]

 mysql                                            [ started  ]

 named                                           [ started  ]

 net.eth0                                         [ started  ]

 netmount                                       [ started  ]

 postfix                                           [ started  ]

 postgrey                                        [ started  ]

 proftpd                                          [ started  ]

 saslauthd                                       [ started  ]

 sshd                                              [ started  ]

 syslog-ng                                       [ started  ]

 vixie-cron                                      [ started  ]

damien ~ # 
```

when the service courier-authlib is starting, following message appear

```
damien ~ # /etc/init.d/courier-authlib start

 * Starting courier-authlib: authdaemond ...                                                                                  [ !! ]

damien ~ # tail -f /var/log/messages

...

Jan 31 16:40:21 damien authdaemond: modules="authmysql authpam", daemons=5

Jan 31 16:40:21 damien authdaemond: Installing libauthmysql

Jan 31 16:40:21 damien authdaemond: Installation complete: authmysql

Jan 31 16:40:21 damien authdaemond: Installing libauthpam

Jan 31 16:40:21 damien authdaemond: Installation complete: authpam

Jan 31 16:40:23 damien authdaemond: stopping authdaemond children

...

```

Mail users are authenticated from MySQL db. In /etc/make.conf file, the mysql USE variable was commented, so maybe in upgrade something went wrong.

My question...

Is it posible to re-emerge the following packages with no MySQL upgrade. MySQL version is 4.0.24, and the packages that I want to re-emerge against this MySQL version would be:

1. postfix

2. courier-imap

3. courier-authlib

The manual, that I have follow http://www.gentoo.org/doc/en/virt-mail-howto.xml. I have found MySQL upgrade manual, but in this moment, I would like to skip it.

Tnx in advance,

Sasa

----------

## svidakovic

I have managed to mask MySQL package. but I have now following problem:

```
damien ~ # cat /etc/portage/package.mask    

>dev-db/mysql-4.0.24

damien ~ # emerge -pu courier-authlib

These are the packages that would be merged, in order:

Calculating dependencies  

 \

!!! All ebuilds that could satisfy "=dev-db/mysql-5.0*" have been masked.

!!! One of the following masked packages is required to complete your request:

- dev-db/mysql-5.0.26-r2 (masked by: package.mask)

- dev-db/mysql-5.0.32 (masked by: package.mask, ~x86 keyword)

- dev-db/mysql-5.0.34 (masked by: package.mask, ~x86 keyword)

- dev-db/mysql-5.0.38 (masked by: package.mask)

- dev-db/mysql-5.0.40 (masked by: package.mask)

- dev-db/mysql-5.0.42 (masked by: package.mask)

- dev-db/mysql-5.0.44 (masked by: package.mask)

- dev-db/mysql-5.0.44-r1 (masked by: package.mask)

- dev-db/mysql-5.0.44-r2 (masked by: package.mask)

- dev-db/mysql-5.0.54 (masked by: package.mask)

For more information, see MASKED PACKAGES section in the emerge man page or 

refer to the Gentoo Handbook.

(dependency required by "net-libs/courier-authlib-0.58" [ebuild])

damien ~ # 
```

Do I really need to upgrade to MySQL version 5, or is there some other way?

Please help,

Sasa

----------

