Can I boot without GPU ("headless")?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Can I boot without GPU ("headless")?

Henry W. Peterson
Hello,

I have several Asus A320M-K motherboards with AMD Ryzen 3 1200 (which does not include a GPU) in very simple computers.

I installed OpenBSD on them using a GigaByte GT710 graphics card. After reboot, everything works perfectly.

My idea was to install and configure the systems with the graphics card and then remove it and control them by SSH (I only have one card).

I disabled at the BIOS the "Wait for F1 if Error" option so it continues booting without the GPU. I am pretty sure it does:

I encrypted the disk during installation with bioctl and softraid; if I do nothing, type intentionally a wrong password or simply press enter, the "num lock" led stays on and pressing the power button shut the system down in immediately. If I type the correct password, after 10 seconds the "num lock" led turns off and the power button only works if pressed for 5 seconds.

So I assume the kernel panics because the GPU is missing.

Do I need a graphics card installed all the time?

The motherboard has pins for a COM serial port, during installation I was asked if I wanted "com0" to become the default console. I said no.

Could I be booting the system had I said yes (without actually using the port, again, I would use ssh)?

If so, can I change this after installation?

If not, is there anything I can do to be able to boot without the graphics card?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Greg Thomas-2
This is old and things may have changed since then, but for the simple PC
without a graphics card that I used for a wireless AP running off of
compact flash this is all I did:

https://www.cyberciti.biz/faq/openbsd-connect-serial-console/



On Fri, Aug 28, 2020 at 12:29 PM Henry W. Peterson <
[hidden email]> wrote:

> Hello,
>
> I have several Asus A320M-K motherboards with AMD Ryzen 3 1200 (which does
> not include a GPU) in very simple computers.
>
> I installed OpenBSD on them using a GigaByte GT710 graphics card. After
> reboot, everything works perfectly.
>
> My idea was to install and configure the systems with the graphics card
> and then remove it and control them by SSH (I only have one card).
>
> I disabled at the BIOS the "Wait for F1 if Error" option so it continues
> booting without the GPU. I am pretty sure it does:
>
> I encrypted the disk during installation with bioctl and softraid; if I do
> nothing, type intentionally a wrong password or simply press enter, the
> "num lock" led stays on and pressing the power button shut the system down
> in immediately. If I type the correct password, after 10 seconds the "num
> lock" led turns off and the power button only works if pressed for 5
> seconds.
>
> So I assume the kernel panics because the GPU is missing.
>
> Do I need a graphics card installed all the time?
>
> The motherboard has pins for a COM serial port, during installation I was
> asked if I wanted "com0" to become the default console. I said no.
>
> Could I be booting the system had I said yes (without actually using the
> port, again, I would use ssh)?
>
> If so, can I change this after installation?
>
> If not, is there anything I can do to be able to boot without the graphics
> card?
>
> Thank you.
>
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
Thank you both for your answers

On Sat Aug 29 00:46:51 2020 PM Daniel Sullivan <[hidden email]> wrote:

>I log into an Edgerouter 4 all the time using the >COM port, and that thing has no graphics >hardware whatsoever. Should work!

I assume that does not have amd64 archictecture. Does it use at least i386 (like Intel Atom)? I'm wondering if that lack of need for graphics is also in place for amd64.

On Sat Aug 29 01:25:51 2020 PM Greg Thomas <get.misc.openbsd () gmail ! com> wrote:

>This is old and things may have changed since then, but for the simple PC
>without a graphics card that I used for a wireless AP running off
>compact flash this is all I did:
>
>https://www.cyberciti.biz/faq/openbsd-connect-serial-console/
>

Just to be sure, the CPU itself did not include a GPU either, right? Can you tell me what processor you were using?

Also, did you use a graphics card for installation and initial configuration before activating the serial console?

