Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Jun 2009 21:34:06 +0200
From:      Henri Hennebert <hlh@restart.be>
To:        Kip Macy <kmacy@freebsd.org>
Cc:        Lorenzo Perone <lopez.on.the.lists@yellowspace.net>, Mickael MAILLOT <mickael.maillot@gmail.com>, Adam McDougall <mcdouga9@egr.msu.edu>, FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>, Alberto Villa <villa.alberto@gmail.com>
Subject:   Re: ZFS booting without partitions
Message-ID:  <4A29732E.6090103@restart.be>
In-Reply-To: <3c1674c90906011515r5f706fdfl570e17a3c90f169f@mail.gmail.com>
References:  <29579856-69F7-4CDC-A52A-B414A40180ED@yellowspace.net>	 <alpine.BSF.2.00.0905261353140.8940@woozle.rinet.ru>	 <18972.5870.795005.186542@already.dhcp.gene.com>	 <4A1C18CC.7080902@icyb.net.ua>	 <18972.7173.216763.407615@already.dhcp.gene.com>	 <A1B19FAF-B574-484F-9434-17F5AF754B88@yellowspace.net>	 <4A23A81A.5050600@restart.be>	 <dfe7d2900906010355x3c5d324bxdb9761c9401ee73@mail.gmail.com>	 <3c1674c90906010608te5fdf82r8349fcb9332485d@mail.gmail.com>	 <4A240E17.30907@egr.msu.edu> <3c1674c90906011515r5f706fdfl570e17a3c90f169f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000607090404040100040306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kip Macy wrote:
> On Mon, Jun 1, 2009 at 10:21 AM, Adam McDougall <mcdouga9@egr.msu.edu> wrote:
>> I'm thinking that too.  I spent some time taking stabs at figuring it out
>> yesterday but didn't get anywhere useful.  I did try compiling the -current
>> src/sys/boot tree on 7.2 after a couple header tweaks to make it compile but
>> the loader still didn't work.  The working loader is the same file size as
>> the broken loader unless it was compiled on i386 and then it is ~30k bigger
>> for some reason (it shrinks to the same size as the rest if I force it to
>> use the same 32bit compilation flags as used on amd64).  Just mentioning
>> this in case it saves someone else some time.  I'm real pleased it works at
>> all.
> 
> If someone has the time to track down the differences I'll MFC them.
> I'm not using ZFS boot at the moment so I have no way of testing.
> 
At last I get this F.....G diff!!!

The problem was in libstand.a. By the way , the patch also take into 
account the update of Doug Rabson to answer my problem with too many 
devices / pools.

Happy to help on this one.


> Cheers,
> Kip


--------------000607090404040100040306
Content-Type: text/plain;
 name="lib_libstand.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="lib_libstand.patch"

--- lib/libstand/stand.h.orig	2007-01-09 02:02:04.000000000 +0100
+++ lib/libstand/stand.h	2009-06-03 17:24:42.627552341 +0200
@@ -167,7 +167,7 @@
 #define SOPEN_RASIZE	512
 };
 
-#define	SOPEN_MAX	8
+#define	SOPEN_MAX	64
 extern struct open_file files[];
 
 /* f_flags values */
--- lib/libstand/nfs.c.orig	2004-01-21 21:12:23.000000000 +0100
+++ lib/libstand/nfs.c	2009-06-05 20:36:26.001368421 +0200
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libstand/nfs.c,v 1.12 2004/01/21 20:12:23 jhb Exp $");
+__FBSDID("$FreeBSD: src/lib/libstand/nfs.c,v 1.14 2008/11/21 09:14:29 luigi Exp $");
 
 #include <sys/param.h>
 #include <sys/time.h>
@@ -405,16 +405,23 @@
 
 #ifdef NFS_DEBUG
  	if (debug)
- 	    printf("nfs_open: %s (rootpath=%s)\n", path, rootpath);
+ 	    printf("nfs_open: %s (rootpath=%s)\n", upath, rootpath);
 #endif
 	if (!rootpath[0]) {
 		printf("no rootpath, no nfs\n");
 		return (ENXIO);
 	}
 
+	/*
+	 * This is silly - we should look at dv_type but that value is
+	 * arch dependant and we can't use it here.
+	 */
 #ifndef __i386__
 	if (strcmp(f->f_dev->dv_name, "net") != 0)
 		return(EINVAL);
+#else
+	if (strcmp(f->f_dev->dv_name, "pxe") != 0)
+		return(EINVAL);
 #endif
 
 	if (!(desc = socktodesc(*(int *)(f->f_devdata))))

--------------000607090404040100040306--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A29732E.6090103>