From nobody@FreeBSD.org  Mon Oct 18 10:58:38 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 37D0E16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Oct 2004 10:58:38 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2AD9A43D2F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Oct 2004 10:58:38 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9IAwZKm087032
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Oct 2004 10:58:35 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i9IAwZGQ087031;
	Mon, 18 Oct 2004 10:58:35 GMT
	(envelope-from nobody)
Message-Id: <200410181058.i9IAwZGQ087031@www.freebsd.org>
Date: Mon, 18 Oct 2004 10:58:35 GMT
From: bln <bln@deprese.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: GBDE, problems using gbde_swap
X-Send-Pr-Version: www-2.3

>Number:         72812
>Category:       kern
>Synopsis:       GBDE, problems using gbde_swap
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 18 11:00:44 GMT 2004
>Closed-Date:    Thu Feb 03 10:31:02 GMT 2005
>Last-Modified:  Thu Feb 03 10:31:02 GMT 2005
>Originator:     bln
>Release:        5.3 BETA7
>Organization:
>Environment:
FreeBSD vergilius 5.3-BETA7 FreeBSD 5.3-BETA7 #4: Fri Oct 15 15:36:24 CEST 2004     root@vergilius:/usr/obj/usr/src/sys/VERGILIUS  i386

>Description:
If I use gbde for swap device, it does something bad with filesystem, because after second reboot my computer stops after bios rutines, on screen is F1 - FreeBSD, but if I press F1 or enter it on beeps and does nothing

I tried it on two computers (5.3-BETA3 and 5.3-BETA7), both give the same result
>How-To-Repeat:
Easy, you can add gbde_swap_enable="YES" to /etc/rc.conf and change swap line if fstab from: 
/dev/ad0s1b             none            swap    sw              0       0
to:
/dev/ad0s1b.bde         none            swap    sw              0       0

then reboot to set up swap, and then reboot ones more to set what happend

OR

manually, init /dev/ad0s1b, attach /dev/ad0s1b and so on, the result is same
>Fix:
Do not use gbde for swap?
>Release-Note:
>Audit-Trail:

From: Allan Fields <bsd@afields.ca>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/72812: GBDE, problems using gbde_swap
Date: Wed, 20 Oct 2004 16:23:05 -0400

 --i9LlY+UWpKt15+FH
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Please follow up with additional details such as the output from:
 
 fdisk /dev/ad0
 disklabel /dev/ad0s1
 
 You can boot from the install or live CD and run a fixit shell and
 from there should be able to get this info.
 
 Thanks,
 --=20
  Allan Fields, AFRSL - http://afields.ca
  2D4F 6806 D307 0889 6125  C31D F745 0D72 39B4 5541
 
 --i9LlY+UWpKt15+FH
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.1 (FreeBSD)
 
 iD8DBQFBdskm90UNcjm0VUERAmoYAJ4yIndgmpaCAShPchJtaNVyCX/WxQCguQrS
 RJqxdzEZVuJBMPbB8B7Okzg=
 =/uSX
 -----END PGP SIGNATURE-----
 
 --i9LlY+UWpKt15+FH--

From: eugene <eugene3@web.de>
To: freebsd-gnats-submit@FreeBSD.org, bln@deprese.net
Cc:  
Subject: Re: kern/72812: GBDE, problems using gbde_swap
Date: Thu, 21 Oct 2004 20:41:02 -0400

 i dont have a sollution, but i think i can confirm there IS a real 
 problem...
 i couldnt find out much the time i reported it...
 anyways:
 
 http://lists.freebsd.org/pipermail/freebsd-current/2004-July/032778.html
 
 the problem isnt very new and should be solved before the handbook will 
 advise people to use it...
 
 Eugene

From: Jean-Yves Lefort <jylefort@brutele.be>
To: freebsd-gnats-submit@FreeBSD.org, bln@deprese.net
Cc:  
Subject: Re: kern/72812: GBDE, problems using gbde_swap
Date: Tue, 26 Oct 2004 11:30:29 +0200

 Exactly the same problem here (5.3-BETA6).
 
 However, I managed to make the system bootable again by booting with
 the fixit floppy and issuing "disklabel -B ad0s1".
 
 Apparently the bde swap partition overwrote the bootstrap code of the
 slice. This problem is severe, /etc/rc.d/gbde_swap should *REFUSE* to
 enable a bde swap until it is fixed.
 
 --- output of "fdisk ad0" -----------------------------------------------------
 ******* Working on device /dev/ad0 *******
 parameters extracted from in-core disklabel are:
 cylinders=26354 heads=16 sectors/track=63 (1008 blks/cyl)
 
 Figures below won't work with BIOS for partitions not in cyl 1
 parameters to be used for BIOS calculations are:
 cylinders=26354 heads=16 sectors/track=63 (1008 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 165 (0xa5),(FreeBSD/NetBSD/386BSD)
     start 63, size 26564769 (12971 Meg), flag 80 (active)
 	beg: cyl 0/ head 1/ sector 1;
 	end: cyl 1023/ head 223/ sector 63
 The data for partition 2 is:
 <UNUSED>
 The data for partition 3 is:
 <UNUSED>
 The data for partition 4 is:
 <UNUSED>
 --- end -----------------------------------------------------------------------
 
 --- output of "disklabel ad0s1" -----------------------------------------------
 # /dev/ad0s1:
 8 partitions:
 #        size   offset    fstype   [fsize bsize bps/cpg]
   a: 22370465  4194304    4.2BSD     1024  8192    16 
   b:  1048576        0      swap                    
   c: 26564769        0    unused        0     0         # "raw" part, don't edit
   e:  3145728  1048576    4.2BSD        0     0     0 
 --- end -----------------------------------------------------------------------
 
 Mounts:
 	ad0s1a as /
 	ad0s1e as /var
 
 -- 
 Jean-Yves Lefort
 
 jylefort@brutele.be
 http://lefort.be.eu.org/
State-Changed-From-To: open->closed 
State-Changed-By: pjd 
State-Changed-When: Thu Feb 3 10:28:15 GMT 2005 
State-Changed-Why:  
This is not GBDE bug, but sysinstall problem. 
It is because your swap partition starts at sector 0 and should start 
at sector 16, because first 16 sectors holds the boot code and are 
overwriten when GBDE is used for swap protection. 


Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: pjd 
Responsible-Changed-When: Thu Feb 3 10:28:15 GMT 2005 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72812 
>Unformatted:
