Discussion:
how to install OpenBSD in a computer with Linux and Grub2
(too old to reply)
tuyosi
2015-07-12 07:04:54 UTC
Permalink
the main process is install debian , and then isntall openbsd by
debian's grub2

1) on debian
download bsd.rd to /

rewrite /boot/grub/grub.cfg

menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)'
--class debian --class gnu-linux --class gnu
--class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root
48513cc3-0824-41d2-b0e2-33cefa6dfbc7
echo 'Loading Linux 3.2.0-4-amd64 ...'
kopenbsd /bsd.rd <---------------------------------
echo 'Loading initial ramdisk ...'
boot <---------------------------------
}

then boot by 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)'

then openbsd install begin

2)

write /etc/grub.d/40_custom
ーーーーーーーーーーーーー
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "OpenBSD" {
set root=(hd0,4)
chainloader +1
}


and update-grub


dual boot machine , happy
Gareth Nelson
2015-07-12 07:53:03 UTC
Permalink
Just reboot into grub, hit c to get the command line and type "kopenbsd
/bsd.rd" there, no need to edit the config twice
the main process is install debian , and then isntall openbsd by debian's
grub2
1) on debian
download bsd.rd to /
rewrite /boot/grub/grub.cfg
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)'
--class debian --class gnu-linux --class gnu
--class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root
48513cc3-0824-41d2-b0e2-33cefa6dfbc7
echo 'Loading Linux 3.2.0-4-amd64 ...'
kopenbsd /bsd.rd <---------------------------------
echo 'Loading initial ramdisk ...'
boot <---------------------------------
}
then boot by 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)'
then openbsd install begin
2)
write /etc/grub.d/40_custom
ーーーーーーーーーーーーー
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type
the
# menu entries you want to add after this comment. Be careful not to
change
# the 'exec tail' line above.
menuentry "OpenBSD" {
set root=(hd0,4)
chainloader +1
}
and update-grub
dual boot machine , happy
tuyosi
2015-07-12 10:24:12 UTC
Permalink
your oppinion is correct

----
Just reboot into grub, hit c to get the command line and type "kopenbsd
/bsd.rd" there, no need to edit the config twice
----

but i use rental server .
so i have no time to hit c .
so debian is booted .
so i try another way .

this install is convinet over network install .
if there is not kopenbsd , i first send install57.iso and start to install openbsd .
1 hour or more is costed and whole disk may be ocupied with openbsd only .
i want to use debian (typical linux server) also .

set root=(hd0,4) is wrong. set root=(hd0,4) is right .

and more i easily try snapshots upgrade .
------
regards
tuyosi
2015-07-18 23:31:02 UTC
Permalink
Hi all .

recently i use debian's grub2 as openbsd boot loader .

install debian in ext2fs. no swap , if 2GB space ok .
^^^^^^
and debian's
/etc/grub.d/40_custom
------------------------
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply
type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

#1
menuentry 'openbsd wd111111111111111111' {
#root (hd1,3)
set root='(hd1,msdos4)'
chainloader +1
}

#2
menuentry 'openbsd wd00000000000000000' {
#root (hd0,3)
set root='(hd0,msdos4)'
chainloader +1
}

#3
menuentry 'openbsd install-5.7' {
kopenbsd /bsd.rd-57
}

#4
menuentry 'openbsd install-snap' {
kopenbsd /bsd.rd-snap

#2 is used main openbsd .
#1 is used as spare or experimental .
#3 is used as openbsd 5.7 installer or upgrader .
#4 is used as openbsd snapshot installer .

in order to **update** bsd.rd-snap ,i run next script on **openbsd**(no
need boot debian) .

cat bsd-rd.bat
----------------------------
umont /mnt-deb
mount_ext2fs /dev/wd0i /mnt-deb
rm /mnt-deb/bsd.rd
wget -c ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd
mv bsd.rd /mnt-deb/bsd.rd-snap
ls -ltr /mnt-deb/bsd.rd*

i use rental server , so this procedure is very convinient .
----------------
thanks.

Loading...