openbsd.org 15 KB

this is a good guide to help install your openBSD system in qemu

https://wiki.qemu.org/Hosts/BSD#VM_setup_2

after install run man afterboot

read /usr/X11R6/README

Installing packages is

#+BEGIN_SRC sh :results output :exports both pkg_add -v chromium emacs #+END_SRC

lots of the openBSD configuration is found in /etc/rc.conf.

I should not hand edit /etc/rc.

Most of my edits should go in /etc/rc.local.

/etc/examples has good configuration options

building software yourself:

from here: https://wiki.qemu.org/Hosts/BSD#VM_setup_2

Make sure that the filesystem you're building and running QEMU from has the "wxallowed" option set in /etc/fstab, like:

d3651b0622794af6.k /home ffs rw,wxallowed,nodev,nosuid 1 2

then either reboot or use "mount -uo wxallowed /wherever" to set it for this session. (This is necessary because QEMU assumes it can map memory RWX for TCG and 'make check' will fail if it can't.)

updating the system is done via syspatch

I have to enable doas

I have to create the file /etc/doas.conf.

I need to enable X via /etc/rc.conf.local.

Or via the command

#+BEGIN_SRC sh :results output :exports both rcctl enable xenodm rcctl start xenodm #+END_SRC

In order to boot OpenBSD I may need to use rEFInd

However from this page

https://www.rodsbooks.com/refind/installing.html#manual

rEFInd may only work for booting UEFI

This webpage seems to say the same:

https://wiki.archlinux.org/title/REFInd#Installing_the_rEFInd_Boot_Manager

https://www.openbsd.org/faq/faq4.html#Multibooting

rEFInd is reported to usually work. GRUB is reported to usually fail. In either case, you are completely on your own.

I should also ensure that the root partition for OpenBSD is using one of the primary MBR partitions. Using an extended root partition may not work.

I could help the openBSD project by just purchasing hardware:

https://www.openbsd.org/want.html

what kind of hardware does openBSD run on:

Old Thinkpads!

https://www.reddit.com/r/openbsd/comments/byrxte/what_laptoppc_for_using_openbsd_with_a_desktop/

Old AMD laptops. https://www.openbsd.org/amd64.html

basic install book

https://www.openbsdhandbook.com/installation/

getting xfce to work in openBSD

https://opensource.com/article/20/10/old-hardware-openbsd

the openBSD amd64 boot process:

https://www.openbsd.org/faq/faq14.html#BootAmd64

It looks like openBSD includes its own bootloader that it installs in the PBR (partition boot record), which is the first 512 bytes of the MBR...I think. That may be mis-stated.

the libreboot guide for using openBSD says that libreboot can boot openBSD 6.1.

It also recommends to use the seabios payload to boot openBSD.

https://libreboot.org/docs/bsd/openbsd.html

GRUB supports booting OpenBSD kernels directly. However, you’re better off simply using the SeaBIOS payload; BSD works well with BIOS or UEFI setups.

This guide is written for OpenBSD 6.1, but it can be adapted easily for other versions (of OpenBSD).

#+BEGIN_SRC sh :results output :exports both grub> kopenbsd (usb0,openbsd1)/6.1/amd64/bsd.rd grub> boot #+END_SRC

here are some unofficial openBSD forums:

http://daemonforums.org/index.php

I can try to install openBSD by creating a boot-able cd rom!

what is this site? http://www.openbsdsupport.org/

apparently libreboot/coreboot does NOT support chainloading

https://www.gnu.org/software/grub/manual/grub/html_node/Supported-kernels.html

how to install openBSD via libreboot awesome mailing list post

openBSD may have a hard time booting because it makes BIOS calls and/or the libreboot video BIOS replacement. It might be possible to boot openBSD in text-only mode...

This is a VERY detail guide for the X200. Apparently openBSD. It talks a lot about the framebuffer support. https://lists.gnu.org/archive/html/libreboot/2016-04/msg00010.html

A good mailing list email:

https://lists.gnu.org/archive/html/libreboot/2015-05/msg00003.html

Another good mailing list post about SeaBIOS:

https://lists.gnu.org/archive/html/libreboot/2015-10/msg00017.html

I should probably NOT try any of this: https://www.endeer.cz/bios.tools/bios.html

This guys knows lots about libreboot https://www.quietlife.nl/

conversation with leah rowe:

Hello osboot people! I'm trying to play around with openBSD...and I'm trying to boot openBSD via osboot... [12:21] grub payload right? do you have seabios available in the grub boot menu? if so, select seabios I've tried the grub payload and the seabios payload. use that for openbsd oh right, yeah do you have corebootfb or txtmode rom? when you boot, does the text in grub look like it's really low res. or does it look like native resolution [12:22] use a rom with txtmode in the file name, and use seabios that's the most reliable way to boot openbsd leah, I actually don't know...you built an image for me. I was probably one of the first osboot users. You quickly made me an image for a T400... ah t400 just switch to libreboot 20210522 [12:23] but before you do: if the reason you want osboot is because microcode, tell me and i'll tell you how to extract that from your current osboot rom, and insert it into the libreboot rom i recommend using libreboot 20210522 on that machine at the time of giving you an osboot rom for it, osboot was more up to date than libreboot yes. I do want to use microcode. without it my computer crashes like once a week. :( now libreboot is more up to date. osboot uses coreboot 4.13 at present. libreboot uses 4.14 [12:24] ok, do this for me: sudo flashrom -p internal -r dump.bin just a second show me the output of this command, on a paste site the -r option dumps your current rom to a file. we will be extracting the microcode from that will do...for now, I'll have to reboot with the linux option "relaxed" or something...I'll be back in a bit. [12:25] yes also you may be the most helpful and responsive free software maintainer that I know! may I ask about the next osboot release/future direction? just curious. [12:26] also how out of date is this guide: https://lists.gnu.org/archive/html/libreboot/2016-04/msg00010.html ERC>

ok leah, my pastbin: [12:43] https://paste.debian.net/1204696/

Welcome to fish, the friendly interactive shell Type help for instructions on how to use fish joshua@dobby ~> sudo flashrom -p internal -r dump.bin Password: flashrom v1.2 on Linux 5.12.16-gnu (x86_64) flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). coreboot table found at 0x7f770000. Found chipset "Intel ICH9M-E". Enabling flash write... OK. Found Macronix flash chip "MX25L6405" (8192 kB, SPI) mapped at physical address 0x00000000ff800000. Found Macronix flash chip "MX25L6405D" (8192 kB, SPI) mapped at physical address 0x00000000ff800000. Found Macronix flash chip "MX25L6406E/MX25L6408E" (8192 kB, SPI) mapped at physical address 0x00000000ff800000. Found Macronix flash chip "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F" (8192 kB, SPI) mapped at physical address 0x00000000ff800000. Multiple flash chip definitions match the detected chip(s): "MX25L6405", "MX25L6405D", "MX25L6406E/MX25L6408E", "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F" Please specify which chip definition to use with the -c option.

