Re: diskless

Hugo Villeneuve <[email protected]> Fri, 19 Feb 2010 23:56:12 -0500
Newsgroups gmane.os.openbsd.mac68k
Message-ID <[email protected]>
On Fri, Feb 19, 2010 at 03:38:10PM +0000, Miod Vallat wrote:
> > I know that mac68k is mostly abandonware here and that's why I
> > deleted the au/x parition on my quadra.
> > 
> > But I was curious about running diskless.
> > 
> > It works. Kind of.
> > 
> > A kernel with "config bsd root on nfs" crash into ddb with an MMU
> > fault. But if I tell the booter to ask for root and write my network
> > interface name at the prompt, it boots diskless properly.
> 
> Sounds like a NULL pointer dereference in setroot().

You were right on this.

> 
> Does the following diff help? You should get greeted by a panic instead,
> as there is no way for the kernel to guess which network interface to
> use as its diskless interface, since it has not been booted from it.
> 
> If your machine only has one network interface it could be possible to
> default to it, though.

The patch works great. 4.6-stable is a few version back from your
(mvme68k?) tree but it applied cleanly.

But you were wrong. On my "config bsd root on nfs" kernel, it did
not panic.  It just went directly to nfs booting of sn0.

For fairness, I'll try to get the result with a generic kernel
(config bsd swap generic). It might panic on that. But that will
be tomorrow. It takes 3+ hours to make a kernel.

Still I'm happy, I get un-attented reboot in diskless mode. Thanks
a lot Miod.


My ROOTNFS kernel differ from GENERIC by:

option		BUFCACHEPERCENT=23
config		bsd	root on nfs


Here's the dmesg. I like the "can't figure root, hope your kernel
is right".


OpenBSD 4.6-stable (ROOTNFS) #2: Fri Feb 19 18:33:03 EST 2010
    [email protected]:/usr/src/sys/arch/mac68k/compile/ROOTNFS
Apple Macintosh Quadra 650, 68040 CPU+MMU+FPU, 4k on-chip physical I/D caches
real mem = 142606336 (136MB)
avail mem = 132976640 (126MB)
mainbus0 at root
obio0 at mainbus0
adb0 at obio0: II series
asc0 at obio0: Apple Sound Chip
macfb0 at obio0: DAFB, monitor sense 0
macfb0: 800x600, monochrome display
wsdisplay0 at macfb0 mux 1: console (std, vt100 emulation)
sn0 at obio0: integrated ethernet adapter, address 08:00:07:9c:f8:76
esp0 at obio0 (pseudo-DMA): NCR53C96, 16MHz
scsibus0 at esp0: 8 targets, initiator 7
sd0 at scsibus0 targ 2 lun 0: <IBM, DPES-31080 !t, S31R> SCSI2 0/direct fixed
sd0: 1034MB, 512 bytes/sec, 2118144 sec total
cd0 at scsibus0 targ 3 lun 0: <SONY, CD-ROM CDU-8003A, 1.9a> SCSI2 5/cdrom removable
zsc0 at obio0
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
nubus0 at mainbus0
adb0: 2 targets
akbd0 at adb0 addr 2: extended keyboard (ISO layout)
wskbd0 at akbd0: console keyboard, using wsdisplay0
ams0 at adb0 addr 3: 1-button, 100 dpi mouse
wsmouse0 at ams0 mux 0
softraid0 at root
can't figure root, hope your kernel is right
nfs_boot: using interface sn0, with revarp & bootparams
nfs_boot: client_addr=192.168.12.50
nfs_boot: server_addr=192.168.12.220 hostname=mac
root on jwales:/exports/mac/root
swap on jwales:/exports/mac/swap


-- 
Hugo Villeneuve <[email protected]>
http://EINTR.net/