Re: diskless booting on nitebook
On Thu, Jun 26, 2003 at 03:39:23PM +0300, Vitaly Markitantov wrote: > I'm trying to boot diskless my notebook. > I create boot floppy disk on which i place > kernel.gz > boot/loader > boot/loader.rc > boot/device.hints > > (it's just modified kern.flp from 5.1-RELEASE distro with > my own kernel) > > Kernel on that disk built with options > options NFSCLIENT > options NFS_ROOT > > and > device cbb > device pccard > device cardbus > device miibus > device rl > > In /boot/loader.rc i place lines: > > set boot.netif.ip="172.16.0.9" > set boot.netif.netmask="255.255.255.192" > set boot.netif.gateway="172.16.0.1" > set boot.netif.hwaddr="00:a0:0c:90:90:06" > set boot.nfsroot.server="172.16.0.8" > set boot.nfsroot.path="/backup/nfsroot" > set boot.nfsroot.nfshandle="X68X" > > Kernel loads from that floppy, it's starts. But shows next error: > > ... > Timecounters tick every 10.000 msec > nfs_diskless: no interface > rl0: port 0x1000-0x10ff mem > 0x88002000-0x880021ff irq 11 at device 0.0 on cardbus1 > ... > > So, it looks like NFSCLIENT tryes to detect boot interface before > cardbus Realtek-based pccard is initialised. > > What can i do, for normal disskless booting? Ok, sorry for my error, i just must enter nfs when kernel asks for mountroot> But, system doesn't starts, it can't find init. It say's error: ... NFS ROOT: 172.16.0.8:/backup/nfsroot exec /sbin/init: error 70 exec /sbin/oinit: error 70 exec /sbin/initbak: error 70 ... and then panics. As seen in src/sys/sys/errno.h error 70 is #define ESTALE 70 /* Stale NFS file handle */ So, what is my error. I incorrectly set's set boot.nfsroot.nfshandle="X68X" in loader.rc or what? What can i do? -- Vitaly Markitantov mailto: [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RCNG diskless booting bug in /etc/rc.d/fsck
Hello all, I recently updated my world to a releng5 source tree from 12/27. I noticed that almost all of the RCNG scripts work perfectly for diskless (PXE) booting. There is one minor problem that can easily be fixed. Upon booting the rc scripts immediately initiate fsck of file systems. Since all every file system in a diskless case is NFS except the memory disks, and since fsck_nfs does not exist, the boot process stops and exits to an sh shell. This can be fixed by adding the flag -t nonfs to the fsck script in /etc/rc.d. Regards, Galen Sampson __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> What do you think about doing a little more polishing and rolling a new > set of patches taking this /etc/rc.conf option into account? Your kernel > env dhcp variables are really good. i was thinking of adding something like this to dhcp: option FBSD.rc-conf "132.65.16.100:/c/conf/rc.conf.foo"; and bootp can then tftp/nfs the file and parse it, making the result available via kenv and there is no real problem to concatenate serveral conf files - just comming up with a nice/simple syntax :-) as a proof of concept, there is no major problem to tftp this, but only from one/initial host, to make it realy flexible there is one major obstacle, the stand alone io has to be modified/augmented/complicated to have more than one socket. so, 1- is there a market for this? 2- is this a bad idea? 3- any work done already? danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Wed, 24 Apr 2002, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > "David O'Brien" <[EMAIL PROTECTED]> writes: > : On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > : > diskless_root_readonly="NO" # Make it "YES" for readonly > : > : good. > > What's wrong with the current root_rw_mount knob? It works just fine. The original complaint was that Danny's patches _assume_ that the root is going to remain R/O and just provide two ways of populating the MFS /etc, rather than allowing for the case where the MFS /etc isn't required at all. (actually, this is just reversing a recent obrien improvement to rc.diskless1 that made the MFS /etc conditional - it's still automatic in -stable and has been for a long while). There isn't a problem with controlling the root mount; diskless_root_readonly is a solution to a non-problem. The real problem is that (in the case where you want it) there is no one good way of constructing the MFS /etc - there are lots of bad ways, various of which have been committed to rc.diskless1 at different times, and still more used privately: 1) Create an MFS mounted on an arbitrary mountpoint, then use mount_null to install it over /etc when it's been populated. This was the original version when the support for read-only root appeared in rc.diskless back in 1999 (3.2-RELEASE). Gave problems because null mounts didn't (still don't?) work very well - mmap() caused panic for example. 2) Copy the files out of /etc into /tmp, then mount the MFS directly on /etc and copy the files back again. This appeared in 2001 (4.3-RELEASE) 3) Avoid the double copy on each boot by requiring the administrator to keep a copy in /conf/default/etc that can be copied directly to an MFS mounted on /etc. This appeared a couple of months later (4.4-RELEASE). 4) Small performance improvement on 3) - use a gzipped CPIO archive if available, rather than copying lots of small files which can be slow over NFS. This has just recently been committed to -stable by Luigi. 5) Danny's solution: Mount the MFS on /conf/etc, then use unionfs mounts to install it over /etc. Does unionfs work any better than mount_null? 6) My solution: Mount a second instance of the root FS on /conf/default then copy as in 3). Avoids maintaining two copies of /etc, but only works on NFS and doesn't solve the performance problem. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
diskless configuration, was ... diskless booting
im modifying libstand/bootp.c, and im trying to read a file via tftp/nfs, while i'm sure i'll figure it out - eventualy, can someone help me out here? thanks, danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> Danny, > > What do you think about doing a little more polishing and rolling a new > set of patches taking this /etc/rc.conf option into account? Your kernel > env dhcp variables are really good. I know that many do want to do what > you are doing (large scale RO /); but up until now /etc/rc.diskless* has > not been well engineered. polishing wont help, if i don't know all the problems :-) in the begining, there was no way to mount / ro - sunos would not run, and so we had zilions of /, one for each host, linux makes a mfs image, so even if freebsd is a bit messy it is by far better engineered - my .5$ the root_rw_mount is fine, but it's a bit late. now that devfs is here (great!) the only problem to solve is what/how to deal with /etc rc.conf* fstab X11 and some othere local-configurable files. the name/value knobs are fine - though some more documentation ... :-) btw, there is still another tricky problem: if i have / ro, and shared among many hosts, i can't: 1- easely specify different kernels i do this at the moment by commenting out kernel= in boot/loader.conf and passing it as a dhcp tag. 2- loadable modules for the very early modules: like unionfs, no harm in loading it, so fine but what about others that might cause problems? later ones, i load from rc.local and now for some coffee, danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
Danny, What do you think about doing a little more polishing and rolling a new set of patches taking this /etc/rc.conf option into account? Your kernel env dhcp variables are really good. I know that many do want to do what you are doing (large scale RO /); but up until now /etc/rc.diskless* has not been well engineered. On Wed, Apr 24, 2002 at 07:44:20PM -0600, M. Warner Losh wrote: > : The very original "solution" was to mount NFS / RW. The move to > : /conf/default/etc was someone's special needs leaking into the FreeBSD > : repository. If you want to special case, things be my guest -- add an > : elif test; but leave RW NFS mounted / alone. > > / should only be mounted RO IFF root_rw_mount is not empty aand > doesn't match [Nn][Oo]. We already have a variable for dealing with > that. /etc/rc.diskless* shouldn't, as obrien points out, assume a > specific setting. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: what if/diskless booting
> Note that Luigi has recently committed something similar to create the > sysctl kern.bootp_cookie (see /sys/nfs_client/bootp.c rev 1.36). > i will check that out asap. > I have also been doing the same thing for some time, but the difference in > my version is that I use four separate DHCP options (133,134,135,136 at > present, though this isn't important) and concatenate their together onto > the end of the (MFS copy of) /etc/rc.conf from rc.diskless1. > well, not much different from my proposal, which probably means that we are thinking somewhat alike :-) with my scheme, i could concat more than one file, and place all the name/value pairs in the environmet. im trying to solve the chicken and egg problem: there are some (few) things that have to be dealt very early - ie. is / RO or RW, etc. secondly, im also getting bogged down trying to configure clusters/few/single hosts with some particularities, and having some kind of central control is escential so that i can keep my sanity. we developed a very sophisticated (in other words complicated) system to configure our linux boxes, and it's getting to the point that too much time is spent debugging the system each time a new hardare/box appears :-) the freebsd scheme is much more to my liking, it just needs something more ... > The reason for using four options is that in the DHCP configuration there > are a number of different scopes in which you can put the option > assignments, all of which are potentially useful for diskless > configuration options. > > For example, in our setup we have some things that need to be set > per-subnet (eg. which servers to use), some that need to be per group{} of > machines in the dhcpd.conf (eg. we have one group of 486-class machines > that are pure X-terminals, and another of more powerful machines which are > allowed to run more services locally), and finally there are some options > that need to be set per-machine (eg. which machines need to run lpd > because they have a printer attached). Each scope gets its own DHCP > option, and then they are all concatenated together onto the end of > rc.conf. > > Before implementing this scheme, we tried to use the /etc/conf/ > scheme, but this didn't really scale well. We started with just two > classes of hardware, so had two /etc/conf/{IBM,COMPAQ} directories with > symlinks for each of the machines of that class, but then as the network > expanded we needed per-subnet configuration and the /etc/conf/${ipba} > scheme didn't work as we still needed the per-machine-class configuration > too. Then we started adding local printers and we now had > /etc/conf/{IBM-net10,COMPAQ-net10,IBM-net11,COMPAQ-net11,IBM-net10-printer} > etc and then we got some new hardware that wasn't quite the same... > he he, been there too! we get a batch of 50 machines, they are all alike, great, then some want to swap localy, fine, then some change the cd to cdr, they add a different sound card, etc, etc, > With the new scheme, everything is configured in just one place and > adding a new machine or a new per-subnet service is easy. > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: what if/diskless booting
On Wed, 24 Apr 2002, Danny Braniss wrote: > > i modified libstand/bootp.c to place all the tags - that dhcp provides - in > the kernel > environmet, so that they can be used later - eg in rc.diskless1. > > what if: > we place the rc.conf[.local] there? > in the dhcpd.conf: > option rc-conf "132.65.16.100:/d/4/etc/rc.conf" > and so - automagicaly - > `kenv rc.conf.diskless_root_readonly` > or > kenv | grep rc.conf | sed 's/rc.conf.//' > rc.conf > Note that Luigi has recently committed something similar to create the sysctl kern.bootp_cookie (see /sys/nfs_client/bootp.c rev 1.36). I have also been doing the same thing for some time, but the difference in my version is that I use four separate DHCP options (133,134,135,136 at present, though this isn't important) and concatenate their together onto the end of the (MFS copy of) /etc/rc.conf from rc.diskless1. The reason for using four options is that in the DHCP configuration there are a number of different scopes in which you can put the option assignments, all of which are potentially useful for diskless configuration options. For example, in our setup we have some things that need to be set per-subnet (eg. which servers to use), some that need to be per group{} of machines in the dhcpd.conf (eg. we have one group of 486-class machines that are pure X-terminals, and another of more powerful machines which are allowed to run more services locally), and finally there are some options that need to be set per-machine (eg. which machines need to run lpd because they have a printer attached). Each scope gets its own DHCP option, and then they are all concatenated together onto the end of rc.conf. Before implementing this scheme, we tried to use the /etc/conf/ scheme, but this didn't really scale well. We started with just two classes of hardware, so had two /etc/conf/{IBM,COMPAQ} directories with symlinks for each of the machines of that class, but then as the network expanded we needed per-subnet configuration and the /etc/conf/${ipba} scheme didn't work as we still needed the per-machine-class configuration too. Then we started adding local printers and we now had /etc/conf/{IBM-net10,COMPAQ-net10,IBM-net11,COMPAQ-net11,IBM-net10-printer} etc and then we got some new hardware that wasn't quite the same... With the new scheme, everything is configured in just one place and adding a new machine or a new per-subnet service is easy. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
what if/diskless booting
at stage 1, the diskless host sends out a bootp/dhcp request, the dhcpd servers sends back some packets, and pxeloader gets tftp'ed. i modified libstand/bootp.c to place all the tags - that dhcp provides - in the kernel environmet, so that they can be used later - eg in rc.diskless1. what if: we place the rc.conf[.local] there? in the dhcpd.conf: option rc-conf "132.65.16.100:/d/4/etc/rc.conf" and so - automagicaly - `kenv rc.conf.diskless_root_readonly` or kenv | grep rc.conf | sed 's/rc.conf.//' > rc.conf i'll work now on the 'automagicaly' part :-) danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> On Mon, 22 Apr 2002, David O'Brien wrote: > > > +if [ -z "`hostname -s`" ]; then > > +hostname=`kenv dhcp.host-name` > > +hostname $hostname > > +echo "Hostname is $hostname" > > +fi > > If you wanted to match the style for most of the rc* files, and avoid an > unecessary call to 'test,' you could do: > > case `hostname -s` in > '') > foo > ;; > esac > > Not a big deal, but I thought I'd mention it. :) > > Doug done, and thanks, danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> Robert Watson wrote: > > I have't really used the diskless environment with 4.x, but use it > > extensively in my test/development environments for 5.0. Stateless > > workstations are great when it comes to file system debugging, especially > > since newfs is orders of magnitude faster than fsck :-). > > THat is what I primarily use them for, as well. > > -- Terry true, true, it's nice to be able to fix bugs on a running system, and trying it out on a diskless/dataless! but im also deploying servers dataless, it makes upgrading them less problematic. danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> Robert Watson wrote: > > This would provide full compatibility with the current model for those > > that want it (and I think it's more people than you think) at the same > > time as changing the system to provide easy support for the environment > > you're looking for. If the default settings are changing, it should be a > > "5.0 feature" not a "4.x feature". > > FWIW, I thought this was a "new feature", since diskless/dataless > has never really worked for me, without a lot of local hacking to > make it work. > the first time around this was a real problem for me, starting off with FreeBSD and also doing the diskless stuff, now some time later (hum, about 2 years?), i tried it from scratch with 5.0 - it took me almost no time! adding the local mods took more time since i was (not very successfuly) recording the changes i was doing :-( btw, i did not have to do no 'lot of local hacking' to get it working: newfs /c/2; cd /c/2; dump 0f - / | restore rf - (brute force to get most of the local environment :-) make installworld DESTDIR=/c/2 and i could start booting 5.0 danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: diskless booting
> On Tue, Apr 23, 2002 at 08:32:51PM +0300, Danny Braniss wrote: > > > On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > > > > diskless_root_readonly="NO" # Make it "YES" for readonly > > > > > > good. > > > > > > > diskless_etc_localmd="NO" # Make it "YES" to have the > > > > # diskless environment md-mount and replicate /etc from /conf > > > > > > Seems the "if [ -d ]" tests in rc.diskless are OK already. If we add > > > this knob, then a knob should also be added for the source of the files > > > rather than assuming /conf/etc or /conf/{client}/etc. In other words > > > either really engineer this to make diskless properly configurable, or > > > have the minimal number of knobs, etc. > > > > nice, but impractical, because of the chicken and egg problem, or in other > > words, the load/over-write of rc.conf[.local] happens a bit later ... > > Please explain farther what is impractical and where the chicken-and-egg > problem is. I rc.diskless1 already has: > > if [ -d /conf/default/etc ]; then > ..snip.. > if [ -d /conf/${i}/etc ]; then in rc.diskless1 is where the decision is made about /etc, /tmp, /var. the mount is done some lines before the test. i guess a first run could be made, before the actual mount: ... echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" for i in ${bootp_ipbca} ${bootp_ipa} ${hostname} ; do if [ -d /conf/${i}/etc ]; then if [ -r /conf/${i}/etc/rc.conf ]; then . /etc/defaults/rc.conf ... IMHO, the solution is a bit of klduge :-), and sort of breaks the KISS principle. danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Mon, 22 Apr 2002, David O'Brien wrote: > +if [ -z "`hostname -s`" ]; then > +hostname=`kenv dhcp.host-name` > +hostname $hostname > +echo "Hostname is $hostname" > +fi If you wanted to match the style for most of the rc* files, and avoid an unecessary call to 'test,' you could do: case `hostname -s` in '') foo ;; esac Not a big deal, but I thought I'd mention it. :) Doug -- "We have known freedom's price. We have shown freedom's power. And in this great conflict, ... we will see freedom's victory." - George W. Bush, President of the United States State of the Union, January 28, 2002 Do YOU Yahoo!? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
Robert Watson wrote: > I have't really used the diskless environment with 4.x, but use it > extensively in my test/development environments for 5.0. Stateless > workstations are great when it comes to file system debugging, especially > since newfs is orders of magnitude faster than fsck :-). THat is what I primarily use them for, as well. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Tue, 23 Apr 2002, Terry Lambert wrote: > Robert Watson wrote: > > This would provide full compatibility with the current model for those > > that want it (and I think it's more people than you think) at the same > > time as changing the system to provide easy support for the environment > > you're looking for. If the default settings are changing, it should be a > > "5.0 feature" not a "4.x feature". > > FWIW, I thought this was a "new feature", since diskless/dataless has > never really worked for me, without a lot of local hacking to make it > work. > > So put me down on the list for "don't change the default behaviour", > if someone has actually been able to make the thing work in 4.x with > the supplied scripts. I have't really used the diskless environment with 4.x, but use it extensively in my test/development environments for 5.0. Stateless workstations are great when it comes to file system debugging, especially since newfs is orders of magnitude faster than fsck :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
Terry Lambert wrote: > configured by the green-and-which Systeam Adminstrator's Guide green-and-white System > for SunOS. Ugh. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
Robert Watson wrote: > This would provide full compatibility with the current model for those > that want it (and I think it's more people than you think) at the same > time as changing the system to provide easy support for the environment > you're looking for. If the default settings are changing, it should be a > "5.0 feature" not a "4.x feature". FWIW, I thought this was a "new feature", since diskless/dataless has never really worked for me, without a lot of local hacking to make it work. So put me down on the list for "don't change the default behaviour", if someone has actually been able to make the thing work in 4.x with the supplied scripts. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
David O'Brien wrote: > > > The very original "solution" was to mount NFS / RW. The move to > > > /conf/default/etc was someone's special needs leaking into the FreeBSD > > > repository. If you want to special case, things be my guest -- add an > > > elif test; but leave RW NFS mounted / alone. > > > > This isn't just about NFS... it's also about Fash devices, which > > are only warranteed for a limited number of writes, which mounting > > R/W would really eat into, and it's for read-only media, like in > > the "ClosedBSD" and "PicoBSD" FreeBSD based firewalls, I think. > > As I said Terry, change the patch to not take away RW /. > Add an elif check, add a `readonly_root' rc.conf knob, etc... > But people should stop assuming everyone wants their special needs and > local weirdness. In my experience, the read/write NFS / mount requires that you seriously limit the number of client machines, to get any performance at all. I understand that this is the way that the old SunOS 4.1.3u2 based engineering environments used to be recommended to be configured by the green-and-which Systeam Adminstrator's Guide for SunOS. I would argue that this is not really appropriate for a cluster or other common use today. So if your argument is based on "make no assumptions", it's OK, but you seem to be repeating the mantra "assume the default most common use is like the old SunOS 4.1.3u2 recommended use for a small number of IPC boxes". I think the default should be a read-only /, and if there is a knob, it's to make the / read/write. In SunOS diskless/dataless configurations, as installed off CDROM, the intent of a read/write / was to permit local files to be modified... specifically, /tmp and /etc/hosts and the default configuration data for the ethernet. This was really a desirable (at the time) side effect (IMO), with the real intent being to provide a root image that was customized for the hardware being booted. With the prevalence of kernel modules to support the range of hardware on differently configured diskless/dataless workstations, it really makes much more sense to share a single / image among a lot of machines. If the intent isn't NFS mounting, but local read-only/read-mostly media (which I would argue is a better match for todays common usage), then really you want it to be the default. If that isn't enough: you aren't going to be able to set the knob to make it read-only, after the fact, but setting a knob to make it read/write after the fact is really easy, so it should use negative logic for the feature, anyway. 8-). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Tue, Apr 23, 2002 at 08:32:51PM +0300, Danny Braniss wrote: > > On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > > > diskless_root_readonly="NO" # Make it "YES" for readonly > > > > good. > > > > > diskless_etc_localmd="NO" # Make it "YES" to have the > > > # diskless environment md-mount and replicate /etc from /conf > > > > Seems the "if [ -d ]" tests in rc.diskless are OK already. If we add > > this knob, then a knob should also be added for the source of the files > > rather than assuming /conf/etc or /conf/{client}/etc. In other words > > either really engineer this to make diskless properly configurable, or > > have the minimal number of knobs, etc. > > nice, but impractical, because of the chicken and egg problem, or in other > words, the load/over-write of rc.conf[.local] happens a bit later ... Please explain farther what is impractical and where the chicken-and-egg problem is. I rc.diskless1 already has: if [ -d /conf/default/etc ]; then ..snip.. if [ -d /conf/${i}/etc ]; then To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > > diskless_root_readonly="NO" # Make it "YES" for readonly > > good. > > > diskless_etc_localmd="NO" # Make it "YES" to have the > > # diskless environment md-mount and replicate /etc from /conf > > Seems the "if [ -d ]" tests in rc.diskless are OK already. If we add > this knob, then a knob should also be added for the source of the files > rather than assuming /conf/etc or /conf/{client}/etc. In other words > either really engineer this to make diskless properly configurable, or > have the minimal number of knobs, etc. nice, but impractical, because of the chicken and egg problem, or in other words, the load/over-write of rc.conf[.local] happens a bit later ... danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > diskless_root_readonly="NO" # Make it "YES" for readonly good. > diskless_etc_localmd="NO" # Make it "YES" to have the > # diskless environment md-mount and replicate /etc from /conf Seems the "if [ -d ]" tests in rc.diskless are OK already. If we add this knob, then a knob should also be added for the source of the files rather than assuming /conf/etc or /conf/{client}/etc. In other words either really engineer this to make diskless properly configurable, or have the minimal number of knobs, etc. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Tue, 23 Apr 2002, David O'Brien wrote: > On Tue, Apr 23, 2002 at 03:38:59AM -0700, Terry Lambert wrote: > > > > the 'original' solution is to make /etc writable is to mount a MD, then copy > > > > all > > > > /conf/default/etc to it. > > > > > > The very original "solution" was to mount NFS / RW. The move to > > > /conf/default/etc was someone's special needs leaking into the FreeBSD > > > repository. If you want to special case, things be my guest -- add an > > > elif test; but leave RW NFS mounted / alone. > > > > This isn't just about NFS... it's also about Fash devices, which > > are only warranteed for a limited number of writes, which mounting > > R/W would really eat into, and it's for read-only media, like in > > the "ClosedBSD" and "PicoBSD" FreeBSD based firewalls, I think. > > As I said Terry, change the patch to not take away RW /. Add an elif > check, add a `readonly_root' rc.conf knob, etc... But people should > stop assuming everyone wants their special needs and local weirdness. So personally I do use the read/only version, since it improves the scalability (and sanity) of the diskless environment by preventing leakage from workstations onto the server except in specifically supported ways. That said, I'd prefer a simpler "default" setting. A series of rc.conf settings would make the most sense to me-- diskless_root_readonly="NO" # Make it "YES" for readonly diskless_etc_localmd="NO" # Make it "YES" to have the # diskless environment md-mount and replicate /etc from /conf diskless_var_localmd="NO" # Make it "YES" to have the # diskless environment md-mount /var and populate it from skeleton files This would provide full compatibility with the current model for those that want it (and I think it's more people than you think) at the same time as changing the system to provide easy support for the environment you're looking for. If the default settings are changing, it should be a "5.0 feature" not a "4.x feature". Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Tue, Apr 23, 2002 at 03:38:59AM -0700, Terry Lambert wrote: > > > the 'original' solution is to make /etc writable is to mount a MD, then copy > > > all > > > /conf/default/etc to it. > > > > The very original "solution" was to mount NFS / RW. The move to > > /conf/default/etc was someone's special needs leaking into the FreeBSD > > repository. If you want to special case, things be my guest -- add an > > elif test; but leave RW NFS mounted / alone. > > This isn't just about NFS... it's also about Fash devices, which > are only warranteed for a limited number of writes, which mounting > R/W would really eat into, and it's for read-only media, like in > the "ClosedBSD" and "PicoBSD" FreeBSD based firewalls, I think. As I said Terry, change the patch to not take away RW /. Add an elif check, add a `readonly_root' rc.conf knob, etc... But people should stop assuming everyone wants their special needs and local weirdness. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
David O'Brien wrote: > > / ( and whatever is under it) is NFS mounted read only, as should be. > > This is where all of us doing Sparc64 development say you are wrong -- / > is NFS mounted RW. Back in the SunOS diskless workstations days were > this was invented, / was NFS mounted RW. Please stop assuming everyone > wants to change from tradition. While it's true that this was the case for workstations, where you would end up having 128 workstations and 128 copies of the / directory on the server for the diskless/dataless workstations, I think the R/W mount was out of necesssity, not out of desirability. For most of the work I've done over the past 5/6 years, it's really desirable to have / mounted read-only. > > the 'original' solution is to make /etc writable is to mount a MD, then copy > > all > > /conf/default/etc to it. > > The very original "solution" was to mount NFS / RW. The move to > /conf/default/etc was someone's special needs leaking into the FreeBSD > repository. If you want to special case, things be my guest -- add an > elif test; but leave RW NFS mounted / alone. This isn't just about NFS... it's also about Fash devices, which are only warranteed for a limited number of writes, which mounting R/W would really eat into, and it's for read-only media, like in the "ClosedBSD" and "PicoBSD" FreeBSD based firewalls, I think. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Tue, Apr 23, 2002 at 09:19:56AM +0300, Danny Braniss wrote: > > That being that some of us actually WANT /etc to be left the fsck alone. > > We NFS mount / and that / has /etc as it should be. I also cannot follow > > what you are trying to do with /etc/conf. Perhaps you could comment that > > part? > > i don't understand what you mean by 'left the fsck alone', but i'll try to > explain. > > / ( and whatever is under it) is NFS mounted read only, as should be. This is where all of us doing Sparc64 development say you are wrong -- / is NFS mounted RW. Back in the SunOS diskless workstations days were this was invented, / was NFS mounted RW. Please stop assuming everyone wants to change from tradition. > the 'original' solution is to make /etc writable is to mount a MD, then copy > all > /conf/default/etc to it. The very original "solution" was to mount NFS / RW. The move to /conf/default/etc was someone's special needs leaking into the FreeBSD repository. If you want to special case, things be my guest -- add an elif test; but leave RW NFS mounted / alone. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> On Mon, Apr 22, 2002 at 10:40:44AM +0300, Danny Braniss wrote: > > Since im very interested in diskless/dataless, and i've been at it for some > > time now, i made some changes to libstand/bootp.c and /etc/rc.diskless1 > > which i wouldn't mind receiving commnets/suggestions, and if possible > > incorporated. > > > > the stuff is in: > > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/diskless-boot/ > > The bootp.c.diff looks like it could be useful; but I see you changed > some stuff related to PXE booting and I cannot easily test that. Maybe > someone else can. if you change #define CLASSID"FreeBSDc" to #define CLASSID"PXEClient" you will get same behaviour as before. the rest is just an addition to put stuff in the environment. danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
> I'll commit this to rc.diskless1 this will only work if you include the changes to bootp.c > > +if [ -z "`hostname -s`" ]; then > +hostname=`kenv dhcp.host-name` > +hostname $hostname > +echo "Hostname is $hostname" > +fi > > BUT you've missed the point with this point: > +else > +mount_md 4096 /conf/etc 0 > +chkerr $? "MFS mount on /conf/etc" > +mount -t unionfs /conf/etc /etc > +/bin/chmod 755 /etc > +find /etc > /dev/null > +touch /etc/.sentinel > > That being that some of us actually WANT /etc to be left the fsck alone. > We NFS mount / and that / has /etc as it should be. I also cannot follow > what you are trying to do with /etc/conf. Perhaps you could comment that > part? i don't understand what you mean by 'left the fsck alone', but i'll try to explain. / ( and whatever is under it) is NFS mounted read only, as should be. the 'original' solution is to make /etc writable is to mount a MD, then copy all /conf/default/etc to it. my 'solution' is to mount union /etc/conf as the 'writable' part. 1) i don't have to copy - and hence 2) have only one copy of /etc for all my diskless. since the next part of rc.diskless1 copies files specific to the host/cluster, and there are some cases that i want to actually remove a file, i do that in rc.local (configurable via rc.conf.local). thanks for looking into this, danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Mon, Apr 22, 2002 at 10:40:44AM +0300, Danny Braniss wrote: > Since im very interested in diskless/dataless, and i've been at it for some > time now, i made some changes to libstand/bootp.c and /etc/rc.diskless1 > which i wouldn't mind receiving commnets/suggestions, and if possible > incorporated. > > the stuff is in: > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/diskless-boot/ The bootp.c.diff looks like it could be useful; but I see you changed some stuff related to PXE booting and I cannot easily test that. Maybe someone else can. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
On Mon, Apr 22, 2002 at 10:40:44AM +0300, Danny Braniss wrote: > Since im very interested in diskless/dataless, and i've been at it for some > time now, i made some changes to libstand/bootp.c and /etc/rc.diskless1 > which i wouldn't mind receiving commnets/suggestions, and if possible > incorporated. > > the stuff is in: > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/diskless-boot/ I'll commit this to rc.diskless1 +if [ -z "`hostname -s`" ]; then +hostname=`kenv dhcp.host-name` +hostname $hostname +echo "Hostname is $hostname" +fi BUT you've missed the point with this point: +else +mount_md 4096 /conf/etc 0 +chkerr $? "MFS mount on /conf/etc" +mount -t unionfs /conf/etc /etc +/bin/chmod 755 /etc +find /etc > /dev/null +touch /etc/.sentinel That being that some of us actually WANT /etc to be left the fsck alone. We NFS mount / and that / has /etc as it should be. I also cannot follow what you are trying to do with /etc/conf. Perhaps you could comment that part? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting
Haven't tried all the new stuff, but i've installed it on several different hosts and so far have had no real problems, good work!! Since im very interested in diskless/dataless, and i've been at it for some time now, i made some changes to libstand/bootp.c and /etc/rc.diskless1 which i wouldn't mind receiving commnets/suggestions, and if possible incorporated. the stuff is in: ftp://ftp.cs.huji.ac.il/users/danny/freebsd/diskless-boot/ danny To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Floppy/diskless booting problem with -current: FIX
It seems that the problem is in kern/vfs_conf.c: When performing BOOTP configuration, nfs/bootp_subr:bootpc_init() is called before the root-mount attempts. This routine finds the first non-loopback and non-point- to-point interface, and does the bootp request. If it gets all of its needed data, then it mounts the specified rootfs, sets nfs_diskless_valid to 3, and returns. Then vfs_rootmountalloc() is called, and the loop to mount rootdevs is started. Unfortunately (?), rootdev is not set by bootpc_init(), so the loop is rather short. :) I'm not sure what the fix should be, but here's what I did to get the root mounted: Index: vfs_conf.c === RCS file: /FreeBSD/CVS/src/sys/kern/vfs_conf.c,v retrieving revision 1.31 diff -c -9 -r1.31 vfs_conf.c *** vfs_conf.c 1999/07/03 17:40:31 1.31 --- vfs_conf.c 1999/08/23 22:38:58 *** *** 70,87 --- 70,88 /* * These define the root filesystem, device, and root filesystem type. */ dev_t rootdevs[] = { NODEV, NODEV }; char *rootdevnames[2]; struct vnode *rootvnode; char *mountrootfsname; #ifdef BOOTP extern void bootpc_init __P((void)); + extern int nfs_diskless_valid; #endif /* * vfs_init() will set maxvfsconf * to the highest defined type number. */ int maxvfsconf; struct vfsconf *vfsconf; *** *** 133,168 --- 134,174 panic("cannot mount root\n"); return ; } mp->mnt_flag|= MNT_ROOTFS; /* * Attempt the mount */ err = ENXIO; + #ifdef BOOTP + if (nfs_diskless_valid == 3) err = VFS_MOUNT(mp, NULL, NULL, NULL, p); + #endif + if (err) { orootdev = rootdev; if (rootdevs[0] == NODEV) rootdevs[0] = rootdev; for (i = 0; i < sizeof(rootdevs) / sizeof(rootdevs[0]); i++) { if (rootdevs[i] == NODEV) break; rootdev = rootdevs[i]; if (rootdev != orootdev) { s = splbio(); /* Overkill, but harmless.. */ printf("changing root device to %s\n", rootdevnames[i]); splx(s); orootdev = rootdev; } strncpy(mp->mnt_stat.f_mntfromname, rootdevnames[i] ? rootdevnames[i] : ROOTNAME, MNAMELEN - 1); err = VFS_MOUNT(mp, NULL, NULL, NULL, p); if (err != ENXIO) break; + } } if (err) { /* * XXX should ask the user for the name in some cases. * Why do we call vfs_unbusy() here and not after ENXIO * is returned above? */ vfs_unbusy(mp, p); /* I'd really appreciate it if someone could take a look at this and commit a fix (possibly this one). John? Poul? Peter? Without a similar fix, I don't think that BOOTP kernels will not work (as specified in the file /usr/share/examples/diskless/README.BOOTP). -Mark Taylor NetMAX Developer [EMAIL PROTECTED] http://www.netmax.com/ On 23-Aug-99 Mark J. Taylor wrote: > > > I'm attempting to boot a -current system (from 4 days ago) off of a modified > GENERIC kernel floppy disk, and it is failing in kern/vfs_conf.c's vfs_mountrootfs > routine, with a message: > rootdev=0x error=6, panic: cannot mount root(2) > > > rootdev is NODEV, and err is ENXIO. > > > The isc-dhcp server does serve the bootp request successfully (I get messages from > the -current kernel that indicate an IP address, rootfs, et.al), and the NFS server > reports the success of the client mounting the NFS-exported filesystem (the server > is a 3.1-RELEASE machine). I am not specifying any swap (yet). > > > > I'm using a straight GENERIC kernel, kgzipped, with options added at the end: > options BOOTP > options BOOTP_NFSROOT > options BOOTP_COMPAT > options NULLFS > options UNION > > (the NFS_ROOT option is already in GENERIC.) > > > > Am I missing something? (I tried "BOOTP_NFSV3" option also)... Any success stories > using this method? (as documented in /usr/share/examples/diskless) > > > > > > -Mark Taylor > NetMAX Developer > [EMAIL PROTECTED] > http://www.netmax.com/ > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Floppy/diskless booting problem with -current
I'm attempting to boot a -current system (from 4 days ago) off of a modified GENERIC kernel floppy disk, and it is failing in kern/vfs_conf.c's vfs_mountrootfs routine, with a message: rootdev=0x error=6, panic: cannot mount root(2) rootdev is NODEV, and err is ENXIO. The isc-dhcp server does serve the bootp request successfully (I get messages from the -current kernel that indicate an IP address, rootfs, et.al), and the NFS server reports the success of the client mounting the NFS-exported filesystem (the server is a 3.1-RELEASE machine). I am not specifying any swap (yet). I'm using a straight GENERIC kernel, kgzipped, with options added at the end: options BOOTP options BOOTP_NFSROOT options BOOTP_COMPAT options NULLFS options UNION (the NFS_ROOT option is already in GENERIC.) Am I missing something? (I tried "BOOTP_NFSV3" option also)... Any success stories using this method? (as documented in /usr/share/examples/diskless) -Mark Taylor NetMAX Developer [EMAIL PROTECTED] http://www.netmax.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
diskless booting broken
Diskless (BOOTP_NFSROOT,NFS_ROOT) booting appears to be broken in -current. (at least on alpha, haven't tried x86): net0:> boot kernel.de1 /kernel.de1 data=0x261540+0x253f8 syms=[0x8+0x30ae0+0x8+0x232eb] Entering kernel.de1 at 0xfc325c80... Copyright (c) 1992-1999 The FreeBSD Project. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 4.0-CURRENT #1: Tue Jul 27 14:46:14 EDT 1999 [EMAIL PROTECTED]:/usr/src/sys/compile/BOOTP AlphaStation 500 or 600 (KN20AA) <.snip...> bootpc_init: wired to interface 'de1' bootpc_init: using network interface 'de1' Bootpc testing starting bootpc hw address is 0:0:f8:0:xx:yy My ip address is 152.3.x.y Server ip address is 152.3.x.y Gateway ip address is 0.0.0.0 Server name is xxx.cs.duke.edu boot file is /freebsd/diskless.alpha/boot/netboot Subnet mask is 255.255.0.0 rootfs is 152.3.x.y:/freebsd/diskless.alpha rootdev=0x error=6, panic: cannot mount root (2) panic Stopped at Debugger+0x2c: ldq ra,0(sp) <0xfc5e3ca0> The rootdev is never set, so the mount is never attempted in vfs_mountrootfs. The appended hack (in the spirit of the first MFS_ROOT fix by John Birrell) seems to fix it temporarily. Can somebody with a clue please look into this? Thanks, Drew -- Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: [EMAIL PROTECTED] Department of Computer Science Phone: (919) 660-6590 Index: vfs_conf.c === RCS file: /home/ncvs/src/sys/kern/vfs_conf.c,v retrieving revision 1.31 diff -u -b -B -c -r1.31 vfs_conf.c cvs diff: conflicting specifications of output style *** vfs_conf.c 1999/07/03 17:40:31 1.31 --- vfs_conf.c 1999/07/27 21:17:31 *** *** 134,140 return ; } mp->mnt_flag|= MNT_ROOTFS; ! /* * Attempt the mount */ --- 134,142 return ; } mp->mnt_flag|= MNT_ROOTFS; ! #if defined (BOOTP_NFSROOT) || defined (NFS_ROOT) ! err = VFS_MOUNT(mp, NULL, NULL, NULL, p); ! #else /* * Attempt the mount */ *** *** 158,163 --- 160,166 if (err != ENXIO) break; } + #endif if (err) { /* * XXX should ask the user for the name in some cases. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message