Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

network boot

3 views
Skip to first unread message

Miles Nordin

unread,
Jul 26, 2005, 3:18:12 AM7/26/05
to freebsd...@freebsd.org
Is there a way to netboot FreeBSD/sparc64?

I'm coming to FreeBSD from NetBSD, where I netboot NetBSD/sparc64 and
just about everything except PeeCees, so I already know how to set up
rarp, dhcp, tftp, NFS. Also I was able to cat the split FreeBSD
release chunks and untar them---I don't know if you're supposed to do
that, but I did it and poked around---so I have something like a root
filesystem and am able to read man pages.

However I don't understand FreeBSD's booting process, and I don't see
where to get the second-stage loader binary to feed OpenPROM over
tftp, something like NetBSD's /usr/mdec/ofwboot.net.

Also something like the diskless(8) man page to explain how the
second-stage loader likes to load, on NetBSD the kernel but on FreeBSD
I guess it has to load a great many things like the several files that
make up the rest of the bootloader and kernel modules and whatever,
once I have the tftp second-stage loader how do I direct the booting
system to these other files?

Kris Kennaway

unread,
Jul 26, 2005, 12:27:55 PM7/26/05
to Miles Nordin, freebsd...@freebsd.org

Basically, you use rarp and tftp to pull a copy of /boot/loader onto
the machine, then dhcp to advertise an installed root image of freebsd
(basically unpack a freebsd image from the release media, or use
installworld into a DESTDIR, etc). You'll need to configure it
appropriately, e.g. set up /etc, diskless booting per diskless(8),
etc.

Here's a snippet from my dhcpd.conf

host deo-ultra5 {
hardware ethernet 08:00:20:fd:69:bd;
fixed-address 216.136.204.95;
always-reply-rfc1048 on;
option host-name "deo-ultra5.freebsd.org";
option root-path "216.136.204.22:/a/nfs/sparc64/6.dir1/";
}

Kris

John-Mark Gurney

unread,
Jul 26, 2005, 12:10:47 PM7/26/05
to Miles Nordin, freebsd...@freebsd.org
Miles Nordin wrote this message on Tue, Jul 26, 2005 at 03:18 -0400:
> Is there a way to netboot FreeBSD/sparc64?

Yes, I did it a couple years ago, so I'm a bit hazy on the details...

> I'm coming to FreeBSD from NetBSD, where I netboot NetBSD/sparc64 and
> just about everything except PeeCees, so I already know how to set up
> rarp, dhcp, tftp, NFS. Also I was able to cat the split FreeBSD
> release chunks and untar them---I don't know if you're supposed to do
> that, but I did it and poked around---so I have something like a root
> filesystem and am able to read man pages.

That's basicly what the install does for your.. :)

> However I don't understand FreeBSD's booting process, and I don't see
> where to get the second-stage loader binary to feed OpenPROM over
> tftp, something like NetBSD's /usr/mdec/ofwboot.net.

You should be able to use /boot/loader for that... (from your extracted
bin.?? files)

> Also something like the diskless(8) man page to explain how the
> second-stage loader likes to load, on NetBSD the kernel but on FreeBSD
> I guess it has to load a great many things like the several files that
> make up the rest of the bootloader and kernel modules and whatever,
> once I have the tftp second-stage loader how do I direct the booting
> system to these other files?

http://people.freebsd.org/~murray/sparc64/install.html

