Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 1997 22:30:05 -0500 (CDT)
From:      uhclem@nemesis.lonestar.org
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/4845: Boot complains about disk slices in FAT partitions - FDIV075
Message-ID:  <199710250330.WAA00369@skaro.lonestar.org>
Resent-Message-ID: <199710250330.UAA09020@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4845
>Category:       kern
>Synopsis:       Boot complains about disk slices in FAT partitions - FDIV075
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 24 20:30:00 PDT 1997
>Last-Modified:
>Originator:     Frank Durda IV
>Organization:
None
>Release:        FreeBSD 2.2.5-RELEASE i386
>Environment:

Pentium 120MHz system with Adaptec 1542 controller with one 2GB SCSI
drive.  32MB of RAM

>Description:

On a drive that had previously contained only a single FreeBSD partition
(created under 2.2.5 101897 BETA), a new install of the release 2.2.5
was done.  This time, during the FreeBSD install, a different drive
division was specified.   First, a 50Meg Type 6 (FAT) partition was
defined (using the FreeBSD install disk), and the rest of the disk was
assigned to a FreeBSD (165) partition.  In the FreeBSD partition, a 150Meg
root, 240Meg swap, 400Meg /usr, 800Meg /usr/src and a ~470Meg /a were
defined.  The install proceeded normally.

Here is what fdisk says:

******* Working on device /dev/rsd0 *******
parameters extracted from in-core disklabel are:
cylinders=2069 heads=64 sectors/track=32 (2048 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2069 heads=64 sectors/track=32 (2048 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 6,(Primary 'big' DOS (> 32MB))
    start 32, size 102368 (49 Meg), flag 0
	beg: cyl 0/ sector 1/ head 1;
	end: cyl 49/ sector 32/ head 63
The data for partition 2 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 102400, size 4134912 (2019 Meg), flag 80
	beg: cyl 50/ sector 1/ head 0;
	end: cyl 1023/ sector 32/ head 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

The fstab says:
# Device		Mountpoint	FStype	Options		Dump	Pass#
/dev/sd0s2b		none		swap	sw		0	0
/dev/sd0a		/		ufs	rw		1	1
/dev/sd0s2g		/a		ufs	rw		2	2
/dev/sd0s2e		/usr		ufs	rw		2	2
/dev/sd0s2f		/usr/src	ufs	rw		2	2
proc			/proc		procfs	rw		0	0

Note that theye are no references to partition 1, not even a mount as
type MS-DOS.   Note also that we have not yet booted MS-DOS, so residue
from the old FreeBSD filesystem and slice data remain in the MS-DOS
portion of the disk.


On reboot, the kernel for some reason looked into the type 6 partition,
and saw the traces of the old slice data from the previous installation
of FreeBSD which still linger in the partition now reserved for MS-DOS,
and these messages came out:

Oct 24 21:30:48 skaro /kernel: changing root device to sd0a
Oct 24 21:30:48 skaro /kernel: sd0s1: raw partition size != slice size
Oct 24 21:30:48 skaro /kernel: sd0s1: start 32, end 102399, size 102368
Oct 24 21:30:48 skaro /kernel: sd0s1c: start 32, end 4237311, size 4237280
Oct 24 21:30:48 skaro /kernel: sd0s1: truncating raw partition
Oct 24 21:30:48 skaro /kernel: sd0s1: rejecting partition in BSD label: it isn't entirely within the slice
Oct 24 21:30:48 skaro /kernel: sd0s1: start 32, end 102399, size 102368
Oct 24 21:30:48 skaro /kernel: sd0s1a: start 32, end 307231, size 307200
Oct 24 21:30:48 skaro /kernel: sd0s1: rejecting partition in BSD label: it isn't entirely within the slice
Oct 24 21:30:48 skaro /kernel: sd0s1b: start 307232, end 512031, size 204800
Oct 24 21:30:48 skaro /kernel: sd0s1: rejecting partition in BSD label: it isn't entirely within the slice
Oct 24 21:30:48 skaro /kernel: sd0s1e: start 512032, end 2187295, size 1675264
Oct 24 21:30:48 skaro /kernel: sd0s1: rejecting partition in BSD label: it isn't entirely within the slice
Oct 24 21:30:49 skaro /kernel: sd0s1f: start 2187296, end 3211295, size 1024000
Oct 24 21:30:49 skaro /kernel: sd0s1: rejecting partition in BSD label: it isn't entirely within the slice
Oct 24 21:30:49 skaro /kernel: sd0s1g: start 3211296, end 4237311, size 1026016


Despite the alarming look of these messages, the slices that were supposed
to be found on partition 2 were found, and mounted sucessfully.

But to get the kernel to stop sticking its nose into the MS-DOS type 6
partition and putting these messages out on each boot, I had to install
MS-DOS in partition 1 and wipe out the remaining bits of the old FreeBSD
install.  I suspect the kernel is still looking in there, but isn't
finding anything it recognizes at all.


In my opinion, the slice code should not be investigating non-165-type
partitions for slices.   

>How-To-Repeat:

Install FreeBSD on entire disk.  Re-install, but define small MS-DOS
partition in first part of the disk, do not format or install MS-DOS yet,
then install FreeBSD in remainder of disk, and finally, reboot FreeBSD
and look at the boot messages.

>Fix:
	
I suggest testing the partition type for known-slicable partition values
before hunting for possible slice data in that partition.

>Audit-Trail:
>Unformatted:



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