ok, do this: [12:44] sudo flashrom -p internal -r dump.bin -c MX25L6405D tell me when that's finished, and i'll tell you the next step will do. thanks again for the help! this should only take a few minutes. the rest is easy openbsd works well with the latest libreboot release [12:45] done. I now have a dump.bin file. :) now download the libreboot 20160907 util archive ok. will do. yes 20160907. it'll work. we need cbfstool btw you said i'm responsive. that's only because i'm drinking tea and watching My Hero Academia. IRCing is tolerable [12:48] later i'll be in the lab doing some laptops. i'm bringing my shop back in stock also i have 2 websites i need to launch like, 1 week ago i'll try to get them done today i woke up about an hour or so ago and i'm still waking up. i build up my strength for a few hours, mentally, and then work flat out for about 12 hours. then relax an hour or so, then i go to bed [12:49] during the 12 hour period, i don't respond on IRC at all. but i do respond to emails during that time (business emails) ok. don't beat yourself up. :) You've done a ton of awesome work with libreboot! Also, I actually have access to a ton of dell optiplex 7020s. I'm not certain what the coreboot support there is...but I've been having fun playing with some old computers. [12:50] but there's always someone else to answer, if i'm not available on IRC do you have cbfstool yet? you need cbfstool. grab it from libreboot 20160907 util archive I do have a libreboot_r20160907 directory. and it has a cbfstool directory. cbfstool/x86_64/ go in there and there should be a executable cbfstool copy that to the same directory as dump.bin yup [12:51] will do check you dumped as root, so sudo chown user:user dump.bin user is your username done [12:52] ./cbfstool dump.bin extract -n cpu_microcode_blob.bin -f cpu_microcode_blob.bin ok. I now have a cpu_microcode_blob.bin file. [12:53] https://rsync.libreboot.org/testing/20210522/roms/libreboot-20210522_t400_8mb.tar.xz extract this archive ok. just a moment. [12:54] oh, tell me what keyboard layout you have oh, wait. it doesn't matter. it's seabios. there's only 1 from that archive, copy the following file to the same directory as dump.bin: [12:55] seabios_grubfirst_t400_8mb_libgfxinit_txtmode_usqwerty.rom I do have the dvorak layout...at least that's what I like... ah ok [12:56] in that case, choose this file instead: seabios_grubfirst_t400_8mb_libgfxinit_txtmode_usdvorak.rom it's american dvorak yes? yes! ok, copy the above file to the same location as dump.bin ok will do and rename the libreboot rom to libreboot.rom makes it easier for me to help [12:57] one thing: ip a do that command. based on the output, tell me the mac address of your onboard ethernet device hahaha...ummm I am still using the default mac address of the default libreboot...I never fixed that...give me one second though...and I'll get it from the back of the laptop... [12:58] in that case, also copy ich9gen from the util archive [12:59] will do. [13:00] ok. I've renamed libreboot to libreboot.rom...and I've copied the ich9gen command. [13:03] ./ich9gen --macaddress bla:bla:bla:bla:bla:bla will do replace bla with the right numbers ok. I now have several files beginning with ich9f* [13:04] dd if=ich9fdgbe_8m.bin of=libreboot.rom bs=1 count=12k conv=notrunc [13:05] ./cbfstool libreboot.rom add -f cpu_microcode_blob.bin -n cpu_microcode_blob.bin -t microcode [13:06] ./cbfstool libreboot.rom print show me a paste of that last command, and then do: hexdump libreboot.rom > libreboot.hex [13:07] less libreboot.hex ./cbfstool libreboot.rom add command gave this error: at offset 1000 and 2000 should be the mac address that you inserted E: Selected image region is not a valid CBFS. I probably did something wrong... [13:08] nah [13:09] it's my fault i fucked up that's ok. just email me your microcode file, and the files that ich9gen made leah@libreboot.org send these in an attachment now also just pointing out...I'm hoping to dual boot guix system and openBSD. I'm just wanting to play around with openBSD...I've never used it before. will do. i'll just make the rom for you. libreboot 20210522 rom with your microcode and correct mac address thanks. sending shortly... [13:10] guix will also work, in the rom i'm giving you ok. Thanks! [13:12] how big should the libreboot.rom image me? [13:13] 8MB? right? somehow I have a 12KB librebot.rom (1 "o") file... ERC>

