Hard coding of ttyu0 for serial console stops systems booting without GPU and serial

Status
Not open for further replies.

thunderdan

Cadet
Joined
Apr 23, 2013
Messages
3
G'day,

Recently brought up a FreeNAS-8.3.1-RELEASE-p2-x64 system (first time FreeNAS) however problems arose when trying to go headless. I'm using Intel Server Board S1200KP with E3-1230 CPU so no GPU. To add insult to injury the bright sparks at Intel didn't include a system serial port on the board.

I can bring the system up with a gfx card in the PCIe slot, however I need that slot for a expansion SATA controller. When going headless the system is stopping somewhere.. It does load for a while.. I can see the USB stick flashing away but it doesn't get to Ethernet setup. This is probably not a BIOS issue, the board is designed to boot headless. (Confirmed headless boot with an Ubuntu server distro.. loaded up could ssh into it).

I believe the problem lies in the hard coding of the system serial port (usually COM1 in BIOS) to ttyu0. I noticed when running the system (with gfx card in) setting system->advanced->serial console would flag a kernel error 'ttyu0 no such file or directory'. looking further into this I removed the -D switch from the /boot.config leaving only -h i.e. serial console only. (according to FreeBSD manuls) On reboot (gfx card still in) it gets to "Boot: F1" and that's it...Bricked! I'm assuming it's falling over looking for /dev/ttyu0.

I'm thinking if the stream can be directed to /dev/null this could fix the problem...If /dev/null is available this early in the boot process.. ideally it could then be changed to a ttyUSBx device (or what ever FreeBSD calls USB serial adapters) when USB modules are loaded...

Unfortunately FreeBSD doesn't get a mention on my resume... until tonight, I'm a Debian kinda bloke.. but does this seem like a logical reason why i'm unable to boot headless? Without delving into the source and learning the ins and outs of FreeBSD my only workaround atm is to fork out another $300 for a Xeon with GPU.

Anyone shed some light?
 

tingo

Contributor
Joined
Nov 5, 2011
Messages
137
Re: Hard coding of ttyu0 for serial console stops systems booting without GPU and ser

What happens if you try to boot the image without serial console?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Re: Hard coding of ttyu0 for serial console stops systems booting without GPU and ser

Try turning off the loader -D option entirely and make the BIOS deal with it however it was designed to cope with totally headless operation. ttyu0 is a UNIXism that isn't relevant to the boot loader, which is using BIOS services to manage the console.
 

thunderdan

Cadet
Joined
Apr 23, 2013
Messages
3
Re: Hard coding of ttyu0 for serial console stops systems booting without GPU and ser

tingo - if i boot without serial console no go.. unless i have a gfx card installed. Assuming no gfx card installed:

a) -h option, serial console only: watching the USB drive light (and knowing what it should do for a successful boot (by having the gfx card installed)) it appears to stop very early in the boot process.

b) -D option, video and console (no gfx card): watching the USB stick LED, it seems to get a fair way through... I'd say close to bringing up Ethernet but no such luck!

I've tried other settings -P -hD no sugar.

jgreco - If i'm understanding your assistance correctly, you suggest removing the -D from /boot.config..? I have done this and tried a number of alternatives switches as described above. I was curious as to whether ttyu0 would actually exits that early on in the boot.. It certainly makes sense that it would use BIOS services at this stage... (although I'm an ARM developer so things work a little different here). However with the BIOS reporting no serial device (there is no on board serial) this could be why the boot process is falling over. This is obviously a rare case as almost all platforms have some form of serial port intervention - at least everything I've ever used!

However.. with no IGA and no serial port available... it makes for a challenging job if something were to bugger up down the track.. especially before Ethernet initialization! Although there should be a way to get FreeBSD to boot with my odd configuration... I believe I'd be better off getting the Xeon processor with a GPU. According to the FreeBSD handbook i'd have to roll a new kernel to make changes to the default console port... and even then according to http://www.freebsd.org/doc/en/books/handbook/serialconsole-setup.html it looks like it's a little fussy in terms of port options.

I'm still keen to get this working - if i get the GPU enabled Xeon I'll prob set it up with that and swap it out for the lower power non GPU... keep the other one for if/when something stops! Fat chance the parts supplier will take back a used processor because I made the wrong choice!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Re: Hard coding of ttyu0 for serial console stops systems booting without GPU and ser

It would be a little terrifying, but you can set "console=nullconsole" under tunables.

For kicks I tried this under VMware and was going to see if it would allow me to delete the video card from the VM, but it wouldn't. Sigh :smile:

Also of use might be the boot loader -q and -m flags.
 

tingo

Contributor
Joined
Nov 5, 2011
Messages
137
Re: Hard coding of ttyu0 for serial console stops systems booting without GPU and ser

Suggested workaround: leave the gfx card in, but don't connect a monitor.
BTW, you really shouldn't mess around with the boot options.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Re: Hard coding of ttyu0 for serial console stops systems booting without GPU and ser

For a mini-ITX build with a single slot, that might be a significant issue. Pretty sure OP already said he needed the slot.
 
Status
Not open for further replies.
Top