From owner-freebsd-questions@FreeBSD.ORG Tue Oct 25 19:29:25 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BF3916A420 for ; Tue, 25 Oct 2005 19:29:25 +0000 (GMT) (envelope-from chowse@charter.net) Received: from mxsf08.cluster1.charter.net (mxsf08.cluster1.charter.net [209.225.28.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id E051043D45 for ; Tue, 25 Oct 2005 19:29:24 +0000 (GMT) (envelope-from chowse@charter.net) Received: from mxip07a.cluster1.charter.net (mxip07a.cluster1.charter.net [209.225.28.137]) by mxsf08.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id j9PJTMvg021136 for ; Tue, 25 Oct 2005 15:29:22 -0400 Received: from 24-176-115-34.dhcp.jcsn.tn.charter.com (HELO [192.168.254.3]) ([24.176.115.34]) by mxip07a.cluster1.charter.net with ESMTP; 25 Oct 2005 15:29:21 -0400 X-IronPort-AV: i="3.97,250,1125892800"; d="scan'208"; a="1541815302:sNHT1483887362" User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Tue, 25 Oct 2005 14:29:16 -0500 From: Charles Howse To: "freebsd-questions@freebsd.org" Message-ID: Thread-Topic: Need to boot from CD and delete a file on the hard drive Thread-Index: AcXZmmMOoYpQDEWNEdqgewARJH5tYg== In-Reply-To: <20051025175957.76667.qmail@web31609.mail.mud.yahoo.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Subject: Re: Need to boot from CD and delete a file on the hard drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2005 19:29:25 -0000 > Hello All -- > > SUMMARY: > I changed a configuration file and now I can no longer boot from my hard drive > (but I can still > boot from the CD). I would like to boot from the CD and undo my change to the > configuration > file -- but when I boot from the CD it automatically launches the install > program. Is there a way > to boot from the boot CD and get a shell and make a change to a file on the > hard drive? (I got > an "emergency shell" after booting from the CD -- but I can't figure out how > to access my hard > drive filesystem from it.) > > DETAILS: > I was trying to set up a serial console using the instructions here: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup. > html > > I typed the following at the prompt: > > # echo 'console="comconsole"' >> /boot/loader.conf > > then unplugged my regular keyboard and tried to reboot -- but the machine now > freezes on > bootup. > > I now want to boot from a CD and remove the file /boot/loader.conf from the > hard drive. Then I > should be able to boot normally again from the hard drive. > > I went into the BIOS and booted from the CD and this put me in the install > program. I don't > want to install everything again -- I just want to boot up from the CD and > execute the following > command at the prompt: > > # rm /boot/loader.conf > > After booting from the CD, I found a command in the install program to enter > an "emergency > shell" and accessed this shell by hitting ALT-F4 -- but if I do an "rm" > command in this > emergency shell, it doesn't apply to the filesystem on the hard drive -- it > applies to the CD. I > need to delete the file /boot/loader.conf while booting from the CD. > > Is there any way to fix this without installing FreeBSD all over again? OK, I'm going to try one more time, and then leave it to the pro's. :-) You will need Disc 2 of your install CD's, that contains the live file system. Boot with the install cd (1), choose 'Fixit' from the install menu, insert disc 2 when prompted for the fixit disc, then... I found this link explaining the process: http://www.freebsd-corp-net-guide.com/technotes/fixit.html