DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd October 2021
jdpuller jdpuller is offline
New User
 
Join Date: Oct 2021
Posts: 5
Default Difficulties disabling acpitz in the kernel

I am trying to install OpenBSD 7.0 on a Dell Wyse 3040 (Intel Atom x86_64, eMMC). Rebooting after the install hangs at the line:

acpitz on acpi0

Using boot -c results in the usb keyboard input not working at the UKC> prompt. I can disable acpitz on a kernel running in a virtualmachine and copy the kernel over, but then it hangs at the prompt:

root device:

Again with no usb keyboard input (boot -a results in the same).

I've tried different usb ports with two different functioning USB keyboards which work at the boot> prompt and during install, just not at the UKC>/root device: prompts. PS/2 keyboard input and serial input are not available on this hardware. The root device is eMMC, which is probably why the kernel built in the virtual machine can't find the path/UID of the root device. In the BIOS, there don't appear to be any options related to enabling/disabling ACPI or temperature monitoring. Also nothing relating to a "legacy" USB mode.

Is there another way to install a kernel on this machine with acpitz disabled?

Last edited by jdpuller; 22nd October 2021 at 09:27 AM. Reason: clarificaiton
Reply With Quote
  #2   (View Single Post)  
Old 22nd October 2021
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Hello, and welcome!

In the public NYCBUG database, I can find a dmesg for a Wyse 5060, but not a 3040: https://dmesgd.nycbug.org/index.cgi?do=view&id=5639

You might want to post your query to the misc@ mailing list -- it is a much larger community of users.
Reply With Quote
  #3   (View Single Post)  
Old 22nd October 2021
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

Quote:
Originally Posted by jdpuller View Post
I am trying to install OpenBSD 7.0 on a Dell Wyse 3040 (Intel Atom x86_64, eMMC). Rebooting after the install hangs at the line:

acpitz on acpi0

(...)

Is there another way to install a kernel on this machine with acpitz disabled?
OpenBSD 7.0 introduced a new config file to automate kernel reconfiguration: bsd.re-config(5) (note: change the drop-down on the OpenBSD man-page server to OpenBSD-7.0, the daemonforums manpage code still links to OpenBSD 6.8)

You might try booting bsd.rd and immediately drop to the shell to create /etc/bsd.re-config with the following content:
Code:
disable apitz
In theory this would disable your problematic acpitz driver when kernel re-linking occurs preparing a modified kernel for the next boot. During the installation process kernel relinking happens right after the device nodes are created and before any install.site script is run (if present).

The only problem is, I don't know if this is supported inside bsd.rd. Might be worth a try, though.

The file itself works, I just tested it on an old i386 on which I installed 7.0 yesterday. Prior to 7.0 I used to disable a certain driver manually during each boot, due to some kernel error msgs. With the file in place and after KARL has finished reboot works automaticaly with a modified kernerl without requiring manual intervention.
Reply With Quote
  #4   (View Single Post)  
Old 23rd October 2021
jdpuller jdpuller is offline
New User
 
Join Date: Oct 2021
Posts: 5
Default

Thanks for the suggestion. I had previously tried putting the disable command in bsd.re-config, without luck. It appears I'm still doing something incorrectly:
  1. Boot into bsd.rd
  2. Enter (S)hell
  3. echo "disable acpitz" > /etc/bsd.re-config
  4. ./install (i.e. fresh install)
    ....
  5. reboot into new system

on boot it still hangs at acpitz0 on acpi0, as if the /etc/bsd.re-config had no effect.

I'm fairly certain disable acpitz is correct, as that is verbatim what was modified in the virtualmachine kernel to get up to the root device prompt.

Re-reading re-config(5), I cant figure out where I'm going wrong.
Reply With Quote
  #5   (View Single Post)  
Old 23rd October 2021
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

The bsd.re-config file is processed as part of a normal boot, and is not available through the RAMDISK kernel at all. In the full installed system, during a normal boot /etc/rc calls /usr/libexec/reorder_kernel, which will call config(8) if the file exists, which will modify the new kernel created by the reorder_kernel script.
Reply With Quote
  #6   (View Single Post)  
Old 23rd October 2021
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

Yeah, that's what I was suspecting.

Quote:
Originally Posted by jdpuller View Post
I can disable acpitz on a kernel running in a virtualmachine and copy the kernel over, but then it hangs at the prompt:

root device:

(...)
The root device is eMMC, which is probably why the kernel built in the virtual machine can't find the path/UID of the root device.
Did you try configuring the needed root device with config(8) through a configuration file?

See the section KERNEL BUILDING in the manpage:
Quote:
config bsd root on dev [swap on dev [and dev ...]] [dumps on dev]
Reply With Quote
  #7   (View Single Post)  
