DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th January 2024
Feamane Feamane is offline
Port Guard
 
Join Date: Feb 2022
Posts: 23
Default OpenBSD on Sparc pass NFS "root device" to bsd

Hi,

I have several SPARCclassic and SPARCstation IPX boxes I'm setting up to run OpenBSD 5.9 headless and diskless. They will all be booting via TFTP/NFS off a linux server. I mostly have everything working except for a few quirks/annoyances.

One SPARCclassic has a Sun SunSwift 100BaseT ethernet SBus Adapter (X1018A) in addition to the on-board Lance Ethernet. I want to use the hme instead of the le. I don't know if it will result in much of a performance boost since it's not a very fast system, but since I have it I might as well use it! Everything works just find EXCEPT for a little hitch in the boot chain of events. After the kernel identifies all the hardware it asks for the "root device". If you just hit enter it prompts you to "use one of: exit le0 hme0". So it knows the Happymeal is there, and if you chose hme0 then it proceds to complete the boot process and the machine comes up just fine with rootfs and swap running off of NFS.

Is there anyway to pass the "root device" parameter to bsd as an argument? I've tried "boot hme0 bsd hme0" and things like that from OpenBoot, but no go. It doesn't matter if I have an ethernet cable plugged into le0 or not.

Oddly, the IPX has a Lance Ethernet SBus card and I use that to boot off of rather than the on-board AUI le0 interface, and with OpenBoot set for booting le1 OpenBSD has no problem booting that way without prompting for which of the two interfaces to boot from. It even works if both interfaces are connected to a hub.

I've searched for days and not found any way to pass the argument. Maybe I'm missing it, but I don't see the info I seek in any of the OpenBSD man pages, guides or FAQs. I've seen where in some situations people use things like "boot /bsd -r sd0a" to specify which partition to boot from, but it doesn't seem to work when I try "boot /bsd -r hme0", "boot bsd -r /hme0", "boot hme0 bsd hme0", or etc. As best as I can tell "-r" is not even an option with the Sparc architecture.

Any help or pointers?

Thanks,
DJ


PHP Code:

SPARCclassic
No Keyboard
ROM Rev
2.9128 MB memory installedSerial #173474.
Ethernet address 8:0:20:5:20:a2Host ID8002a5a2.

