Re: Mount Logical (ext2fs) Partitions?

2013-01-26 Thread Walter Hurry
On Fri, 25 Jan 2013 21:07:59 -0800, Carl Johnson wrote:

 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*'.

Thanks for the pointers. Here is the relevant part of the output from 
'gpart list ada0s4':

4. Name: ada0s8
   Mediasize: 4194304 (39G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 162529280
   Mode: r0w0e0
   rawtype: 131
   length: 4194304
   offset: 46143188992
   type: linux-data
   index: 1430498
   end: 172043415
   start: 90121368

So I put into my /etc/fstab:

/dev/ada0s8 /u01ext2fs  ro,noauto 00

But when I issue 'sudo mount /u01' I get:

mount: /dev/ada0s8: Invalid argument


What am I doing wrong?


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-26 Thread Carl Johnson
Walter Hurry walterhu...@gmail.com writes:

 On Fri, 25 Jan 2013 21:07:59 -0800, Carl Johnson wrote:

 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*'.

 Thanks for the pointers. Here is the relevant part of the output from 
 'gpart list ada0s4':

 4. Name: ada0s8
Mediasize: 4194304 (39G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 162529280
Mode: r0w0e0
rawtype: 131
length: 4194304
offset: 46143188992
type: linux-data
index: 1430498
end: 172043415
start: 90121368

 So I put into my /etc/fstab:

 /dev/ada0s8 /u01ext2fs  ro,noauto 00

 But when I issue 'sudo mount /u01' I get:

 mount: /dev/ada0s8: Invalid argument


 What am I doing wrong?

I don't see anything wrong there.  I use labels when possible, but that
doesn't really change anything.  Have you tried using 'file -s
/dev/ada0s8' to see what the kernel thinks it is?
-- 
Carl Johnsonca...@peak.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-26 Thread Ralf Mardorf

On Sat, 26 Jan 2013 18:24:06 +0100, Carl Johnson ca...@peak.org wrote:

/dev/ada0s8 /u01ext2fs  ro,noauto 00


I've got 2 ext3 partitions mounted.

/dev/ada0s8 /mnt/dump   ext2fs  rw  0   0
/dev/ada0s9 /mnt/archlinux  ext2fs  rw  0   0

Did you already test rw? Even if you wish ro,..., just for testing  
purpose.


$ uname -a
FreeBSD freebsd 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4  
09:23:10 UTC 2012  
r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64


Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-26 Thread Walter Hurry
On Sat, 26 Jan 2013 09:24:06 -0800, Carl Johnson wrote:

 Walter Hurry walterhu...@gmail.com writes:
 
 On Fri, 25 Jan 2013 21:07:59 -0800, Carl Johnson wrote:

 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*'.

 Thanks for the pointers. Here is the relevant part of the output from
 'gpart list ada0s4':

 4. Name: ada0s8
Mediasize: 4194304 (39G)
Sectorsize: 512 Stripesize: 0 Stripeoffset: 162529280 Mode: r0w0e0
rawtype: 131 length: 4194304 offset: 46143188992 type:
linux-data index: 1430498 end: 172043415 start: 90121368

 So I put into my /etc/fstab:

 /dev/ada0s8 /u01ext2fs  ro,noauto 0 0

 But when I issue 'sudo mount /u01' I get:

 mount: /dev/ada0s8: Invalid argument


 What am I doing wrong?
 
 I don't see anything wrong there.  I use labels when possible, but that
 doesn't really change anything.  Have you tried using 'file -s
 /dev/ada0s8' to see what the kernel thinks it is?

Sorry, I didn't take advantage of that earlier piece of advice. Here it
is:

$ file -s /dev/ada0s8 /dev/ada0s8: no read permission
$ ls -l /dev/ada0s8 crw-r-  1 root  operator0, 102 26 Jan 18:09 /
dev/ada0s8
$ sudo file -s /dev/ada0s8 /dev/ada0s8: Linux rev 1.0 ext4 filesystem 
data,UUID=d93b0074-04ca-4e5d-bee9-dfd85bce0b14, volume name 
u01 (extents) (large files) (huge files)
$

So it's my stupid mistake. I could have sworn it was ext2, but it was 
ext4. Sorry for all the noise! However, I'm glad you have helped, and 
that I have learned a little bit about Linux partitions as FreeeBSD 
slices.

It was empty, so I just reformatted it as ext2, and hey presto; all is 
right with the world.

Thanks again.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-26 Thread Carl Johnson
Walter Hurry walterhu...@gmail.com writes:

 So it's my stupid mistake. I could have sworn it was ext2, but it was 
 ext4. Sorry for all the noise! However, I'm glad you have helped, and 
 that I have learned a little bit about Linux partitions as FreeeBSD 
 slices.

 It was empty, so I just reformatted it as ext2, and hey presto; all is 
 right with the world.

Good to know you have it working, but for future reference there is a
fuse implementation of an ext4 driver:

  sysutils/fusefs-ext4fuse  EXT4 implementation for FUSE
EXT4 implementation for FUSE.
WWW: https://github.com/gerard/ext4fuse/

I haven't tried it so I don't know how well it works.
-- 
Carl Johnsonca...@peak.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-26 Thread Walter Hurry
On Sat, 26 Jan 2013 14:43:51 -0800, Carl Johnson wrote:

 Walter Hurry walterhu...@gmail.com writes:
 
 So it's my stupid mistake. I could have sworn it was ext2, but it was
 ext4. Sorry for all the noise! However, I'm glad you have helped, and
 that I have learned a little bit about Linux partitions as FreeeBSD
 slices.

 It was empty, so I just reformatted it as ext2, and hey presto; all is
 right with the world.
 
 Good to know you have it working, but for future reference there is a
 fuse implementation of an ext4 driver:
 
   sysutils/fusefs-ext4fuse  EXT4 implementation for FUSE
 EXT4 implementation for FUSE.
 WWW: https://github.com/gerard/ext4fuse/
 
 I haven't tried it so I don't know how well it works.

Even better!

But I'll leave it for the moment; ext2 will suffice for my simple 
requirements (I only want to share a few files between FreeBSD and Linux 
without the overhead of putting them onto the external USB drive which I 
use for backups).

I have of course mounted them rw, now that it's working.

Many thanks once again.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Mount Logical (ext2fs) Partitions?

2013-01-25 Thread Walter Hurry
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  rw00

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/sda120482457804712288000   83  Linux
/dev/sda2   *245780646861821322020075   a5  FreeBSD
/dev/sda36861824069576703  479232   83  Linux
/dev/sda469577576   312580095   1215012605  Extended
/dev/sda594158848   112590847 9216000   83  Linux
/dev/sda6   112592896   118736895 3072000   82  Linux swap / 
Solaris
/dev/sda7   118738944   1596989432048   83  Linux
/dev/sda8   159700992   2416209914096   83  Linux
/dev/sda9   241623040   27029913514338048   83  Linux
/dev/sda10  270301184   31258009521139456   83  Linux
/dev/sda11   695808009415679912288000   83  Linux

Partition table entries are not in disk order
$ 

Can anyone provide a pointer please?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-25 Thread Joshua Isom

On 1/25/2013 5:36 PM, Walter Hurry wrote:

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  rw00

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/sda120482457804712288000   83  Linux
/dev/sda2   *245780646861821322020075   a5  FreeBSD
/dev/sda36861824069576703  479232   83  Linux
/dev/sda469577576   312580095   1215012605  Extended
/dev/sda594158848   112590847 9216000   83  Linux
/dev/sda6   112592896   118736895 3072000   82  Linux swap /
Solaris
/dev/sda7   118738944   1596989432048   83  Linux
/dev/sda8   159700992   2416209914096   83  Linux
/dev/sda9   241623040   27029913514338048   83  Linux
/dev/sda10  270301184   31258009521139456   83  Linux
/dev/sda11   695808009415679912288000   83  Linux

Partition table entries are not in disk order
$

Can anyone provide a pointer please?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org



What do /dev and the output of dmesg look like?  It looks like linux 
fdisk is hiding the fact that you have to cheat the bios to get more 
than four partitions with MBR partitioning.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount Logical (ext2fs) Partitions?

2013-01-25 Thread Carl Johnson
Walter Hurry walterhu...@gmail.com 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  rw00

 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/sda120482457804712288000   83  Linux
 /dev/sda2   *245780646861821322020075   a5  FreeBSD
 /dev/sda36861824069576703  479232   83  Linux
 /dev/sda469577576   312580095   1215012605  Extended
 /dev/sda594158848   112590847 9216000   83  Linux
 /dev/sda6   112592896   118736895 3072000   82  Linux swap / 
 Solaris
 /dev/sda7   118738944   1596989432048   83  Linux
 /dev/sda8   159700992   2416209914096   83  Linux
 /dev/sda9   241623040   27029913514338048   83  Linux
 /dev/sda10  270301184   31258009521139456   83  Linux
 /dev/sda11   695808009415679912288000   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 Johnsonca...@peak.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org