Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 1997 09:58:43 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        Thomas Pedersen <thpe@mail.dfh.dk>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Getting access to the harddisk via FIXIT
Message-ID:  <19971008095843.00219@lemis.com>
In-Reply-To: <Pine.BSF.3.96.971007144546.5434D-100000@gdi.uoregon.edu>; from Doug White on Tue, Oct 07, 1997 at 02:46:02PM -0700
References:  <97100714181732800@mail.dfh.dk> <Pine.BSF.3.96.971007144546.5434D-100000@gdi.uoregon.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 07, 1997 at 02:46:02PM -0700, Doug White wrote:
> On Tue, 7 Oct 1997, Thomas Pedersen wrote:
>
>> Hello,
>> I have installed a system and it works. Now my problem is that I have
>> configured the name server to be secondary.
>>
>> My problem is then that when I boot the boot process stopps because
>> the primary name server is unavailable on the address. How do I
>> access the harddisk so I can edit the rc.conf file ?
>
> hit control-c to abort the lookup.

The alternative, which will work in other cases as well, is to boot
the machine in single-user mode.  Here's an excerpt from "The Complete
FreeBSD".

Greg

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

The system startup will be interrupted as soon as the device probes  have  been
completed,  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
*******).  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, unmount any additional
file systems you have mounted and enter CTRL-D:

# umount /usr
# ^D
Skipping file system checks...
(the rest of the boot sequence)




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