From owner-freebsd-i386@FreeBSD.ORG Sun Jul 13 11:20:06 2003 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D11F37B404 for ; Sun, 13 Jul 2003 11:20:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08BF043FB1 for ; Sun, 13 Jul 2003 11:20:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h6DIK4Up097196 for ; Sun, 13 Jul 2003 11:20:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h6DIK4A1097195; Sun, 13 Jul 2003 11:20:04 -0700 (PDT) Date: Sun, 13 Jul 2003 11:20:04 -0700 (PDT) Message-Id: <200307131820.h6DIK4A1097195@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: "KAREN THODE" Subject: Re: i386/53620: Kernel panics / reboots during install of 5.1 to 40GB disk on 44 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: KAREN THODE List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 18:20:06 -0000 The following reply was made to PR i386/53620; it has been noted by GNATS. From: "KAREN THODE" To: "Nick Triantos" , Cc: Subject: Re: i386/53620: Kernel panics / reboots during install of 5.1 to 40GB disk on 44 Date: Sun, 13 Jul 2003 13:13:05 -0500 ------=_NextPart_001_0000_01C34940.7F2E9640 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Did you add the dumpdev line to /etc/rc.conf? ----- Original Message ----- From: Nick Triantos Sent: Saturday, July 12, 2003 11:58 PM To: 'KAREN THODE'; freebsd-gnats-submit@freebsd.org Subject: RE: i386/53620: Kernel panics / reboots during install of 5.1 to= 40GB disk on 44 (re-sending, my mail server is having problems, not sure if it made it th= rough) Hi, this did not work as expected. I built/installed a debug kernel, but when I ran /stand/sysinstall after = booting with that kernel (from the 20GB disk), it seemed to only know how= to install to /dev/ad0, which is the 20GB disk. It overwrote part of my= working installation before I could cancel it. fdisk/disklabel worked o= k to /dev/ad1, but the install of packages seemed to want to force itself= onto the live filesystem. (1) Is there something I could / should do to build a custom install CD w= ith the debug kernel? (1a) I could install yet another hard disk in the machine that the CD cou= ld use as swap space (2) Or maybe I can somehow mount all of my working disk as a read-only mo= unt? (3) It seems I should be able to get sysinstall to forcibly write to /dev= /ad1 only, but from reading over all the docs I can find, I could not see= a way to do that. (4) I could also use null-model to debug this, if it's reasonably easy to= set up. The only compilication is that my other PCs all run WinXP, so I= 'd have to install a gdb client for windows, and probably cygwin. regards, and thanks for all the help. -Nick -----Original Message----- From: KAREN THODE [mailto:thode12@msn.com] =20 Sent: Tuesday, July 08, 2003 4:02 PM To: Nick Triantos; freebsd-gnats-submit@freebsd.org Subject: Re: i386/53620: Kernel panics / reboots during install of 5.1 to= 40GB disk on 44 Boot off of the 20 GB hard drive. Now, you need to make a copy of /usr/s= rc/sys/i386/conf/GENERIC into a new directory called /usr/dbgkern. Now o= pen up /usr/dbgkern/GENERIC in a text editor. Look for a line that says = "#makeoptions DEBUG=3D-g" and remove the pound sign from the beginning.= Now change "ident GENERIC" to "ident DBGKERN". Save this file as DBG= KERN. Exit the editor. Now, type these commands (without the outer set = of quotes) into the console while logged in as root. "cd /usr/dbgkern" "rm GENERIC" "cd /usr/src" "make buildkernel KERNCONF=3D"/usr/dbgkern/DBGKERN"" "make installkernel KERNCONF=3D"/usr/dbgkern/DBGKERN"" Now, reboot the machine. As for the second question, you can perform kernel debugging without a se= rial cable. You have to type the command "gdb -k [-c name-of-core-dump-f= ile]" into the shell while logged in as root, replacing name-of-core-dump= -file with the name of the kernel core dump. Once gdb displays the (kgdb= ) prompt, you can use hbreak {[file:]function|address} to set a breakpoin= t (maximum 4), bt to perform a backtrace of the stack, c to continue runn= ing the kernel, next to step over function calls, step to step into funct= ion calls, print expr to print the value of expr on the terminal screen, = and quit to quit gdb. Lucas ----- Original Message ----- From: Nick Triantos Sent: Monday, July 07, 2003 11:57 AM To: 'KAREN THODE' Subject: RE: i386/53620: Kernel panics / reboots during install of 5.1 to= 40GB disk on 44 Hello, Is there a link somewhere on the freebsd.org web site as to how to do tha= t? Since I'm booting from the CD image, I'm not sure how I can get it to= execute from a different kernel. I suppose I can build a special CD ima= ge, is that what you'd suggest? I've also never done kernel-level debugg= ing of bsd, I assume it's done via serial interface? cheers, -Nick -----Original Message----- From: KAREN THODE [mailto:thode12@msn.com] =20 Sent: Sunday, July 06, 2003 2:07 PM To: freebsd-gnats-submit@FreeBSD.org; nick@triantos.com Subject: Re: i386/53620: Kernel panics / reboots during install of 5.1 to= 40GB disk on 44 Do you think that you could build a debugging kernel with crashdumps enab= led and then replicate the kernel panic? If you can, post a panic messag= e and gdb backtrace as a follow-up. Lucas ------=_NextPart_001_0000_01C34940.7F2E9640 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Did you add th= e dumpdev line to /etc/rc.conf?
 
