NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mounting external ext2 partitions



   Date: Sun, 15 Jun 2008 09:29:40 -0400
   From: "Steven M. Bellovin" <smb%cs.columbia.edu@localhost>

   It would be good to see the output of the NetBSD disklabel and fdisk
   commands.

Attached.

   Anyway -- you can do what you want, but it may be a bit annoying.  You
   have to set up the NetBSD disklabel partitions to point to each of the
   ext2 slices; for that, you need the start point and length of each
   fdisk partition in 512-byte sectors.  That information seems to be in
   your disktype output, so it shouldn't be too hard to set up using
   disklabel.

Is there any way to do this without writing to the disk?  I'd like to
be able just to read from it without modifying any of its contents.
Script started on Mon Jun 16 01:23:38 2008
# disklabel /dev/sd0c
# /dev/sd0c:
type: SCSI
disk: 2A              
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 312558593
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

3 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    546147        63    unknown                     # (Cyl.      0*-    541*)
 b: 311998365    546210    unknown                     # (Cyl.    541*- 310064*)
 c: 312558593         0     unused      0     0        # (Cyl.      0 - 310077*)
disklabel: boot block size 0
disklabel: super block size 0
# fdisk /dev/sd0a
fdisk: primary partition table invalid, no magic in sector 0
fdisk: Cannot determine the number of heads
Disk: /dev/sd0a
NetBSD disklabel disk geometry:
cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 312558593

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 312558593

Partition table:
0: <UNUSED>
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
# fdisk /dev/sd0b
fdisk: Cannot determine the number of heads
fdisk: extended partition table invalid, no magic in sector 25398765
fdisk: Extended partition table is corrupt

Disk: /dev/sd0b
NetBSD disklabel disk geometry:
cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 312558593

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 312558593

Partition table:
0: Linux native (sysid 131)
    start 63, size 9767457 (4769 MB, Cyls 0-607)
        PBR is not bootable: All bytes are identical (0x00)
1: Extended partition (sysid 5)
    start 9767520, size 5863725 (2863 MB, Cyls 608-972)
    Extended partition table:
    0: Linux native (sysid 131)
        start 9767583, size 5863662 (2863 MB, Cyls 608-972)
            PBR is not bootable: All bytes are identical (0x00)
    1: Extended partition (sysid 5)
        start 25398765, size 3871665 (1890 MB, Cyls 1581-1821)
        Extended partition table:
fdisk: extended partition table invalid, no magic in sector 25398765
    2: <UNUSED>
    3: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Extended partition table is corrupt
# fdisk /dev/sd0c
Disk: /dev/sd0c
NetBSD disklabel disk geometry:
cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 312558593

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 312558593

Partition table:
0: Linux native (sysid 131)
    start 63, size 546147 (267 MB, Cyls 0-33), Active
        PBR is not bootable: All bytes are identical (0x00)
1: Extended partition (sysid 5)
    start 546210, size 311998365 (152343 MB, Cyls 34-19454)
2: <UNUSED>
3: <UNUSED>
Extended partition table:
E0: Linux native (sysid 131)
    start 546273, size 9767457 (4769 MB, Cyls 34-641)
        PBR is not bootable: All bytes are identical (0x00)
E1: Linux native (sysid 131)
    start 10313793, size 5863662 (2863 MB, Cyls 642-1006)
        PBR is not bootable: All bytes are identical (0x00)
E2: Linux swap or Prime or Solaris (sysid 130)
    start 16177518, size 3871602 (1890 MB, Cyls 1007-1247)
        PBR is not bootable: All bytes are identical (0x00)
E3: Linux native (sysid 131)
    start 20049183, size 787122 (384 MB, Cyls 1248-1296)
        PBR is not bootable: All bytes are identical (0x00)
E4: Linux native (sysid 131)
    start 20836368, size 291708207 (142436 MB, Cyls 1297-19454)
        PBR is not bootable: All bytes are identical (0x00)
Drive serial number: 838521 (0x000ccb79)
# 
Script done on Mon Jun 16 01:23:53 2008


Home | Main Index | Thread Index | Old Index