Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2001 21:48:38 -0500
From:      Glenn Johnson <glennpj@charter.net>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        stable@FreeBSD.ORG
Subject:   Re: dirpref gives massive performance boost
Message-ID:  <20011027214838.A589@gforce.johnson.home>
In-Reply-To: <20011027123834.A587@gforce.johnson.home>
References:  <20010928141246.A15515@xor.obsecurity.org> <20010928232009.A29187@libero.sunshine.ale> <20010928142611.A15946@xor.obsecurity.org> <20011024074436.A36730@gsmx07.alcatel.com.au> <20011027123834.A587@gforce.johnson.home>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 27, 2001 at 12:38:34PM -0500, Glenn Johnson wrote:

> On Wed, Oct 24, 2001 at 07:44:36AM +1000, Peter Jeremy wrote:
>
> > Note that it _is_ possible to do this on your root partition without
> > needing an additional boot disk, assuming your swap partition is
> > bigger that your root partition.  The sequence is roughly (all in
> > single-user before enabling swap starting with read-only root):
> >
> > fsck -p
> > dd if=/dev/ad0s1a of=/dev/ad0s1b bs=64k
> > mount /dev/ad0s1b /mnt
> > mount -u /
> > ed /mnt/etc/fstab :: comment out swap and change root to /dev/ad0s1b
> > reboot
> > :: at the boot0 twiddle press space to get the prompt and boot
> > 0,ad(0,b)/boot/loader
> > at the loader prompt, "boot -s"
> > 
> > The system should now come up with root on ad0s1b.
> > 
> > fsck -p
> > :: arrange a writable /tmp, either "mount -u /" or "mount /tmp" if it's not
> > :: swap-backed
> > newfs /dev/ad0s1a
> > mount /dev/ad0s1a /mnt
> > cd /mnt
> > dump 0f - / | restore rf -
> > rm restoresymtable
> > ed etc/fstab :: re-enable swap and change root back to /dev/ad0s1a
> > cd /
> > reboot
> >
> > The system should now come up normally with root back on ad0s1a.
> >
> > If you're using SCSI disks, replace "ad" with "da".
> >
> > Usual caveats apply: YMMV.  Use at own risk.  Make sure you have
> > readable backups and a fixit disk in case things break.
>
> I followed this procedure for my root filesystem.  However, my system
> always boots with ad0s1b as root now.  The system still says that
> ad0s1b is used for swap.  Here is my /etc/fstab:

I figured out what I did wrong.  In the instructions above it says to
edit 'etc/fstab'; I edited '/etc/fstab' instead.  So when I rebooted,
the fstab file on ad0s1a said to mount ad0s1b as root and later the
fstab on ad0s1b was read and said to use ad0s1b as swap.

Also, the line in the instructions that says

'0,ad(0,b)/boot/loader' should be

'0:ad(0,b)/boot/loader'

-- 
Glenn Johnson
glennpj@charter.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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