*BSD News Article 65815


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!news.artisoft.com!usenet
From: Terry Lambert <terry@lambert.org>
Newsgroups: comp.unix.bsd.misc,comp.unix.bsd.freebsd.misc
Subject: Re: LFS problems under FreeBSD 2.1
Date: Sun, 14 Apr 1996 13:53:01 -0700
Organization: Me
Lines: 106
Message-ID: <317165AD.566CF360@lambert.org>
References: <4kpm2f$jj7@tecsun1.tec.army.mil>
NNTP-Posting-Host: hecate.artisoft.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.1.76 i486)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.misc:727 comp.unix.bsd.freebsd.misc:17261

Anne Brink wrote:
] 
] I'm trying, for a term project, to play with LFS under FreeBSD.
] I'm not getting very far, since I'm having trouble with my
] kernel panicking pretty much directly after I do a mount_lfs
] of the partition.  What panic messages I get aren't consistent
] at this point, and I want to check to make sure my configuration's
] correct before I start having to run debuggers on kernel corefiles.
] 
] The documentation in either FreeBSD or BSD4.4 is rather slight,
] so I'm not sure what to look for.
]
] I'm running: FreeBSD 2.1 on an Acer P75, 8MB RAM. The disks I'm
] using are IDE.

Are you running the FreeBSD LFS, or are you running the 4.4BSD-Lite2
LFS?  The FreeBSD VM system makes I/O substantially different
at the FS bottom end (part of the price for not using the Heidemann
FS framework as it was intended; 4.4's inclusion of the FICUS
project code was a hasty hack).

If your 2.1 isn't 2.1R, then you may need to back off on your
verion number to a release version to get LFS to work.

Note that there has ben substantial work done in the LFS code
in the 4.4BSD-Lite2 release that has not yet been integrated
into FReeBSD.


] Here are some questions that I hope someone can help me with.
] 
] I've rebuilt the kernel with the (seemingly undocumented in
] FreeBSD) option LFS.

I think it is documented in /sys/i386/conf/LINT, actually...

] Is there anything else my kernel needs built in that I'm
] likely missing?

The cleaner startup.  LFS requires a cleaner daemon, and the
daemon is typically run in user space from the /etc/rc file.

It may be required that the cleaner daemon be run before a
mount -- I'm not sure.  I'm pretty sure that you can only
have one LFS instance at a time right now without the Lite2
code integration.

Margo Seltzer has done most of the recent work on LFS (according
to my sources, anyway), so you may want to contact her for more
information.  She was running on a vanilla 4.4BSD (not Lite), so
her information will not be strictly applicable to FreeBSD,
which has a unified VM and buffer cache.

FreeBSD has a facility (which I hacked together as a generalization)
for starting daemons from kernel space -- basically a kernel
callable "fork", which is used for starting up the pagedaemon,
the vmdaemon, and the update daemon.  The cleaner really needs
to be started and stopped this way as a result of mount so that
you don't have a mount without a cleaner.  At present, this would
only reduce your exposure IFF the cleaner needed to be started
prior to mount to provide a process context for  LFS async events
in the kernel.


] What should the disklabel entry look like, for the LFS partition?
] Currently, It looks identical to the 4.2BSD partitions, except
] the fs type is '4.4LFS'. Should it have 0's for blocks, etc. just
] like the 4.2BSD partitions?

Generally, the disklabel is largely irrelevant (NetBSD looks at
it and refuses to swap on something that isn't "swap" on Alpha's,
but other than that, it's largely ignored).

What's important is the raw and block device: the raw for the newfs,
and the block for the mount.


] It's not clear from the manpage, when I do a newlfs, just
] which options are required, and which are optional.

Sorry; it's been 8 months since I built and ran an LFS.  From what
I rememebr, I needed -L and -s (had to give the disk size in
sectors -- newlfs should retrive this from the device via ioctl()).


] And, in a related question, does the partition need to end on
] cylinder boundaries on an IDE drive?

This is a requirement of some BIOS-based boot code.  If it isn't
a bootable device (my root mount code actually might work on LFS;
that's why I was playing with it at all), thenyou should be able
to safely ignore it.  Only the OS/2 and NT MBR's have a fit on
cylinder alignment, AFAIK.

 
] Is there an FAQ out there I haven't found, yet?

Nope.  The best source it the maintainer, who I think is still
Margo.


                                        Terry Lambert
                                        terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.