yes there is a way ,hang on tar -c "rom/" | xz -9e >"rom.tar.xz" [13:17] put everything in a directory called "rom" will do. and do that. then send me rom.tar.xz that should make it compress down real tight [13:18] ok. I just sent it. I actually have to start getting ready for work. Thanks again for your massive help! [13:21] i have you now stand by [13:22] jab: check your email [13:34] download the attached archive and extract it. there is a rom inside, named libreboot.rom it has the correct mac address and microcode inserted [13:35] sudo flashrom -p internal -w libreboot.rom -c MX25L6405D thanks! I've got to run to work now. I'll test it later...I am a little conscerned about bricking my machine...at some point in my directory I ended with with a "libreboot.rom" file that was only 12KB... do that, and when it says "VERIFIED", just shut down, and wait a few seconds. then boot up. you'll be on the latest libreboot jab: yes that was my mistake earlier ok. gotcha. [13:36] i fucked up the dd command earlier that's why the rom ended up being 12KiB ok. I understand now. but i've tested this rom that i sent you it should work oh wow! just flash it sudo flashrom -p internal -w libreboot.rom -c MX25L6405D it should say "VERIFIED" after. then shut down. boot up after a few seconds leah you are seriously an amazing and wonderful person. I have to go to work like 5 minutes ago, but I'll test it when I get back. thanks again! prepare your OpenBSD usb media the way openbsd.org recommends, and boot it from seabios. press ESC in SeaBIOS to access the menu, and select your USB drive [13:37] you're welcome! ERC>

Install this to maintain my battery life. https://dataswamp.org/~solene/2022-03-21-openbsd-cool-frequency.html