Old 23rd October 2021
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Changing that requires a custom kernel build. IIRC config(8) can't make that type of binary revision. .
Reply With Quote
  #8   (View Single Post)  
Old 23rd October 2021
jdpuller jdpuller is offline
New User
 
Join Date: Oct 2021
Posts: 5
Default

That was my impression as well, that bsd.re-config and config both require a normal boot (not bsd.rd). But as a novice, I wasn't sure.

Since a ramdisk boot is possible on this hardware, there is a lot of room for optimism that a normal boot is within reach. I was hoping there might be a way to disable modules/change the root device in the ramdisk, either during or post-install before attempting to build a custom kernel.

set howto in boot(8) also looks promising, but I am not well versed enough in OpenBSD to know where to start. I don't know the available options are, or how to find them, short of digging through the source code.
Reply With Quote
  #9   (View Single Post)  
Old 24th October 2021
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Normally, the kernel will locate the "a" partition on the booted disk and assign it as the root filesystem. You can alter this with boot> -a, which will cause the kernel to prompt for the drive and partition to use as the root filesystem. See the -a option in boot(8).
Reply With Quote
Old 24th October 2021
jdpuller jdpuller is offline
New User
 
Join Date: Oct 2021
Posts: 5
Default

I had tried that, couldn't type anything at the resulting prompt.
Reply With Quote
Old 24th October 2021
jdpuller jdpuller is offline
New User
 
Join Date: Oct 2021
Posts: 5
Default

Success!

I had mentioned that I was modifying/copying over a kernel from a (virtualbox) virtual machine. By default, virtualbox uses an IDE controller for openbsd machines, which leads to /dev/wd* disk names, whereas the eMMC on this hardware gets /dev/sd* names [0]. Customizing a kernel on a virtual machine with an AHCI controller and copying it over was successful.

Detailed instructions for posterity:
(on Wyse hardware)
1. Install OpenBSD. Hardware is EFI only (not MBR)
2. Reboot, at the boot prompt, enter: bsd.rd
3. Drop into (S)hell

(virtualbox virtual machine)
4. Create an openbsd virtual machine [1]
5. Change system > processor to 2 to get the OpenBSD installer to build a mult-core kernel
6. Change storage > controller from IDE to AHCI (SATA) in order to get correct root device naming
7. Attach openbsd installer image, and boot virtual machine to install OpenBSD
8. When finished, reboot into normal kernel
9. After logging in, run:
$ config -e -o /bsd.new /bsd
ukc> disable acpitz
ukc> quit

10. Attach a usb thumb drive (tested with FAT32). Replace X below with what the drive was enumerated with. run:
$ mkdir /mnt2
$ mount_msdos /dev/sdXc /mnt2
$ cp -a /bsd.new /mnt2/bsd.new
$ umount /mnt2

11. Remove usb key

(on Wyse hardware)
12. Should still be in the shell from step 3. Plug in the usb key
13. You should see the usb key being recognized. Replace X in the commands below with what the drive was enumerated with, run
$ cd /dev
$ sh MAKEDEV sdX
$ mount_msdos /dev/sdXc /mnt2
$ cp -a /mnt2/bsd.new /bsd
$ umount /mnt2
$ reboot


Done


[0] https://www.openbsd.org/faq/faq14.html
[1] Confirmed with both EFI and MBR virtualbox machines. MBR is easier to set up and is the virtualbox default. _If_ you want to use EFI to match the Wyse hardware, additionally modify the virtual machine by setting:
system > Enable EFI
A bootable vdi image also needs to be created from the .img installer, the .iso doesn't work with EFI as of this writing:
$ VBoxManage convertdd install70.img install70.vdi --format VDI
this image should be attached to the SATA controller that has the .vdi for the install. If the install disk doesn't boot automatically, load the installer by navigating fs1:\efi\... (note the backslashes)

Last edited by jdpuller; 24th October 2021 at 02:33 PM.
Reply With Quote
Old 24th October 2021
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Thumbs up

Quote:
Originally Posted by jdpuller View Post
Success!
Congratulations! Well done.
Reply With Quote
Reply

Tags
acpitz, emmc, openbsd

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
about the kernel bsdcord OpenBSD Security 11 12th May 2019 05:40 PM
Yoga2 disabling touchscreen scottro OpenBSD Installation and Upgrading 15 16th October 2016 02:40 AM
Disabling Services Not Needed EverydayDiesel OpenBSD Security 10 25th January 2010 01:20 PM
disabling ctrl-c malindang FreeBSD General 3 27th June 2008 12:06 AM
Spin locks and interrupts disabling n4uti1us FreeBSD General 5 20th May 2008 01:51 PM


All times are GMT. The time now is 11:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick