From owner-freebsd-questions@FreeBSD.ORG Sat Jan 26 05:08:08 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EB037367 for ; Sat, 26 Jan 2013 05:08:08 +0000 (UTC) (envelope-from carlj@peak.org) Received: from redcondor2.peak.org (redcondor2.peak.org [69.59.192.56]) by mx1.freebsd.org (Postfix) with ESMTP id 9110DF35 for ; Sat, 26 Jan 2013 05:08:08 +0000 (UTC) Received: from zmail-mta01.peak.org ([207.55.16.111]) by redcondor2.peak.org ({6c724cae-de34-4c5f-b615-3072b86419fa}) via TCP (outbound) with ESMTP id 20130126050801612 for ; Sat, 26 Jan 2013 05:08:01 +0000 X-RC-FROM: X-RC-RCPT: Received: from bonsai.localnet (rad0.peak.org [69.59.192.40]) by zmail-mta01.peak.org (Postfix) with ESMTPSA id 0AD41490F31 for ; Fri, 25 Jan 2013 21:08:01 -0800 (PST) Received: from oak.localnet (oak.localnet [192.168.193.34]) by bonsai.localnet (Postfix) with ESMTP id DE7783D5A3 for ; Fri, 25 Jan 2013 21:07:59 -0800 (PST) Received: from oak.localnet (localhost.localnet [127.0.0.1]) by oak.localnet (Postfix) with ESMTP id A55C1C06D for ; Fri, 25 Jan 2013 21:07:59 -0800 (PST) Received: (from carlj@localhost) by oak.localnet (8.14.4/8.14.4/Submit) id r0Q57xJs005175; Fri, 25 Jan 2013 21:07:59 -0800 (PST) (envelope-from carlj@peak.org) X-Authentication-Warning: oak.localnet: carlj set sender to carlj@peak.org using -f From: Carl Johnson To: freebsd-questions@freebsd.org Subject: Re: Mount Logical (ext2fs) Partitions? References: Mail-Followup-To: freebsd-questions@freebsd.org Date: Fri, 25 Jan 2013 21:07:59 -0800 In-Reply-To: (Walter Hurry's message of "Fri, 25 Jan 2013 23:36:45 +0000 (UTC)") Message-ID: <87fw1o5y6o.fsf@oak.localnet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MAG-OUTBOUND: peakinternet.redcondor.net@207.55.16/22 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 05:08:09 -0000 Walter Hurry writes: > 9.1 on x86_64. > > No doubt this question has been asked before, but how do I mount logical > partitions (e2fs) under FreeBSD? I have checked the handbook, and > DuckDuckGo'ed, but without finding anything useful. > > The third slice on my first disk is a physical one, and will mount > happily under FreeBSD. > >>From /etc/fstab: > > /dev/ada0s3 /Mail ext2fs rw 0 0 > > But I have a couple of logical partitions (also ext2fs) in the fourth > slice, which I have been trying, unsuccessfully, to mount. > > For information, here is the BSD view of the disk: > > $ sudo fdisk > ******* Working on device /dev/ada0 ******* > parameters extracted from in-core disklabel are: > cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 131 (0x83),(Linux native) > start 2048, size 24576000 (12000 Meg), flag 0 > beg: cyl 0/ head 32/ sector 33; > end: cyl 1023/ head 254/ sector 63 > The data for partition 2 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 24578064, size 44040150 (21503 Meg), flag 80 (active) > beg: cyl 1023/ head 255/ sector 63; > end: cyl 1023/ head 255/ sector 63 > The data for partition 3 is: > sysid 131 (0x83),(Linux native) > start 68618240, size 958464 (468 Meg), flag 0 > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 4 is: > sysid 5 (0x05),(Extended DOS) > start 69577576, size 243002520 (118653 Meg), flag 0 > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > $ > > Now here's how Linux sees it: > > $ sudo fdisk -l /dev/sda > > Disk /dev/sda: 160.0 GB, 160041885696 bytes, 312581808 sectors > Units = sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disk identifier: 0x38d5b517 > > Device Boot Start End Blocks Id System > /dev/sda1 2048 24578047 12288000 83 Linux > /dev/sda2 * 24578064 68618213 22020075 a5 FreeBSD > /dev/sda3 68618240 69576703 479232 83 Linux > /dev/sda4 69577576 312580095 121501260 5 Extended > /dev/sda5 94158848 112590847 9216000 83 Linux > /dev/sda6 112592896 118736895 3072000 82 Linux swap / > Solaris > /dev/sda7 118738944 159698943 20480000 83 Linux > /dev/sda8 159700992 241620991 40960000 83 Linux > /dev/sda9 241623040 270299135 14338048 83 Linux > /dev/sda10 270301184 312580095 21139456 83 Linux > /dev/sda11 69580800 94156799 12288000 83 Linux There is a package called 'linuxfdisk' that is just a FreeBSD implementation of the linux fdisk and will show you what the FreeBSD partitions/slices are. You can also use gpart in the base system to get the same information. The command 'gpart list ada0' will show the primary partitions, and the command 'gpart list ada0s4' should show the logical partitions inside of the extended partition. You can also use 'file -s' and possibly do read-only mounts to see exactly what they contain. The names will probably map out like linux, but the 'sda*' will be changed to 'ada0s*'. -- Carl Johnson carlj@peak.org