For both (and anyone else who'd like to join), if I choose "com0" as "tty" as the link Greg sent says, would I need to actually use it? I have the pins on the motherboard but not even a serial port card connected to them. As I said, I was planning to use ssh for the console.

Thank you both again.
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
(It seems there was a problem with the quotes in my previous reply)


To Daniel Sullivan <[hidden email]>:

I assume that does not have amd64 archictecture. Does it use at least i386 (like Intel Atom)? I'm wondering if that lack of need for graphics is also in place for amd64.


To Greg Thomas <get.misc.openbsd () gmail ! com>:

Just to be sure, the CPU itself did not include a GPU either, right? Can you tell me what processor you were using?

Also, did you use a graphics card for installation and initial configuration before activating the serial console?


To both (and anyone else who'd like to join):

If I choose "com0" as "tty" as the link Greg sent says, would I need to actually use it? I have the pins on the motherboard but not even a serial port card connected to them. As I said, I was planning to use ssh for the console.

Thank you both again.
________________________________
De: [hidden email] <[hidden email]> en nombre de Henry W. Peterson <[hidden email]>
Enviado: sábado, 29 de agosto de 2020 11:59
Para: [hidden email] <[hidden email]>
Asunto: Re: Can I boot without GPU ("headless")?

Thank you both for your answers

On Sat Aug 29 00:46:51 2020 PM Daniel Sullivan <[hidden email]> wrote:

>I log into an Edgerouter 4 all the time using the >COM port, and that thing has no graphics >hardware whatsoever. Should work!

I assume that does not have amd64 archictecture. Does it use at least i386 (like Intel Atom)? I'm wondering if that lack of need for graphics is also in place for amd64.

On Sat Aug 29 01:25:51 2020 PM Greg Thomas <get.misc.openbsd () gmail ! com> wrote:

>This is old and things may have changed since then, but for the simple PC
>without a graphics card that I used for a wireless AP running off
>compact flash this is all I did:
>
>https://www.cyberciti.biz/faq/openbsd-connect-serial-console/
>

Just to be sure, the CPU itself did not include a GPU either, right? Can you tell me what processor you were using?

Also, did you use a graphics card for installation and initial configuration before activating the serial console?

For both (and anyone else who'd like to join), if I choose "com0" as "tty" as the link Greg sent says, would I need to actually use it? I have the pins on the motherboard but not even a serial port card connected to them. As I said, I was planning to use ssh for the console.

Thank you both again.
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

xpetrl
In reply to this post by Henry W. Peterson
> The motherboard has pins for a COM serial port, during installation I was asked if I wanted "com0" to become the default console. I said no.

A serial port connection for headless system is really useful, you could
to enter the password for the encrypted disks and see the kernel's log
from a terminal.

Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Stuart Henderson
In reply to this post by Henry W. Peterson
On 2020-08-28, Henry W. Peterson <[hidden email]> wrote:

> Hello,
>
> I have several Asus A320M-K motherboards with AMD Ryzen 3 1200 (which does not include a GPU) in very simple computers.
>
> I installed OpenBSD on them using a GigaByte GT710 graphics card. After reboot, everything works perfectly.
>
> My idea was to install and configure the systems with the graphics card and then remove it and control them by SSH (I only have one card).
>
> I disabled at the BIOS the "Wait for F1 if Error" option so it continues booting without the GPU. I am pretty sure it does:
>
> I encrypted the disk during installation with bioctl and softraid; if I do nothing, type intentionally a wrong password or simply press enter, the "num lock" led stays on and pressing the power button shut the system down in immediately. If I type the correct password, after 10 seconds the "num lock" led turns off and the power button only works if pressed for 5 seconds.
>
> So I assume the kernel panics because the GPU is missing.

After typing the password, you should be at a boot prompt, so at that
point try typing blind "boot -c", "disable radeondrm", "quit" and see
if that lets it boot. (I am wondering if there is enough hardware to
trigger attaching the drm driver but it then goes on to fail; without
dmesg this is hard to tell).

If that works, to get them booting automatically you can either build a
custom kernel with radeondrm disabled, or modify the on-disk one with
"config -ef /bsd", "disable radeondrm", "quit". Note this would need
repeating after updating the kernel (e.g. for installing syspatches)
so I'd consider it a temporary measure until more information can be
obtained from the system to find a better fix.

(You can also try a different OS version, if you are running 6.7 then try
a -current snapshot or vice-versa, changes in the DRM code may have made this
behave differently.)

> Do I need a graphics card installed all the time?
>
> The motherboard has pins for a COM serial port, during installation I was asked if I wanted "com0" to become the default console. I said no.
>
> Could I be booting the system had I said yes (without actually using the port, again, I would use ssh)?

I suspect it would also fail, but (with a serial port connected to
another machine) would let you see information about the crash which
may help someone fix it.

> If so, can I change this after installation?

This changes two things; /etc/boot.conf is set to add "stty com0 <baudrate>"
and "set tty com0" (these can alternatively be typed at the boot loader
prompt), and /etc/ttys to enable a getty on the serial console.

If you're able to connect up a serial port (so, whatever is needed to
connect to the port header, plus a null modem cable to another machine)
then just typing the stty/set boot loader commands would be enough to
see any panic messages or see where it hangs, and so provide information
which might be enough to identify the problem.


Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Kenneth Gober
In reply to this post by Henry W. Peterson
On Fri, Aug 28, 2020 at 3:32 PM Henry W. Peterson <
[hidden email]> wrote:

> Do I need a graphics card installed all the time?
>
> The motherboard has pins for a COM serial port, during installation I was
> asked if I wanted "com0" to become the default console. I said no.
>

I believe the requirement is that the system always needs a console
device.  The console device does not need to use a graphics card,
however; a serial port is an acceptable console.  I am guessing the problem
you are having is you said no to using a serial console
on com0, then removed the video card so you couldn't have a wscons console
either.  If you had answered yes to setting com0 to
be the default console, things would probably have worked.

There are several i386/amd64 systems that are sold without graphics
hardware, e.g. the PC Engines APU2, and the Soekris
systems while they were still available.  They work fine using com0 as the
console.

-ken
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
To xpetrl <xpetrl () aol ! com>:

But then I would need to have every computer's serial port connected the whole time, right? As far as I know serial ports are not hot-swappable.


To: Stuart Henderson <stu () spacehopper ! org>

The used graphics card has an Nvidia chipset, GT710, not a Radeon. Since there is no specific drivers for this at OpenBSD, it uses the generic vga driver. But I get your point.

About dmesg, I read the ddb(4) manual and I understand that typing "boot dump", powering off after reboot and turning on with the card reinstalled would make the previous dmesg somewhere accesible, but I was trying to avoid this. I will not have physical access to the computer until monday and even then I will need to take the card from another computer.


To Kenneth Gober <kgober () gmail ! com>:

Isn't "APU" an AMD trademark for their processors with GPU integrated?

If I choose com0 as the default console but don't connect anything to it (not even a COM port card to the motherboard's COM pins) would it still fail because no console is detected?

Could I choose an ssh console instead? If I remember correctly, ssh consoles also have their /dev/tty"something" device.

Thank you all for your answers
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Ottavio Caruso
In reply to this post by Henry W. Peterson
On 28/08/2020 20:27, Henry W. Peterson wrote:

>
> Could I be booting the system had I said yes (without actually using the port, again, I would use ssh)?
>
> If so, can I change this after installation?
>
> If not, is there anything I can do to be able to boot without the graphics card?
>
> Thank you.
>


Not 100% sure if this answers you question, but I boot a qemu instance
of OpenBSD/amd64 6.6 with serial console enabled:

-daemonize -display none  -nodefaults \
-serial mon:telnet:127.0.0.1:6666,server,nowait \

and vga driver disabled:

- vga none -nodefaults \

And then I have this in boot.conf

$ cat /etc/boot.conf
stty com0 9600
set tty com0

and ttys:

$ grep tty00 /etc/ttys
tty00 "/usr/libexec/getty std.9600" vt220 on secure


I can then access the VM via either telnet (to the virtualized serial
console) or ssh.


--
Ottavio Caruso

Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

ian@
In reply to this post by Henry W. Peterson
On Sat, Aug 29, 2020 at 01:37:35PM +0000, Henry W. Peterson wrote:
> But then I would need to have every computer's serial port connected
> the whole time, right? As far as I know serial ports are not
> hot-swappable.
 
Nope. I have two APUs and only one is ever connected, since I have
only one USB-to-serial.  I move it back and forth as needed (which
isn't very often).

Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
To Ottavio Caruso <ottavio2006-usenet2012 () yahoo ! com>:

It definitely answers the question on how to define com0 as the default console after installation (the /etc/ttys part was specially helpful) and confirms the need to disable vga generic driver. Thank you.

To Ian Darwin <ian () darwinsys ! com>:

I assume that means the software would accept it. But still, as far as I know, it is not recommended from an electrical (and electronic?) point of view. A physical failure in these computers would not be acceptable, I would rather not take the risk.

Thank you both for your answers.

Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
To Ian Darwin <ian () darwinsys ! com>:

Sorry I didn't answer your first message, you sent it directly to Kenneth Gober with cc to me and I hadn't read it.

It is not a problem for me to write commands on the boot prompt after every turning on, that would eliminate the need to modify /etc/boot.conf, right? Althogh I didn't know modifying that file affected the boot prompt itself. Noted.

I do have another computer, the one I planned to use to connect by ssh, but I do not have COM port cards (only pins on the motherboard) nor the cables.

It starts to feel pretty clear that I should try the following:

After correctly typing the decryption password, type:
set tty com0
stty com0 9600
boot -c
disable vga
quit

Would this be enough to boot, to then connect by ssh (without modifying /etc/ttys or having even a COM port card connected to the motherboard's pins)?
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

ian@
On Sat, Aug 29, 2020 at 03:56:29PM +0000, Henry W. Peterson wrote:

> It is not a problem for me to write commands on the boot prompt after every turning on, that would eliminate the need to modify /etc/boot.conf, right? Althogh I didn't know modifying that file affected the boot prompt itself. Noted.
>
> I do have another computer, the one I planned to use to connect by ssh, but I do not have COM port cards (only pins on the motherboard) nor the cables.
>
> It starts to feel pretty clear that I should try the following:
>
> After correctly typing the decryption password, type:
> set tty com0
> stty com0 9600
> boot -c
> disable vga
> quit
>
> Would this be enough to boot, to then connect by ssh (without modifying /etc/ttys or having even a COM port card connected to the motherboard's pins)?

It should get you booted. In fact, it would probably work without the boot -c/disable vga/quit parts.
Setting the baud rate to 115200 might save a few seconds, too.

But then, if you have FDE, the mount will hang, as there's no way to enter the password, without a serial cable. "set tty com0" will tell init to read from the serial, not the physical keyboard

When you say "pins", is that a double row of pins sticking up? There are somewhat
standard cables you can buy that will plug into that and terminate in a DB9 male socket.

On the other computer, you can buy a USB-to-serial adapter/cable that will plug into the
DB9 socket. This is what I use, for example.

Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson

To Ian Darwin <ian () darwinsys ! com>:

But the password has already been entered, that is previous the boot prompt.

When I type "set tty com0", would that immediately switch console? I thought it established the console for the single user mode while loading /bsd (typical white letters on a blue background).

About the "pins"; yes, those are the ones. But I was assuming to use them on both ends. Are you suggesting the use of an USB to Serial adapter to safely disconnect the USB end of the cable and that it would make it then safe to disconnect the other end too?
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Greg Thomas-2
On Sat, Aug 29, 2020 at 10:48 AM Henry W. Peterson <
[hidden email]> wrote:

>
> To Ian Darwin <ian () darwinsys ! com>:
>
> But the password has already been entered, that is previous the boot
> prompt.
>
> When I type "set tty com0", would that immediately switch console? I
> thought it established the console for the single user mode while loading
> /bsd (typical white letters on a blue background).
>

Yes, it's been a long while but if you have a monitor and keyboard attached
you will no longer be able to use them.  For getting further info from the
boot  process you'll have to have a serial console attached.


>
> About the "pins"; yes, those are the ones. But I was assuming to use them
> on both ends. Are you suggesting the use of an USB to Serial adapter to
> safely disconnect the USB end of the cable and that it would make it then
> safe to disconnect the other end too?
>

Yes, I believe it's safe to remove them in any order actually.

Greg
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
To Greg Thomas <get.misc.openbsd () gmail ! com>:

Ok, one final question: Is there a way to make the boot process wait 5 seconds for commands in the vga+keyboard phase but when "set tty com0" then load the kernel automatically?

As a little test, I wrote in my personal computer's boot prompt "set tty pc0", it "switches to pc0" (it was already there, but shows again the "OpenBSD/amd64 BOOT X.XX" message)  and it waits indefinitely for commands.

If this happens in the ones with the serial port after "set tty com0", then I assume it would wait there indefinitely too.

Thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Greg Thomas-2
set timeout 5?

On Sun, Aug 30, 2020 at 2:50 AM Henry W. Peterson <
[hidden email]> wrote:

> To Greg Thomas <get.misc.openbsd () gmail ! com>:
>
> Ok, one final question: Is there a way to make the boot process wait 5
> seconds for commands in the vga+keyboard phase but when "set tty com0" then
> load the kernel automatically?
>
> As a little test, I wrote in my personal computer's boot prompt "set tty
> pc0", it "switches to pc0" (it was already there, but shows again the
> "OpenBSD/amd64 BOOT X.XX" message)  and it waits indefinitely for commands.
>
> If this happens in the ones with the serial port after "set tty com0",
> then I assume it would wait there indefinitely too.
>
> Thank you in advance.
>
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson
If I write at the boot prompt "set timeout 5" and then "set tty pc0" it waits indefinitely for new commands (as expected).

I was asking if there is a way to start a new timeout or instantly boot the kernel after the console switching without typing anything else (to switch to com0, without actually connecting a serial console, let it boot and then control the computer by ssh).
Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

trondd-2
On Sun, August 30, 2020 7:12 am, Henry W. Peterson wrote:
> If I write at the boot prompt "set timeout 5" and then "set tty pc0" it
> waits indefinitely for new commands (as expected).
>
> I was asking if there is a way to start a new timeout or instantly boot
> the kernel after the console switching without typing anything else (to
> switch to com0, without actually connecting a serial console, let it boot
> and then control the computer by ssh).
>

Once you hit a key on the keyboard, you've stopped the timeout.  If you're
typing on the keyboard, you can just type "boot" (or just "b") to boot it.
 You don't need a timeout.

If you put your com0 settings (or whatever else) into boot.conf, then you
don't need to type anything and the timeout applies and it'll boot on its
own.



Reply | Threaded
Open this post in threaded view
|

Re: Can I boot without GPU ("headless")?

Henry W. Peterson

To "trondd" <trondd () kagu-tsuchi ! com>:

It seems you have only read my last message and not the whole thread.

If I simply type "boot" with my keyboard, it does not boot because I removed the graphics card and the CPU does not include a GPU.

If I configure boot.conf to use com0 as its default console, I will not be able to type the password to decrypt the disk at boot, because I have COM pins at my motherboard but not the port itself nor the cables.

It seems clear to me now that the only thing I can do is to buy the serial communications ports and cables for all the computers (it is a subtantial expense I was trying to avoid because I can hardly afford it).

Thank you all for your help.
12