From owner-freebsd-questions Sat Feb 22 15:25:53 2003 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 EE34137B401 for ; Sat, 22 Feb 2003 15:25:49 -0800 (PST) Received: from jane.inty.net (jane.inty.net [195.224.93.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 819E243FA3 for ; Sat, 22 Feb 2003 15:25:45 -0800 (PST) (envelope-from Chris@furrie.net) Received: from inty.furrie.net (furrie.net [213.208.115.165]) (authenticated) by jane.inty.net (8.11.6/8.11.6) with ESMTP id h1MNPfm87139; Sat, 22 Feb 2003 23:25:41 GMT Received: from athena ([10.6.8.21]) by inty.furrie.net (8.12.1/8.12.1) with ESMTP id h1MNPe1X043167; Sat, 22 Feb 2003 23:25:40 GMT From: "Chris Phillips" To: "'Matthew Seaman'" Cc: Subject: RE: Using mount... (SOLVED) Date: Sat, 22 Feb 2003 23:25:56 -0000 Organization: furrie.net Message-ID: <000001c2dac9$c0006c10$1508060a@furrie.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <20030222210924.GA7546@happy-idiot-talk.infracaninophi> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Sender-IP: 10.6.8.21 X-INT-DeliveryDone: h1MNPe1X043167 X-suppress-rcpt-virus-notify: yes X-Skip-Virus-Check: yes X-Virus-Checked: 7049 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Chris Phillips wrote: - > Hi, >=20 > I have read man mount & googled lots but I am at a loss as how to=20 > mount the 2 partitions on my 2nd hard disk. >=20 > I've created 2 new partitions on it: /dev/ad1s1b (swap) and=20 > /dev/ad1s1e /data (ufs) >=20 > Ideally, I'd like to mount both the swap & the /data partition, then=20 > use "mount -p" to give me the correct format of the required=20 > /etc/fstab entries... I am stumbling at the first step unfortunately=20 > :-( >=20 > aphrodite# uname -a > FreeBSD aphrodite.furrie.net 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #1: > Thu Feb 20 23:27:51 GMT 2003=20 > furrie@aphrodite.furrie.net:/usr/obj/usr/src/sys/APHRODITE i386 >=20 > aphrodite# dmesg (somewhat snipped) > ad0: 19092MB [38792/16/63] at ata0-master UDMA66 > ad1: 114473MB [232581/16/63] at ata0-slave=20 > UDMA66 Mounting root from ufs:/dev/ad0s1a >=20 > aphrodite# mount /dev/ad1s1e /data > mount: /dev/ad1s1e on /data: incorrect super block >=20 Matthew said: - 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 > Josh also mentioned "newfs"... Chris Phillips thanks all as this is now SOLVED! I was experiencing some difficulty, as if I added the said lines into /etc/fstab, I would be unable to boot completely. This was possibly due to the fact that when I used /stand/sysinstall to fdisk the drive & label the partitions, it would seem to have not done anything... Oh dear! I tried again (omitting the swap space as already have a big'un on the 1st drive (ad0). I used the "W" option in the label editor which seemed to do the trick & now with the fstab file looking like the one below, things are wonderful again ;-) aphrodite# more /etc/fstab=20 # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1f /tmp ufs rw 2 2 /dev/ad0s1g /usr ufs rw 2 2 /dev/ad0s1e /var ufs rw 2 2 /dev/ad1s1e /data ufs rw 2 2 /dev/acd0c /cdrom cd9660 ro,noauto 0 0 proc /proc procfs rw 0 0 I can now get the system back to normal, (having copied the contents of the /data disk all over the place, while I reformatted it)... /usr being somewhat crowded at the moment! That's not to mention me XP box that's completely maxed out with copied data ;-) aphrodite# df -k Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s1a 128990 30598 88074 26% / /dev/ad0s1f 257998 428 236932 0% /tmp /dev/ad0s1g 17586670 15102178 1077560 93% /usr /dev/ad0s1e 257998 6188 231172 3% /var /dev/ad1s1e 115394404 225978 105936874 0% /data procfs 4 4 0 100% /proc Thanks again all xx end intY=20has=20scanned=20this=20email=20for=20all=20known=20viruses=20=28ww= w=2Einty=2Ecom=29 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message