Though it looks like you should use the /boot/loader instead of the one
specified in the doc (since they don't exist anymore)..

Hope the doc helps...

--
John-Mark Gurney Voice: +1 415 225 5579

"All that I will do, has been done, All that I have, has not."

Miles Nordin

unread,
Jul 27, 2005, 6:39:25 PM7/27/05
to freebsd...@freebsd.org
>>>>> "jg" == John-Mark Gurney <gurn...@resnet.uoregon.edu> writes:
>>>>> "kk" == Kris Kennaway <kr...@obsecurity.org> writes:
>>>>> "rw" == Royce Williams <ro...@alaska.net> writes:
>>>>> "a" == alm <a...@sirius.net.au> writes:

jg> http://people.freebsd.org/~murray/sparc64/install.html
kk> Here's a snippet from my dhcpd.conf
rw> http://ezine.daemonnews.org/200301/sparc64-nfsroot.html
a> -Configure a static DHCP lease for it:
a> host netboot {
a> hardware ethernet <mac-addr> ;
a> option host-name "<hostname>" ;
a> fixed-address <IP addr.> ;
a> always-reply-rfc1048 on;
a> filename "/boot/loader";
a> next-server <TFTP/NFS server> ;
a> option root-path "<TFTP/NFS server>:/mnt" ;
a> }

It turned out to be pretty easy just to get the system booted once
hearing that /boot/loader could be fed straight to OpenPROM over tftp.

This:

a> boot net:dhcp

behaved the same on my sparc64 as 'boot net'. The OpenPROM used RARP
(not DHCP) to find the second-stage loader even with 'boot net:dhcp'.
Then it TFTPs to whatever machine replied to the RARP. I wonder if
net:dhcp is a cue to Solaris's inetboot? They have this massively
complicated 'wanboot' framework now, too, including multiple
cryptographic keys and CGI scripts on web servers. <shudder>.

I put /boot/loader in the tftpboot directory and named it C0A8017C to
match the IP of my Sun, 192.168.1.124. /boot/loader then used DHCP
(not bootparams) to get just one option, root-path:

host amber {
fixed-address amber;
hardware ethernet 08:00:20:xx:xx:xx;
option root-path "69.31.131.61:/export0/nbnfs/amber";
}

and /boot/loader loaded loader.conf and whatever else it needed over
NFS rather than TFTP. The only thing loaded over TFTP was
the file C0A8017C (a copy of /boot/loader).

a> lofiadm

I didn't end up using this nor the mfsroot, because I didn't use
sysinstall. I just extracted all the {base,doc,src,..}.{aa,ab,ac...}
files by hand. But it's good to have those instructions written down
because others will probably want to netboot into sysinstall.

Now I have three more problems:

1. The NetBSD NFS server I'm using doesn't support locking, so I
can't run vipw or pwd_mkdb, and vi always says 'UNLOCKED' in the
status bar. I can't 'mount -u -o -L 69.31.131.61:/ex.... /'
because the -L option is documented, obeyed only on initial mount,
not for remount. Is there a way to get this option turned on for
the initial root mount?

2. I tried 'mdmfs -s 32m md /tmp' and it never returned to the
prompt. ^C doesn't work, and I can't get to 'ok' or to 'ddb>' by
pressing BREAK. Is there a sysctl to obey BREAK?

3. Boot hung after ``waiting 15 seconds for SCSI devices to settle''
when I have my Firewire card installed. The Install CD boots
successfully with the card installed and even makes an fwe0. Is
there a way to use the loader to disable a broken device like this
SCSI-over-Firewire? I tried commands like 'disable-module sbp'
but it always says 'sbp not found'.

sorry for all the questions. I'm just getting started.

Miles Nordin

unread,
Oct 17, 2005, 7:18:58 PM10/17/05
to freebsd...@freebsd.org
>>>>> "bo" == Bruce O'Neel <edo...@sdf.lonestar.org> writes:

bo> Hi, Is there a nice diskless HOWTO?

AFAICT no.

I believe you can install by hand just as on NetBSD, except while for
NetBSD you just extract the .tgz files, for FreeBSD you have to cat
together the blah.a{b,c,d,e,f} chunks, and then pipe that into gzip |
pax -rpe. or is it bunzip2, i forget.

The three significant differences I found between FreeBSD and NetBSD
nfsroots are:

* On NetBSD, the 'option root-path' option is a path only, not a
server IP, and the IP address of the root NFS server if it differs
from the 'next-server' goes into the 'option swap-server' field.
NetBSD doesn't document this, but that's how it is. On FreeBSD,
the root-path option is "1.2.3.4:/path/to/root" as you'd expect.

* FreeBSD is broken all over the place if the NFS server doesn't
support locking. like, 'vi' doesn't work for example. and AFAICT
it is impossible to disable the default locking-enabled mount
options of an NFS root. NetBSD doesn't use locking anywhere---I
think there is no working NetBSD code written for NFS locking,
client or server.

* NetBSD NFSroot users like to make mfs's and tmpfs's for things like
/dev, /tmp, /var/run. FreeBSD doesn't have mount_mfs---it uses
something else. I couldn't get FreeBSD's mdmfs to work at all, but
FreeBSD has a devfs so it's good there's no incentive to make a
/dev mfs as on NetBSD.

-----8<-----

Bruce O'Neel

unread,
Oct 20, 2005, 11:38:08 AM10/20/05
to Miles Nordin, freebsd...@freebsd.org
Hi,

Thanks again. These instructions were enought to get things running.

A bit of a pain that locking doesn't work though :-) Guess I won't
be changing the password without booting from a disk though...

Thanks.

cheers

bruce

--
edo...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Miles Nordin

unread,
Oct 20, 2005, 3:07:51 PM10/20/05
to freebsd...@freebsd.org
>>>>> "bo" == Bruce O'Neel <edo...@sdf.lonestar.org> writes:

bo> A bit of a pain that locking doesn't work though :-)

or, from freebsd perspective, a pain that locking _does_ work. :) NFS
locking is neat.

bo> Guess I won't be changing the password without booting from a
bo> disk though...

well, if you are trying to fix a lost root password, you would just
change it from the NFS server then. If the password is stored on a
local medium and you're NFS-booting in leiu of a rescue disk, I think
the locking should work fine, and if it's on the NFS server then just
change it on the server without booting the machine at all. However I
noticed also that some of the password hashes ($1 md5 and $2 sha1 i
use, didn't try newsalt) seem to be incompatible between NetBSD and
FreeBSD. I think one or the other has a bug in sparc64 crypt().
(could be my mistake---i've been making mistakes about things like
that recently.)

0 new messages