Boot device: /iommu@0,10000000/sbus@0,10001000/SUNW,hme@0,8c00000   File and args
13800 
>> OpenBSD BOOT 2.11
Booting bsd
boot
client IP address192.168.0.11
boot
client namesun1
root addr
=192.168.0.21 path=/export/nfs/sun1/rootfs
Loading at physical address 400000
3149424
+115348+489756 [72+157504+138879]=0x3de354
boot
client IP address192.168.0.11
boot
client namesun1
root addr
=192.168.0.21 path=/export/nfs/sun1/rootfs
using 296868 bytes of bsd ELF symbol table ]
console is ttya
Copyright 
(c19821986198919911993
        The Regents of the University of California
.  All rights reserved.
Copyright (c1995-2016 OpenBSDAll rights reserved.  http://www.OpenBSD.org

OpenBSD 5.9 (GENERIC#2: Tue Mar  1 11:54:38 CET 2016
    
tu@ss10.tmux.org:/usr/src/sys/arch/sparc/compile/GENERIC
real mem 
133828608 (127MB)
avail mem 126152704 (120MB)
mainbus0 at rootSUNW,SPARCclassic
cpu0 at mainbus0
TMS390S10 50 MHzon-chip FPU
cpu0
physical 4K instruction (32 b/l), 2K data (16 b/lcache enabled
obio0 at mainbus0
clock0 at obio0 addr 0x71200000
mk48t08 (eeprom)
timer0 at obio0 addr 0x71d00000delay constant 23frequency 1000000 Hz
zs0 at obio0 addr 0x71100000 pri 12
softpri 6
zstty0 at zs0 channel 0
console
zstty1 at zs0 channel 1
zs1 at obio0 addr 0x71000000 pri 12
softpri 6
zskbd0 at zs1 channel 0
no keyboard
zsms0 at zs1 channel 1
wsmouse0 at zsms0 mux 0
slavioconfig at obio0 addr 0x71800000 not configured
auxreg0 at obio0 addr 0x71900000
power0 at obio0 addr 0x71910000
fdc0 at obio0 addr 0x71400000 pri 11
softpri 4chip 82077
iommu0 at mainbus0 addr 0x10000000
version 0x1/0x4page-size 4096range 64MB
sbus0 at iommu0
25 MHz
dma0 at sbus0 slot 4 offset 0x8400000
rev 2
esp0 at dma0 offset 0x8800000 pri 4
ESP20040MHz
scsibus0 at esp0
8 targetsinitiator 7
audioamd0 at sbus0 slot 4 offset 0x1300000 pri 13
softpri 4
audio0 at audioamd0
bpp0 at sbus0 slot 4 offset 0xc800000
DMA2
ledma0 at sbus0 slot 4 offset 0x8400010
rev 2
le0 at ledma0 offset 0x8c00000 pri 6
address 08:00:20:05:20:a2
le0
16 receive buffers4 transmit buffers
hme0 at sbus0 slot 0 offset 0x8c00000 pri 7
address 08:00:20:05:20:a2 rev 34
nsphy0 at hme0 phy 1
DP83840 10/100 PHYrev1
esp1 at sbus0 slot 0 offset 0x8800000 pri 5
FAS366/HME40MHz
scsibus1 at esp1
16 targetsinitiator 7
cgthree0 at sbus0 slot 3 offset 0x0 pri 9
SUNW,501-17181152x900
wsdisplay0 at cgthree0 mux 1
wsdisplay0
screen 0 added (stdsun emulation)
vscsi0 at root
scsibus2 at vscsi0
256 targets
softraid0 at root
scsibus3 at softraid0
256 targets
bootpath
: /iommu@0,10000000/sbus@0,10001000/SUNW,hme@0,8c00000
root device

use 
one of: exit le0 hme0
root device
hme0
nfs_boot
using interface hme0with revarp bootparams
nfs_boot
client_addr=192.168.0.11
nfs_boot
server_addr=192.168.0.21 hostname=sun1
root on server3
:/export/nfs/sun1/rootfs
swap on server3
:/export/nfs/sun1/swapfile
Automatic boot in progress
starting file system checks
Reply With Quote
  #2   (View Single Post)  
Old 25th January 2024
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,133
Default

You can configure some things with https://man.openbsd.org/OpenBSD-5.9/boot_config
Make sure you select sparc as the architecture. Or just plain do a man boot_config

The man page shows how to enable or enable devices. If you don't want to use le0 at all, you could simply try to disable le0 and see whether that prompt goes away.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 25th January 2024
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,989
Default

Hello, and welcome!

There is a sparc@ mailing list for the OpenBSD/sparc and OpenBSD/sparc64 architectures. It is not very active, but it has nearly 500 subscribers. You might search its archives to see if this has been previously discussed, or join the list to ask.

Archive: https://marc.info/?l=openbsd-sparc&r=1&w=2

OpenBSD Project mailing lists: http://www.openbsd.org/mail.html
Reply With Quote
  #4   (View Single Post)  
Old 25th January 2024
Feamane Feamane is offline
Port Guard
 
Join Date: Feb 2022
Posts: 23
Default

Thanks for the welcome and replies!

OK, had previously been looking at the boot_config, config, and other related man pages, but had given up on that angle due to not finding any info about designating the "root device", only about enabling and disabling devices--I figured that if the kernel was giving me hme0 as a candidate for "root device" then it must know about it and it was already enabled. Now I've been looking at it further, and am still unsure just what I need to do to get this resolved. Here is the relevant output from config, any lines with "hme" in them, and any "le" lines for comparison.

Code:
config -e -o bsd.hme /bsd
ukc> list
 42 nsphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 43 nsphyter* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 44 gentbi* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 45 qsphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 46 lxtphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 47 luphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 48 tqphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 49 ukphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 50 bmtphy* at hme*|ti*|gem*|ne*|ep* phy -1 flags 0x0
 64 lebuffer0 at sbus0|sbus0 slot -1 offset -1 flags 0x0
 65 lebuffer* at sbus0|sbus0|sbus* slot -1 offset -1 flags 0x0
 71 hme* at sbus0|sbus0|sbus* slot -1 offset -1 flags 0x0
108 le0 at ledma0 flags 0x0
109 le0 at lebuffer0 flags 0x0
110 le0 at sbus0|sbus0 slot -1 offset -1 flags 0x0
111 le0 at obio0 addr 0xf9000000 level 6 flags 0x0
112 le* at ledma0|ledma* flags 0x0
113 le* at lebuffer0|lebuffer* flags 0x0
114 le* at sbus0|sbus0|sbus* slot -1 offset -1 flags 0x0
Do I need to do something with line 71 so that it's hme0 instead of hme*???

Also, I didn't find anything searching the sparc mailing list, but maybe I need to get better with my search terms. I do plan to join the list and pose my issue there as well, sure can't hurt. And I have several other questions to ask so submitting them in multiple places seems like a good idea.

Thanks,
DJ

Last edited by Feamane; 27th January 2024 at 07:08 AM. Reason: {code] and [/code]
Reply With Quote
  #5   (View Single Post)  
Old 26th January 2024
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,133
Default

The kernel sees two NICs as possibilities to boot from, and thus kindly offers, through a menu, the operator to choose which NIC to NFS boot from: hme0 or leo.

My idea is to disable the slow NIC you don't want: le0. After disabling le0 the kernel, now having or seeing only hme0 as NIC to boot from, will boot directly from the only option it has: hme0. Nothing to choose between and thus no menu.

You can use find le* to only show le and then something like disable le.
Then check with find le* again whether that worked. Don't forget to write the changes with quit or exit.

It has been a long time since I had to resort to using boot_config
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 26th January 2024
Feamane Feamane is offline
Port Guard
 
Join Date: Feb 2022
Posts: 23
Default

Makes sense, but I think that will be more of a last resort for me. I like to keep the extra interfaces connected but down, so I can just up them in ifconfig if I'm having a problem with the other one. These are very old boxes after all and sometimes can be a bit cranky.

One of them, a SPARCstation IPX, has been running almost non-stop, only powered off a month or so in total since 1992. I know this because when I got my first full-time IT job in '92 the first task I was given was to unbox and set up that IPX as a network monitor. When I was laid-off in 2002 I stuck it in my backpack and brought it home. Too bad I had to leave all the peripherals and manuals there to be thrown out when they closed shop a few months later. I've had it running SunOS 4.1.3 (if I remember correctly); Debian 3.0, 3.1 & 4.0; and OpenBSD 3.1, 3.6, 3.7, 5.8, and now 5.9. The kitty in there has been purring away all those years.

Thanks,
DJ

Name:  20180726_023810_copy_1822x1366_copy_1288x966.jpg
Views: 72
Size:  969.7 KB
Reply With Quote
  #7   (View Single Post)  
Old 26th January 2024
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,133
Default

I never set up NFS booting or diskless myself. Only PXE booting, and I don't exactly remember how I did that. I automated the whole thing with a shell script and wrote a guide for it in our Guide section here.

https://man.openbsd.org/diskless describes how you specify a NIC MAC address for booting.
Cannot you configure the Sparc firmware to use hme0 and or disable le0 for booting?

I looked at the boot man page and did not find any method of specifying an NIC, only disks or disk partitions.
Code:
boot /etc/hostname.hme0

or

boot hostname.hme0
maybe?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 26th January 2024 at 10:01 AM.
Reply With Quote
  #8   (View Single Post)  
Old 26th January 2024
Feamane Feamane is offline
Port Guard
 
Join Date: Feb 2022
Posts: 23
Default

OpenBSD Diskless is definitely a good resource that was one of the sources of information that I used years ago when I first started booting Sun boxes off of NFS with either Debian or OpenBSD. I have it, and all the other good info I found over the years about net booting saved away in a little reference directory. I also use PXE booting to install Windows on my PCs and to run troubleshooting tools. But Diskless is silent on this issue.

Yes, in OpenBoot you can designate the boot device, "disk" or "net". But that's only for the first the firmware finds of type. So in my case where there are multiple interfaces and I don't want to boot the first I use an alias.

The OpenBoot eeprom looks like this when configured:

Code:
boot-device           hme0
auto-boot?            true
use-nvramrc?          true
nvramrc               devalias hme0 /iommu@0,10000000/sbus@0,10001000/SUNW,hme@0,8c00000
On the IPX, which has two Lance Ethernets, I like to boot off the SBus le1 rather than the motherboard mounted AUI le0, so I do the following and OpenBSD has no problem booting off le1 without asking for the "root device".

Code:
boot-device           le1
auto-boot?            true
use-nvramrc?          true
nvramrc               devalias le1 /sbus@1,f8000000/lebuffer@2,40000/le@2,60000
This is the first time I've ever had a problem with the OS getting confused about where it's booting from.

Maybe there is some kind of flag that can be set in boot_config???

I've been trying some different variations like these:

Code:
boot hme0 bsd hme0
I'll have to try those varaiations you mentioned as well but not sure the kernel knows about /etc yet?

Thanks,
DJ
Reply With Quote
  #9   (View Single Post)  
Old 27th January 2024
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,133
Default

The kernel seems to know about /etc/.

The arguments that you can pass manually at the boot prompt can also be stored in /etc/boot.conf
The following is from an headless system, where I store the serial console settings.
Code:
root@alix[~]cat /etc/boot.conf 
machine diskinfo
machine memory
set image /bsd 
stty com0 38400
set timeout 5
set
set tty com0
set
I am not sure if it has completely knowledge of the file system yet. Directory /etc should always be on the root file system, disklabel 'a'.

During my first baby steps with OpenBSD I once put /etc on a separate file system and the system could not boot. Some lessons you learn the hard way ....
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 27th January 2024
Feamane Feamane is offline
Port Guard
 
Join Date: Feb 2022
Posts: 23
Default

Well I hope it gave you an informative error message!

When researching this problem previously I didn't think boot.conf would work because it seems it was not implemented for the Sparc architecture since it is not shown in the boot man page, only the following:

Code:
boot, boot.conf(5, 8/amd64) 	amd64-specific second-stage bootstrap
boot, boot.conf(5, 8/armish) 	armish-specific bootstrap
boot, boot.conf(5, 8/hppa) 	hppa-specific bootstrap
boot, boot.conf(5, 8/hppa64) 	hppa64-specific bootstrap
boot, boot.conf(5, 8/i386) 	i386-specific second-stage bootstrap
boot, boot.conf(5, 8/landisk) 	landisk-specific second-stage bootstrap
boot, boot.conf(5, 8/macppc) 	macppc-specific bootstrap
boot, boot.conf(5, 8/socppc) 	socppc-specific bootstrap
boot, boot.conf(5, 8/zaurus) 	zaurus-specific second-stage bootstrap
I'm experimenting with it this evening but so far bsd doesn't seem to know about boot.conf. I'm going to try some more permutations but I have a feeling the answer may lie in the boot_config direction, just need to find more info than the man page provides.
Reply With Quote
Old 28th January 2024
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,133
Default

Sorry. I now remember that not all architectures know about /etc/boot.conf On Sparc you configure the BIOS firmware to set serial console etc.

Then I have run out of ideas.

You could try disabling the le0 device. Or just bite the bullet and ask on on the misc mailing list.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 4th February 2024
Feamane Feamane is offline
Port Guard
 
Join Date: Feb 2022
Posts: 23
Default

I still haven't figured this out. I did post it on the OpenBSD-SPARC mailing list as suggested, but no reply so far. I have to put this on the back burner for now, too many other things to get done. If I ever find a happy answer I'll post it

Thanks,
DJ
Reply With Quote
Reply


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
SDL2 not working in netbsd - "no available video device" billy_bazooka Programming 8 19th September 2022 01:24 PM
Fresh installation 6.1.2 amd64 freezes in the line "root device" divel NetBSD Installation and Upgrading 2 22nd November 2013 07:11 PM
"no root device found" while installing kondziq FreeBSD Installation and Upgrading 4 29th November 2011 10:01 AM
System stops booting after "GEOM_MIRROR: Force device gm0 start due to timeout." indienick FreeBSD General 1 25th March 2010 09:46 PM
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" jb_daefo Guides 0 5th October 2009 09:31 PM


All times are GMT. The time now is 06:33 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