Bug #4571
closedscheduled firewall reboot crashes
Added by Bipin Chandra about 9 years ago. Updated about 9 years ago.
0%
Description
i have cron installed on all my firewall installs with an entry "/etc/rc.reboot" and scheduled to reboot firewall every week or every 2 weeks but when that happens it crashes and internet connection lost
Updated by Chris Buechler about 9 years ago
- Status changed from New to Feedback
- Target version deleted (
2.2.2) - Affected Version deleted (
2.2.1)
going to need more than this, it's certainly not as simple as a cron reboot crashes something.
Updated by Bipin Chandra about 9 years ago
when im logged into serial console and at that time the cronjob runs then it reboots fine but when serial console is not being used and it reboots it actually doesnt crash but gets stuck on a prompt during boot. When i opened serial console at that time and pressed enter, first i got 4 long lines of garbage characters then it said the below
#OK compile only
as many times i press enter it gives same reply, but on that screen if i type reboot it takes the command and reboots fine.
What i also noticed in console was there seems to be no option menu during boot to select slice to boot from like in the older pfsense versions so is this by design or the boot loader got messed up?
Updated by Chris Buechler about 9 years ago
what hardware is it? Can't think of ever hearing of a system that wouldn't boot without a serial console connected. also should show the F1/F2 prompt, not seeing that I wonder if the serial console is working correctly.
Updated by Bipin Chandra about 9 years ago
its an alix with nanobsd, serial console works fine and has always worked fine so far for me, actually im using a usb to ttl adapter and from ttl i convert using max 232 chip to serial to connect to alix, then i use tera term pro windows app
Updated by Bipin Chandra about 9 years ago
i figured out the reason for the F1/F2 prompts not showing, pfsense was set to serial baud rate of 115200 and alix bios also same along with my usb adapter, now when it boots i think pfsense assumes a startup baud rate of 9600 but only switches to 115200 after the F1/F2 prompt, thats y i was seeing the alix ram counter fine then few garbage characters and then i see 115200 printed and then again returns to normal text so i guess the prompt portion where u select the slice remains in 9600 and doesnt follow the settings in pfsense of 115200.
i set everything to 9600 and then booted and i got the prompt, now the part about the crash thing, ill test it with 9600 baud rate and get back to u
Updated by Bipin Chandra about 9 years ago
still crashing on reboot and when i login to check its actually stuck on reboot at the slice selection place.
regarding the baud rate difference on startup here is how it looks, when everything set at 152000, the slice selection comes as garbage
PC Engines ALIX.2 v0.99h
640 KB Base Memory
261120 KB Extended Memory
01F0 Master 044A CF 1GB
Phys C/H/S 2015/16/63 Log C/H/S 1007/32/63
èI½½Ñ½config: -S115200 -hConsoles: serial port
BIOS drive C: is disk0
BIOS 640kB/261120kB available memory
Updated by Kill Bill about 9 years ago
115200 works just fine here on many Alix boxes. Looks like you should just re-image the broken box.
Updated by Bipin Chandra about 9 years ago
ok, i reimaged the CF and now 115200 seems to work fine during slice selection, next thing to now test is the reboot using cron.
i have been using this CF since long and always have been only upgrading, dont remember when i last reimaged it so might be the boot loader or something was old on it which provided the slice selection menu.
Updated by Bipin Chandra about 9 years ago
still having issues in reboot, when serial console is attached and conencted then it reboots fine, when serial console is attached but not powered or conencted then reboot gets stuck, then when i connect to serial and press enter i just keep getting this
No
FreeBSD/x86 boot
Default: 0:ad(0,a)
boot: No
FreeBSD/x86 boot
Default: 0:ad(0,a)
boot: No
what wierd is when serial console attached but not connected and then i just unplug and replug power still it wont boot, it needs the serial console to be connected. Is it possible that a serial console adapter can cause such issues because on 2.1.5 using same adapter i never had such issues
Updated by Bipin Chandra about 9 years ago
i mean the serial cable needs to be removed then if i unplug power and replug or the schedule runs then it reboots fine
Updated by Kill Bill about 9 years ago
Huh? Powered? Never seen a externally powered null modem cable.
Updated by Bipin Chandra about 9 years ago
actually i use like this as my PC doesnt have a serial port
USB to TTL adapter -> TTL to RS232 (serial) adapter -> null modem serial cable -> alix box
now the situations r like this:
- remove the null modem cable from alix and reboot = reboots fine
- when everything connected and PC also on then there is like some signal voltage in the whole chain so then i reboot = reboots fine
- remove link from USB to TTL adapter to TTL to RS232 adapter = reboots fine
- remove USB to TTL adapter from PC = DOESN'T REBOOT
- keep everything connected but switch PC off, even power from main supply = DOESN'T REBOOT
last 2 scenarios this time i get stuck at the below screen
Consoles: serial port
BIOS drive C: is disk0
BIOS 17920kB/261120kB available memory
FreeBSD/x86 bootstrap loader, Revision 1.1
(root@pfs22-i386-builder, Mon Apr 13 20:28:31 CDT 2015)
can't load 'kernel'
Type '?' for a list of commands, 'help' for more detailed help.
OK
no idea how to deubug this issue and even find out whats causing it, the same setup has been working all good from a very long time till 2.1.5, issue started with 2.2.x
Updated by Bipin Chandra about 9 years ago
plus during pfsense boot it gives option to enter slice to boot from, that time using tera term not able to type 1 or 2 to select slice as well as after that it says press enter to boot or any other key to enter shell, thats a 5 second counter but that time also it wont take any keyboard inputs at all.
same hardware setup will take all keyboard inputs when on 2.1.5
Updated by Kill Bill about 9 years ago
Bipin Chandra wrote:
actually i use like this as my PC doesnt have a serial port
USB to TTL adapter -> TTL to RS232 (serial) adapter -> null modem serial cable -> alix box
Hmmm. Have fun. Redmine is certainly not the place to debug this.
Updated by Bipin Chandra about 9 years ago
well u use a usb to serial adapter or the above setup, the result is the same, not to mention not many new PC have a serial conenctor, but y is it that pfsense gets stuck on boot whereas the same hardware works fine with older pfsense as well as other things i do with raspberry pi and arduino etc
Updated by Chris Buechler about 9 years ago
- Status changed from Feedback to Not a Bug
this is something specific to probably your serial console setup, maybe in combination with something to do with the hardware in question. Not seeing anything here that's a replicable bug. If you find the specific root cause, please follow up.
Updated by Bipin Chandra about 9 years ago
i have ordered another serial adapter so once i get that ill test that and report as well as i have few other alix boxes in remote locations so once i get a chance to visit them ill test it there as well, so keep this open till then
Updated by Bipin Chandra about 9 years ago
i got the new usb to serial adapter and tried with my alix, still the issue persists, cant press any key on keyboard to change slice when booting as well as cant press any other key or enter to go through the 5 second countdown during boot, once booted then am able to use the serial console completely.
i tried the new adapter with pfsense 2.1.5 again and still everything good without issues
i did a signal trace as well and commands from PC are sent to alix but i guess the boot loader software doesnt respond at all
Updated by Bipin Chandra about 9 years ago
i did some research and it seems there is some issue relating to crosstalk between the TX and RX lines as the alix sends a +- 12V on its TX and any voltage greater than +-10V on the adapter causes crosstalk and some voltage leak on the RX line on the alix and this causes the issue.
But more interestingly, it only happens when all cables connected but adapter powered off, when everything powered on it doesnt seem to happen when connected to a windows PC because windows doesnt some filtering and when windows is off, freebsd doesnt seem to do any filtering of such rouge voltages so it converts everything to some character and this causes something to be fed in bootloader during boot and causing it not to boot.
i would recommend only accepting 1,2, enter and space bar inputs during boot and ignoring everything else. 1 and 2 for slice, enter to skip 5s countdown and space bar to goto shell
Updated by Bipin Chandra about 9 years ago
inspite of the crosstalk on the adapter, 2.1.5 still allows to select slice and press any key or enter to continue whereas 2.2.2 doesnt