# No keyboard/network after boot

## hanj

I'm running gentoo as a firewall, and today there was a long power outage. After the power came up, I noticed things were still not happy. NICs are showing link, but shortly after init, keyboard stops working (USB or PS/2). NICs show up during init, but I have no way to see what's going on. 

I boot via Live CD.. and keyboard works. I go into grub/recovery and the interface is pingable, but again, I lose keyboard. 

I'm running 4.9.76. Any ideas where to look? I'm booting again into Live CD to ensure that USB support is there.. it was and should be working fine, but will confirm.

I just think it's totally weird that my PS/2 doesn't work as well

Thanks!

hanji

----------

## Jaglover

I'd look at the /var/log/messages after booting from live CD.

Also I suggest you remove the word URGENT from the title. It is considered rude.

----------

## hanj

 *Jaglover wrote:*   

> I'd look at the /var/log/messages after booting from live CD.

 

I even booted up with old hardened-sources kernel. No keyboard. No network. USB support is confirmed in all the kernels I booted in.

Looking for interesting things...

```
PNP: No PS/2 controller found. Probing ports directly

mousedev: PS/2 mouse device common for all mic

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver
```

messages does show

```
tg3 eth0: Link is up at 1000 Mbps, full duplex

8139too eth1: link up, 100Mbps, full-duplex

8139too eth2: link up, 100Mbps, full-duplex
```

```
/etc/init.d/ntp-client: Error: ntp-client failed to start
```

All of my internal machines are unable to ping 10.0.0.1

So it seems the interfaces are up. Not sure why no traffic is flowing.

It shows that USB HID is up, but USB keyboard does not work (tried multiple), and the one I'm using with the Live CD works fine.

PS/2 controller not found.. I'll look to see what needs to be enabled there.

Thanks!

hanji

----------

## hanj

 *Jaglover wrote:*   

> Also I suggest you remove the word URGENT from the title. It is considered rude.

 

Done.

----------

## Jaglover

Sometimes NVRAM where BIOS settings are stored gets corrupted, resetting it may be a good idea. Is the battery healthy? If not, your BIOS maybe reset itself 

 during power outage. The /var/log/messages is from your installation, not from liveCD, right?

----------

## hanj

 *Jaglover wrote:*   

> Sometimes NVRAM where BIOS settings are stored gets corrupted, resetting it may be a good idea. The /var/log/messages is from your installation, not from liveCD, right?

 

Correct. I pulled it from /mnt/gentoo/var/log/messages

Just curious, if the NVRAM was corrupted, wouldn't I have still have problem with the Live CD?

Also, verified that HID buss support =y. I think that is the only place for old PS/2?

Like I mentioned, keyboard works on BIOS, works at grub, but fails right after kernel load. Could this be a udev issue? I thought for sure, loading up an old hardened-sources kernel, things would be happy. 

Thanks for the help.

hanji

----------

## Jaglover

I'd do a dry run of fsck to be sure there is no filesystem corruption.

----------

## hanj

 *Jaglover wrote:*   

>  Is the battery healthy?

 

No. I do see a message about low voltage on the battery and clicked F1 to get past that. Could that be the problem??

----------

## Jaglover

Low battery means your BIOS settings will not survive power outages and the BIOS will reset to defaults. Possible cause for NVRAM corruption, too.

----------

## hanj

 *Jaglover wrote:*   

> Low battery means your BIOS settings will not survive power outages and the BIOS will reset to defaults. Possible cause for NVRAM corruption, too.

 

Okay.. I added a new battery in there. I didn't really set up anything in the BIOS prior. Drive is showing up. Onboard NIC is activated. Standard PCI nic cards for the other interfaces. I set system time and again, things appear booted. Interfaces show up. Services start. I wish I could get in there just to see if ping works. Still unable to get USB or PS/2 to work.

What do you about the NVRAM corruption?

I'll boot into live CD again and run fsck

Thanks!

hanji

----------

## Jaglover

https://www.groovypost.com/howto/reset-pc-bios-defaults-nvram-mac

There may be differences in terminology, don't pay attention.

----------

## hanj

 *Jaglover wrote:*   

> I'd do a dry run of fsck to be sure there is no filesystem corruption.

 

I ran fsck on all partitions.. and they came out clean.

h

----------

## hanj

 *Jaglover wrote:*   

> https://www.groovypost.com/howto/reset-pc-bios-defaults-nvram-mac
> 
> There may be differences in terminology, don't pay attention.

 

Since I removed the battery and replaced it.. that should have reset it no?

h

----------

## hanj

Ok.. just for giggles, I popped the drive into another machine... same problem. No keyboard. Unreachable cards. I *think* that removes the BIOS/NVRAM idea. What about udev?

Thanks!

hanji

----------

## Jaglover

Must be something wrong with openrc then, probably the initialization of system is broken. I never had any issues with openrc myself, so I have no first hand experience, but I believe openrc can be set to log verbosely, I'd see Gentoo wiki and have a closer look at /etc/rc.conf.

----------

## hanj

 *Jaglover wrote:*   

> Must be something wrong with openrc then, probably the initialization of system is broken. I never had any issues with openrc myself, so I have no first hand experience, but I believe openrc can be set to log verbosely, I'd see Gentoo wiki and have a closer look at /etc/rc.conf.

 

Set rc.log, verbose logging, and no complaints in there. I don't get it. I think the keyboard is right at kernel load. I'm unable to issue numlock right after grub... before rc.

----------

## hanj

Getting closer. I ditched the iptables start up script and I was able to ping and access the box. Restarting the iptables and loading the iptables state, locked me out again. So I think something weird happened in iptables. That addresses the network issue. Still need to get around the keyboard problem.

Thanks!

hanji

----------

## hanj

Okay.. network is back up. There was something definitely corrupted in iptables. Re-executed my iptables.sh script and saved it again, and I'm able to boot back in an operable system. My KVM, USB keyboard, and PS/2 keyboard still do not function at all when directly connected. I'm still going to dig into that.

Thanks

hanji

----------

