blanchet
Guru
- Joined
- Apr 17, 2018
- Messages
- 516
Abstract
To have a lighter Linux virtual machine, you can enable the serial console and then remove the VNC device after the operating system installation with VNC.
But do you know that you can directly run the Debian 10 installer on the serial console without VNC ?
It is faster because you will not have to enable the serial console after the operating system installation.
Install Debian 10 with the serial console in bhyve
Open the VM creation wizard
Return to the VM list
Keep open the xterm window while powering on the VM
At the end of the installation
Navigate in the menu of the EFI boot manager
Now GRUB appears and the system boots
To have a lighter Linux virtual machine, you can enable the serial console and then remove the VNC device after the operating system installation with VNC.
But do you know that you can directly run the Debian 10 installer on the serial console without VNC ?
It is faster because you will not have to enable the serial console after the operating system installation.
Install Debian 10 with the serial console in bhyve
Open the VM creation wizard
Code:
1/ Operating System Guest Operating System: Linux Name: my_debian_server Description: debian server in serial mode System clock: Local Boot Method: UEFI [x] Start on Boot [_] Enable VNC 2/ CPU and Memory Virtual CPUs: 1 Memory: 2 GiB 3/ Disks (o) Create new disk Select Disk Type: Virtio zvol location: tank1 Size: 10 GiB 4/ Network Interface Adapter type: VirtIo Mac Address: <autogenerated> Attach NIC: <select you NIC> 5/ Installation Media /mnt/tank1/iso/debian-10.4.0-amd64-netinst.iso 6/ Confirm Options SUBMIT
Return to the VM list
- Open COLUMNS menu to display the Com Port of your new virtual machine and note it.
- For example
/dev/nmdm20B
- run xterm , because it interprets neither keys (F1, F2, etc) nor shortcuts unlike gnome-terminal
- connect with SSH to FreeNAS
- from a Windows computer, you can use PuTTY instead of xterm + ssh
- in the FreeNAS shell, connect to the virtual serial port of the virtual machine
- The FreeNAS webUI supports also the serial console, but it is not as reliable as xterm or PuTTY
Code:
freenas# cu -l /dev/nmdm20B
Keep open the xterm window while powering on the VM
- Select the entry Install (instead of Graphical Install)
- Press e to edit the command line
- Modify the vmlinuz line to add
vga=off
andconsole=ttyS0,115200n8
- Example
Code:
/install.amd/vmlinuz vga=off initrd=/install.amd/initrd.gz --- quiet console=ttyS0,115200n8
- Hit CTRL+X to boot
At the end of the installation
- Power off the VM
- Remove the CDROM device from the VM
- Power on the VM
- The EFI boot will fail (it is normal for Debian 10)
- Wait 1 minute, that the EFI shell appears
- Hit the key Esc
- Exit the EFI shell
Code:
Shell > exit
Navigate in the menu of the EFI boot manager
- Boot Maintenance Manager
- Boot from file
- <NO VOLUME LABEL ... GPT ...>
- <EFI>
- <debian>
- <grubx64.efi>
Now GRUB appears and the system boots
- Login as root and type the following commands to fix the EFI boot issue
Code:
mkdir -p /boot/efi/EFI/BOOT/ cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi
- The installation is finished
- Enjoy your new Debian 10 Linux server with a serial console.
Last edited: