Linux would not normally boot as soon as you take away the graphics card, the solution to this is to set it to serial mode, with Grub 2 (Such as debian buster and bullseye), there is no menu.1st file, and you should not edit /boot/grub/grub.cfg by hand, what you need to edit is /etc/default/grub, in this file you will need to
1- Change GRUB terminal to console and ttyS0. This will provide one GRUB to a monitor display and serial console.
2- Remove hidden parameter for avoiding “no video mode activated” error. And change GRUB timeout from 8 seconds to 1 second.
3-Change linux kernel console to tty1 and ttyS0. This setting will be taken over to userland, and there will be two login prompt for tty1 and ttyS0.
On my debian setup, the file looks like this, and it works, but make sure to take a backup of the file just in case before you modify anything
Now you will need to run the command