Port-mac68k archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBooting a Quadra from MacOS X
Am 24. Apr .2008 um 20:21 Uhr schrieb Hauke Fath:
At 17:37 Uhr +0200 23.4.2008, Andreas Wolf wrote:
I was very excited to learn that the latest versions of the BSD/Mac68k
Booter programm (I'm using 2.0.1a6) are supposed to support diskless
booting of NetBSD. Thanks to all of you, who have contributed to this.
I'm glad it's useful. :)
It is, and it's fun, too. I'm into Macs almost from the very beginning.
I bought my first 128k Mac in 1985 and it's still running. Decades
later, I see myself in the frustrating situation that all my knowledge
about what they call "Classic" MacOS now is more or less useless, as
are the machines that cannot cope with OS X. Having a BSD Unix on my
68k boxes that is actually very similar (well, terminal-wise) to
Darwin/OS X is quite exciting, already. It encourages me to dive into
Unix further than I ever imagined to do (being a really spoiled
Mac-User in the past). Of course I am still in the stage of an advanced
idiot in these things. Now, netbooting from the OS X Macs ("Big brother
is booting you") sort of bridges the gap, if you know what I mean.
Btw, there might be a little bug in the Booter code, that prevents the
initial BootP/DHCP requests from working. If I have an additional NuBus
Ethernet-card in my Quadra 700, the Booter will show (and use) the
hardware address of that NIC, although the built-in Ethernet is in use
and configured. It might be realated to this particular card (Farallon
FastEther TX, which unfortunately isn't working/supported), but I have
to remove it in order to let the Booter recognize the correct
MAC-address. I wrote this to Nigel Pearson, already.
It would help if you could provide the relevant lines of your
/etc/exports
here.
Yes, into the guts ;-)
From what I learned, NFS exports on OS X.3/Panther can be configured
via Netinfo or /etc/exports (at least "man exports" claims that it can
be configured via flat-file). Using both at the same time is said to
mess everything up. I am using Netinfo (unfortunately, this is probably
not future-safe - no more Netinfo in Leopard/10.5?). I tested 3
different ways to set the NetInfo database: terminal, NetInfo-Manager,
NFS-Manager. All of them yield the same result, but I wanted to make
sure that I tried everything. I want to export three partitions, /root,
/swap, and /home. On the server (bluex.seqnet.de) the path is
/export/macbsd/. Hopefully the permissions are ok.
[bluex:] root# ls -alp /export/macbsd/
drwxr-xr-x 7 root wheel 238 23 Apr 15:53 ./
drwxr-xr-x 4 root wheel 136 18 Apr 17:40 ../
drwxr-xr-x 3 root wheel 102 14 Apr 12:48 NetBSD-release/
drwxrwxrw- 2 root wheel 68 2 Apr 17:00 home/
drwxrwxrw- 21 root wheel 714 14 Apr 13:42 root/
drwxrw-rw- 3 root wheel 102 23 Apr 18:15 swap/
My exports in the NetInfo database look like this
[bluex:/export] root# nidump -r /exports .
{
"name" = ( "exports" );
CHILDREN = (
{
"name" = ( "/export/macbsd/swap" );
"clients" = ( "192.168.101.69" );
"opts" = ( "maproot=root:wheel" );
},
{
"name" = ( "/export/macbsd/home" );
"clients" = ( "192.168.101.69" );
"opts" = ( "maproot=nobody:nobody" );
},
{
"name" = ( "/export/macbsd/root" );
"opts" = ( "maproot=root:wheel" );
"clients" = ( "192.168.101.69" );
}
)
}
This is according to the NetBoot how-to
(http://netbsd.org/docs/network/netboot/nfs.html#macosx), except that I
did not set up a separate /usr partition. If I try to actually serve
these as NFS shares, it won't work: To update my exports I do a
kill -1 `cat /var/run/mountd.pid`
On Panther, mountd signals changes to nfsd. That seems to have changed
in Tiger/Leopard where no more separate mountd exists?. Yes I agree,
Apple messes up things, especially by changing things with every new
version...
In the log I see:
Apr 25 14:58:47 bluex mountd[403]: Can't change attributes for
/export/macbsd/home. See 'exports' man page.
Apr 25 14:58:47 bluex mountd[403]: Bad exports list line
/export/macbsd/home -maproot
Consequently, /home is not in the exports:
[bluex:/export] root# showmount -e
Exports list on localhost:
/export/macbsd/swap 192.168.101.69
/export/macbsd/root 192.168.101.69
As you probably guessed, 192.168.101.69 = macbsd.seqnet.de is the
Quadra/NetBSD client.
To complete my config, here are my dhcpd.conf on the server
[bluex:/export/macbsd] root# more /etc/dhcpd.conf
# global dhcpd parameters
deny unknown-clients; #disallow unknown connections
ddns-update-style none; #disallow dynamic DNS updates
authoritative;
allow bootp; #allow bootp requests, thus the
dhcp
#server will act as a bootp
server
# which network interface the server will listen on
subnet 192.168.101.0 netmask 255.255.255.0 { #the zeros indicate which
range
} #of addresses are allowed to
connect
#set of parameters common to all clients
group {
option broadcast-address 192.168.101.255;
option domain-name "seqnet.de";
#option domain-name-servers dns.test.net;
option routers router.seqnet.de;
option subnet-mask 255.255.255.0;
#set of parameters specific to one particular host
host macbsd.seqnet.de {
hardware ethernet 08:00:07:94:c3:50; # sn0, also internes Ethernet
fixed-address 192.168.101.69;
option host-name "macbsd"; #name of the host (if
the fixed address
#doesn't resolve to a
simple name)
filename "netbsd.gz"; #name of the
bootloader or kernel to
#download via tftp
next-server bluex.seqnet.de; #which machine to tftp
filename from
option root-path "/export/macbsd/root"; #the path on the NFS
server.
#typically the client
assumes the
#nfsserver = tftpserver
#always-reply-rfc1048 true; #this is needed if your client
isn't
#getting the options you set and
#the log says "(non-rfc1048)"
#next68k machines require this
to be
#set false
}
}
...and the fstab for the client
[bluex:/] root# more /export/macbsd/root/etc/fstab
bluex.seqnet.de:/export/macbsd/swap none swap sw,nfsmntpt=/swap
bluex.seqnet.de:/export/macbsd/root / nfs rw 0 0
bluex.seqnet.de:/export/macbsd/home /home nfs rw 0 0
I am guessing: What bites you is the fact that one volume can only
ever be exported through nfs with one set of credentials. This means
that
once you e.g. export a directory from a partition r/o, you cannot
export
another directory from the same partition r/w.
There are quite a couple of aspects that I do not understand. One is
that I don't know how to serve /swap as a file rather than a directory.
I can create a 16MB file in Darwin as described in the manual (dd
if=/dev/zero of=/export/client/swap bs=4k count=4k), but cannot export
that as a file:
Apr 25 15:53:48 bluex mountd[403]: Bad exports list line
/export/macbsd/swap
Apr 25 15:53:48 bluex mountd[403]: Can't change attributes for
/export/macbsd/root. See 'exports' man page.
Apr 25 15:53:48 bluex mountd[403]: Bad exports list line
/export/macbsd/root -maproot
"man mountd" tells me:
"The -r option allows mount RPCs requests for regular files to be
served. Although this seems to violate the mount protocol
specification, some diskless workstations do mount requests for their
swapfiles and expect them to be regular files. Since a regular file
cannot be specified in /etc/exports, the entire file system in which
the swapfiles resides will have to be exported with the -alldirs flag."
So what shall I do? I can change /System/Library/StartupItems/NFS/NFS,
where automountd appears to be started without any arguments, but that
doesn't seem to help either. What next? Where would I put the
"-alldirs" flag? I guess I am just lacking fundamental knowledge on
NFS. Please forgive my basic and stupid questions. What am I doing with
the maproot option? As I understand it, maproot=root:wheel will let an
allowed client (only 192.168.101.69 in my case) use the
partition/volume as if the client was user "root" and/or in the group
"wheel" (does wheel exist at all on netbsd?). I am mapping the client
user (is that "root" when the kernel tries to load the share?) to the
user "root" on the local server, is that correct? To disallow this,
other OSes have a "root_sqash" option. I cannot set or unset that in OS
X, can I? Might that be unvisibly implemented by Apple along with some
security-update? I'm getting paranoid. Why would I want to
maproot=nobody:nobody on the /home share? Doesn't that imply that other
users on the client have access to /home with the lowest possible
privileges, i.e. nobody?
There's a trick which I use with good success, where you null-mount the
directories that you want to export somewhere else, and then nfs export
those "volumes". An example:
From /etc/fstab:
/var/spool/export/usr.m68k /export/usr.m68k null ro,hidden
0 0
/var/spool/export/q840 /export/q840 null rw,hidden
0 0
From /etc/exports:
/export/q840/root -maproot=root:wheel q840
/export/q840/swap -maproot=root:wheel q840
I'm afraid I don't understand that part. You are talking about the
server-side, are you? Well, there ain't no fstab in Panther. Where can
I determine, on OS X using NetInfo, if the shares are rw or ro? The
default should be read/write, anyway (?). I don't want one of my
partitions read-only, do I? Do I, indirectly, attempt to do that with
my configuration files?
Your help is really appreciated. Please continue ;-)
Am 24. Apr .2008 um 21:30 Uhr schrieb Mark E. Perkins:
But you might get some helpful suggestions here:
http://www.mspo.com/soekris.html
Thanks, I will have a deeper look at that.
Andreas
Home |
Main Index |
Thread Index |
Old Index