From owner-freebsd-questions Mon Jun 1 19:44:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA16232 for freebsd-questions-outgoing; Mon, 1 Jun 1998 19:44:08 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from freebie.lemis.com (freebie.lemis.com [139.130.136.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA16114 for ; Mon, 1 Jun 1998 19:42:48 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.0/8.9.0) id MAA07526; Tue, 2 Jun 1998 12:12:31 +0930 (CST) Message-ID: <19980602121231.C22406@freebie.lemis.com> Date: Tue, 2 Jun 1998 12:12:31 +0930 From: Greg Lehey To: Marco Shaw , freebsd-questions@FreeBSD.ORG Subject: Re: HELP! no shell References: <000701bd8db8$a3243580$0a22a10a@ipo10161034010.nbtel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <000701bd8db8$a3243580$0a22a10a@ipo10161034010.nbtel.net>; from Marco Shaw on Mon, Jun 01, 1998 at 08:54:38PM -0300 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 1 June 1998 at 20:54:38 -0300, Marco Shaw wrote: > I just installed my system today. I prefer the BASH shell, so I immediately > changed my shell (root) to BASH. I presumed that it was in /bin/bash and > already installed, BUT it wasn't. Now I can't login as root, I just get > kicked back to the login prompt, and I can't 'su' to root because the groups > aren't setup right! You shouldn't use bash in single-user mode, since it's dynamically linked and needs the libraries in /usr/lib. Use sh instead, and put this in your .profile: if [ -x /usr/local/bin/bash ]; then exec /usr/local/bin/bash fi > How can I get in without reinstalling? My friend suggested I boot a kernel > from the floppy, but how can I get one? I only have the boot floppy and no > 'emergency floppy'. You should be able to reboot in single user mode and fix this. Compare the instructions on page 157 of "The Complete FreeBSD", second edition (http://www.cdrom.com/titles/os/bsdbook2.htm): Single user mode ________________ Sometimes it's inconvenient that multiple users can access the system. For example, if you're repartitioning a disk, you don't want other people walking all over the disk while you're doing so. Even if you're the only user on the system, daemons may be doing things in the background. In order to avoid this problem, you can stop the boot process before most of the daemons have been started and enter single user mode. To do this, specify the -s flag at boot time: Boot: -s As soon as the device probes have been completed, the system startup will be interrupted, and you will be prompted for a shell. Always choose sh: some other shells, notably bash, get confused in single user mode. Only the root file system will be accessible, and it will be mounted read-only. The reason for this is that the file system may be damaged and require repair before you can write to it. If you do need to write to the root file system, you should first check the consistency of the file system with fsck (see the man page on page 715). For example, npx0 on motherboard npx0: INT 16 interface end of the probes (high intensity display) Enter pathname of shell or RETURN for sh: hit RETURN erase ^H, kill ^U, intr ^C # fsck -y /dev/rwd0a check the integrity of the root file system ** /dev/rwd0a ** Last Mounted on / ** Root file system ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 1064 files, 8190 used, 6913 free (61 frags, 1713 blocks, 0.4% fragmentation) # mount -u / remount root file system read/write # mount /usr mount any other file systems you need To leave single user mode and enter multi user mode, just enter CTRL-D: # umount /usr # ^D Skipping file system checks... (the rest of the boot sequence) Greg -- See complete headers for address and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message