From kjk1@ukc.ac.uk  Sun Sep  7 08:26:14 1997
Received: from mercury.ukc.ac.uk (mercury.ukc.ac.uk [129.12.21.10])
          by hub.freebsd.org (8.8.7/8.8.7) with SMTP id IAA24240
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 7 Sep 1997 08:26:13 -0700 (PDT)
Received: from kestrel.ukc.ac.uk by mercury.ukc.ac.uk with SMTP (PP);
          Sun, 7 Sep 1997 16:25:53 +0100
Received: from localhost by kestrel.ukc.ac.uk (5.x/UKC-2.14) id AA08408;
          Sun, 7 Sep 1997 16:25:51 +0100
Message-Id: <Pine.SV4.3.95.970907162453.7942G-100000@kestrel.ukc.ac.uk>
Date: Sun, 7 Sep 1997 16:25:51 +0100 (BST)
From: "K.J.Koster" <kjk1@ukc.ac.uk>
To: FreeBSD-gnats-submit@freebsd.org
Subject: boot fials if root fs blocksize is not 8kb

>Number:         4485
>Category:       kern
>Synopsis:       boot fials if root fs blocksize is not 8kb
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep  7 08:30:00 PDT 1997
>Closed-Date:    Sun Apr 26 10:44:30 PDT 1998
>Last-Modified:  Sun Apr 26 10:44:47 PDT 1998
>Originator:     Kees Jan Koster
>Release:        
>Organization:
>Environment:
Here is the relevant snippet from my dmesg output
 
ncr0 <ncr 53c810 scsi> rev 1 int a irq 15 on pci0:20
(ncr0:0:0): "IMPRIMIS 94601-15 4638" type 0 fixed SCSI 1
sd0(ncr0:0:0): Direct-Access 1001MB (2050995 512 byte sectors)
(ncr0:1:0): "QUANTUM LPS340S 020B" type 0 fixed SCSI 2
sd1(ncr0:1:0): Direct-Access 
sd1(ncr0:1:0): 10.0 MB/s (100 ns, offset 8)
327MB (670506 512 byte sectors)
 
>Description:
 
I was tuning my machine, and I gave all my file systems a blocksize of
16kb instead of the default 8kb. I changed the fragment size to 2kb.
I also did this for my root file system.
 
I could mount the new rootfs-to-be in my old filesystem, and I could
transfer all the necessary files to it, but the system failed to boot
from it. I got as far as the prompt `boot:', and upon typing [enter]
the system would reboot.
 
From my old root partition, I could still mount and use the new-to-be
root, and find all files there and intact.
 
>How-To-Repeat:
 
Start /stand/sysinstall. Go through the normal procedure of installing
the system, and in the label editor, specify `newfs -b 16384 -f 2048'
for the root filesystem. Finish the installation, and reboot.
 
>Fix:
 
I will agree with you that a block size of 8kb is absolutely fine for
the root filesystem, and will hardly have any impact on the
performance of my system. Therefore I suggest you apply the following
patch to the manual page of newfs(8). You may even consider adding a
similar warning to the help file of sysinstall, or even a check. The
best fix would be to have the boot code use whatever block size the
root filesystem has.
 
This simple warning would have saved me quite some frustration.
 
*** newfs.8.orig        Sun Sep  7 14:21:03 1997
--- newfs.8     Sun Sep  7 14:19:21 1997
***************
*** 282,287 ****
--- 282,291 ----
  Mount a 10240 KB large memory file system on /tmp, with
  .Xr mount 8
  options nosuid and nodev.
+ .Sh BUGS
+ The boot code of FreeBSD assumes that the file system that carries the
+ kernel has blocks of 8 kilobytes and fragments of 1 kilobyte. You will
+ not be able to boot from a file system that uses another size.
  .Sh SEE ALSO
  .Xr fdformat 1 ,
  .Xr disktab 5 ,
 


    Groetjes,
      Kees Jan

---------------------------------------------------------------v--
  Kees Jan Koster   tel: UK-1227-453157  e-mail: kjk1@ukc.ac.uk
  15 St. Michaels Road,    Canterbury,   Kent,   United Kingdom
------------------------------------------------------------------
 Gaffer tape is like the Force. It has a light side, a dark side,
                            and it holds the universe together...


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: max 
Responsible-Changed-When: Sun Sep 7 13:55:44 PDT 1997 
Responsible-Changed-Why:  
Misfiled PR. 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Sun Apr 26 10:44:30 PDT 1998 
State-Changed-Why:  
committed, thanks! 
>Unformatted:
X-send-pr-version: 3.2
 
ports ]>>Release:        FreeBSD 2.2.2-RELEASE i386