-= ---- Original Message -----
From: Nick Triantos
Sent: Saturday, July 12, 2003 11:58 PM
To: 'KAREN THODE'; freebsd-gnats-sub= mit@freebsd.org
Subject: RE:= i386/53620: Kernel panics / reboots during install of 5.1 to 40GB disk o= n 44
 
= (re-sending, my mail server is having problems, not sure if it made it th= rough)
 
Hi, this did not work as expected.
 
I built/installed a d= ebug kernel, but when I ran /stand/sysinstall after booting with that ker= nel (from the 20GB disk), it seemed to only know how to install to /dev/a= d0, which is the 20GB disk.  It overwrote part of my working in= stallation before I could cancel it.  fdisk/disklabel worked ok= to /dev/ad1, but the install of packages seemed to want to force itself = onto the live filesystem.
 
(1) Is there something I cou= ld / should do to build a custom install CD with the debug kernel?=
(1a) I could install = yet another hard disk in the machine that the CD could use as swap space<= /SPAN>
<= /FONT> 
(2) Or maybe I can somehow mount all of my working disk as a = read-only mount?
 
(3) It seems I should be able to get = sysinstall to forcibly write to /dev/ad1 only, but from reading over all = the docs I can find, I could not see a way to do that.
 
(4) I could also use null-model to debug this, if it's reasonably easy t= o set up.  The only compilication is that my other PCs all run WinXP= , so I'd have to install a gdb client for windows, and probably cygwin.
 
regards, and thanks for all the help.
 
-Nick
-----Original Message---= --
From: KAREN THODE [mailto:thode12@msn.com]
Sent: = Tuesday, July 08, 2003 4:02 PM
To: Nick Triantos; freebsd-gnats= -submit@freebsd.org
Subject: Re: i386/53620: Kernel panics / re= boots during install of 5.1 to 40GB disk on 44

=  
Boot off of the 20 GB hard drive.  Now, you need t= o make a copy of /usr/s= rc/sys/i386/conf/GENERIC into a new directory called /usr/dbgkern.=   Now open up /usr/dbgkern/GENERIC in a text editor.  Look for = a line that says "#makeoptions   DEBUG=3D-g" and remove the pou= nd sign from the beginning.  Now change "ident  GENERIC" t= o "ident  DBGKERN".  Save this file as DBGKERN.  Exit the = editor.  Now, type these commands (without the outer set of quotes)&= nbsp;into the console while logged in as root.
"cd /usr/dbgker= n"
"rm GENERIC"
"cd /usr/src"
"make buil= dkernel KERNCONF=3D"/usr/dbgkern/DBGKERN""
"make installkernel= KERNCONF=3D"/usr/dbgkern/DBGKERN""
Now, reboot the machine.
 
As for the second question, you can perform k= ernel debugging without a serial cable.  You have to type the comman= d "gdb -k [-c name-of-core-dump-file]" into the shell while logged in as root= , replacing name-of-core-dump-file with the name of the kernel core dump.=   Once gdb displays the (kgdb) prompt, you can use hbreak {[file:]fu= nction|address} to set a breakpoint (maximum 4), bt to perform a backtrac= e of the stack, c to continue running the kernel, next to step over funct= ion calls, step to step into function calls, print expr to print the valu= e of expr on the terminal screen, and quit to quit gdb.
 
Lucas
----- Original Message -----
From: Nick Triant= os
Sent: Monday, July 07, 20= 03 11:57 AM
To: 'KAREN THODE= '
Subject: RE: i386/53620: K= ernel panics / reboots during install of 5.1 to 40GB disk on 44
 
=
Hello,<= /SPAN>
 
Is there a link = somewhere on the freebsd.org web site as to how to do that?  Since I= 'm booting from the CD image, I'm not sure how I can get it to execute fr= om a different kernel.  I suppose I can build a special CD image, is= that what you'd suggest?  I've also never done kernel-level debuggi= ng of bsd, I assume it's done via serial interface?
<= DIV> 
cheers,
-Nick
-----Origin= al Message-----
From: KAREN THODE [mailto:thode12@msn.com]
= Sent: Sunday, July 06, 2003 2:07 PM
To: freebsd-gnats-su= bmit@FreeBSD.org; nick@triantos.com
Subject: Re: i386/53620: Ke= rnel panics / reboots during install of 5.1 to 40GB disk on 44

Do you think that you could build a debugging kernel with= crashdumps enabled and then replicate the kernel panic?  If yo= u can, post a panic message and gdb backtrace as a follow-up.
=  
Lucas

------=_NextPart_001_0000_01C34940.7F2E9640--