Date: Sat, 22 Feb 2003 21:09:24 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: FreeBSD - Questions <FreeBSD-Questions@FreeBSD.ORG> Subject: Re: Using mount... (newbie-ness) Message-ID: <20030222210924.GA7546@happy-idiot-talk.infracaninophi> In-Reply-To: <001301c2da8f$ad810ed0$1508060a@furrie.net> References: <001301c2da8f$ad810ed0$1508060a@furrie.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 22, 2003 at 04:30:14PM -0000, Chris Phillips wrote:
> Hi,
>
> I have read man mount & googled lots but I am at a loss as how to mount
> the 2 partitions on my 2nd hard disk.
>
> I've created 2 new partitions on it: /dev/ad1s1b (swap) and /dev/ad1s1e
> /data (ufs)
>
> Ideally, I'd like to mount both the swap & the /data partition, then use
> "mount -p" to give me the correct format of the required /etc/fstab
> entries... I am stumbling at the first step unfortunately :-(
>
> aphrodite# uname -a
> FreeBSD aphrodite.furrie.net 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #1:
> Thu Feb 20 23:27:51 GMT 2003
> furrie@aphrodite.furrie.net:/usr/obj/usr/src/sys/APHRODITE i386
>
> aphrodite# dmesg (somewhat snipped)
> ad0: 19092MB <WDC WD200EB-00BHF0> [38792/16/63] at ata0-master UDMA66
> ad1: 114473MB <WDC WD1200BB-00CAA1> [232581/16/63] at ata0-slave UDMA66
> Mounting root from ufs:/dev/ad0s1a
>
> aphrodite# mount /dev/ad1s1e /data
> mount: /dev/ad1s1e on /data: incorrect super block
>
Right. First of all, swap partitions aren't "mounted" as such. You
just have to tell the system to start swapping onto the partition:
# swapon /dev/ad1s1b
To make that happen automatically on reboots, add a line like so to
/etc/fstab:
/dev/ad1s1b none swap sw 0 0
In order to mount your /data partition, either you need to tell the
mount command all the parameters it needs:
# mount -t ufs -o rw /dev/ad1s1e /data
or you need to enter the equivalent data into /fstab so that mount can
look up what it needs to know there. There are some other fields in
fstab that 'mount -p' will give default values, but that you'll
probably want to set to something useful. Try something like this in fstab:
/dev/ad1s1e /data ufs rw 2 2
Oh, and do make sure you've created a filesystem on the partition before
you try and mount it..
# newfs /dev/ad1s1e
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030222210924.GA7546>
