I achieved it by modifying GRUB when the VPS is still Debian. Debian version: 11
At reboot, press 'c' for the GRUB command line grub> ls (hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) grub> set root=(hd0,gpt2) grub> ls / ... grub/ vmlinuz... initrd.img... It means that (hd0,gpt2) is the /boot directory in Debian grub> reboot Reboot to Debian Append the following to the file /etc/grub.d/40_custom: menuentry "OpenBSD" { set root=(hd0,gpt2) kopenbsd /bsd } In /etc/default/grub: #GRUB_DEFAULT=0 GRUB_DEFAULT=2 #OpenBSD is the third entry Run the command update-grub Get bsd.rd and move to /boot Reboot and press 'c' for the GRUB command line grub> set root=(hd0,gpt2) grub> kopenbsd /bsd.rd grub> boot Install OpenBSD with the option Whole disk MBR (w) In disklabel, offset of 'a' partition must be 64. To be honest, I don't know if the modification of GRUB in Debian is needed. Or, installing with Whole disk MBR (w) is enough. But it works, OpenBSD is automatically started at reboot. When OpenBSD is running: # disklabel -p g sd0 ... 16 partitions: # size offset fstype [fsize bsize cpg] a: 19.0G 64 4.2BSD 2048 16384 12960 # / b: 1.0G 39857248 swap # none c: 20.0G 0 unused Il giorno gio 4 mag 2023 alle ore 09:13 Benjamin Stürz < benni+open...@stuerz.xyz> ha scritto: > On 03.05.23 10:52, Luca Di Gregorio wrote: > > I'm trying to install OpenBSD on a VPS with Debian/GRUB2. > > I get bsd.rd, in GRUB2 I launch the installer with: > > set root=(hd0,X) > > kopenbsd /bsd.rd > > boot > > > > The installation is ok, but GRUB2 still remains. > > So, when I reboot, GRUB2 menu appears, and OpenBSD can be started only > with: > > set root=(hd0,X) > > kopenbsd /bsd > > boot > > > > I would like to automatically start OpenBSD at reboot. > > > > Is it possible to overwrite GRUB2 in the installation process? > > Or, is it possible to add a GRUB2 entry in OpenBSD? > > Hi Luca, > > it should be possible, > if you choose "Whole disk MBR (w)" or "Whole disk GPT (g)" > before partitioning. > > Be aware that this will also erase your Debian install too. > > Best regards, > Benjamin Stürz > >