NetBSD-Users archive

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

mounting external ext2 partitions



Hello!  I have an IDE disk containing about six ext2 partitions that
I'd like to examine the contents of using a generic USB enclosure for
IDE disks.  I was able to mount the root partition of this disk, but
none of the other ones.  It's not clear to me from the output of the
`disktype' utility[*] how to mount the other partitions -- there is
not an exact correspondence between the /dev/sd0* devices and the
partitions on the disk, particularly since only the three devices
/dev/sd[a-c] are configured anyway.  I've attached a typescript of
what I tried and the results.  Can I do this at all in NetBSD 4.0?  Am
I just trying the wrong approach?

[*] <http://disktype.sourceforge.net/>
Script started on Sun Jun 15 03:30:11 2008
# cd /
# dmesg | tail
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
umass0 at uhub5 port 1 configuration 1 interface 0
umass0: JMicron USB to ATA/ATAPI Bridge, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <ST316002, 2A, > disk fixed
sd0: 149 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 312558593 sectors
sd0: no NetBSD disk label
# mount -r -t ext2fs /dev/sd0a /mnt
# ls /mnt
bin        cdrom      etc        initrd     lib        media      opt        
root       srv        tmp        var
boot       dev        home       initrd.img lost+found mnt        proc       
sbin       sys        usr        vmlinuz
# /tmp/disktype-9/disktype /dev/sd0[a-d]

--- /dev/sd0a
Block device, size 266.7 MiB (279627264 bytes)
Ext3 file system
  Volume name "/"
  UUID 48C1BB31-B26C-4779-8961-55B6E42A26A1 (DCE, v4)
  Volume size 266.7 MiB (279626752 bytes, 273073 blocks of 1 KiB)

--- /dev/sd0b
Block device, size 148.8 GiB (159743162880 bytes)
DOS/MBR partition map
Partition 1: 4.657 GiB (5000937984 bytes, 9767457 sectors from 63)
  Type 0x83 (Linux)
  Ext3 file system
    Volume name "/usr"
    UUID 1ECECE66-E8C2-4D0D-9126-B4014108F81B (DCE, v4)
    Volume size 4.657 GiB (5000937472 bytes, 1220932 blocks of 4 KiB)
Partition 2: 2.796 GiB (3002227200 bytes, 5863725 sectors from 9767520)
  Type 0x05 (Extended)
  Partition 5: 2.796 GiB (3002194944 bytes, 5863662 sectors from 9767520+63)
    Type 0x83 (Linux)
    Ext3 file system
      Volume name "/var"
      UUID 27FC7768-453C-419C-BA03-72D059B5BE5E (DCE, v4)
      Volume size 2.796 GiB (3002191872 bytes, 732957 blocks of 4 KiB)
  Signature missing

--- /dev/sd0c
Block device, size 149.0 GiB (160029999616 bytes)
GRUB boot loader, compat version 3.2, boot drive 0xff
DOS/MBR partition map
Partition 1: 266.7 MiB (279627264 bytes, 546147 sectors from 63, bootable)
  Type 0x83 (Linux)
  Ext3 file system
    Volume name "/"
    UUID 48C1BB31-B26C-4779-8961-55B6E42A26A1 (DCE, v4)
    Volume size 266.7 MiB (279626752 bytes, 273073 blocks of 1 KiB)
Partition 2: 148.8 GiB (159743162880 bytes, 311998365 sectors from 546210)
  Type 0x05 (Extended)
  Partition 5: 4.657 GiB (5000937984 bytes, 9767457 sectors from 546210+63)
    Type 0x83 (Linux)
    Ext3 file system
      Volume name "/usr"
      UUID 1ECECE66-E8C2-4D0D-9126-B4014108F81B (DCE, v4)
      Volume size 4.657 GiB (5000937472 bytes, 1220932 blocks of 4 KiB)
  Partition 6: 2.796 GiB (3002194944 bytes, 5863662 sectors from 10313730+63)
    Type 0x83 (Linux)
    Ext3 file system
      Volume name "/var"
      UUID 27FC7768-453C-419C-BA03-72D059B5BE5E (DCE, v4)
      Volume size 2.796 GiB (3002191872 bytes, 732957 blocks of 4 KiB)
  Partition 7: 1.846 GiB (1982260224 bytes, 3871602 sectors from 16177455+63)
    Type 0x82 (Linux swap / Solaris)
    Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
      Swap size 1.846 GiB (1982251008 bytes, 483948 pages of 4 KiB)
  Partition 8: 384.3 MiB (403006464 bytes, 787122 sectors from 20049120+63)
    Type 0x83 (Linux)
    Ext3 file system
      Volume name "/tmp"
      UUID 590D7A34-A97B-44D9-B403-C5AD6610CBEB (DCE, v4)
      Volume size 384.0 MiB (402654208 bytes, 393217 blocks of 1 KiB)
  Partition 9: 139.1 GiB (149354601984 bytes, 291708207 sectors from 
20836305+63)
    Type 0x83 (Linux)
    Ext3 file system
      Volume name "/home"
      UUID 480837BD-DB4F-40FA-89CB-F52CAFD07AFD (DCE, v4)
      Volume size 139.1 GiB (149354598400 bytes, 36463525 blocks of 4 KiB)

--- /dev/sd0d
disktype: Can't open /dev/sd0d: Device not configured

# mkdir /tmp/mnt-b
# mount -r -t ext2fs /dev/sd0b /tmp/mnt-b
mount_ext2fs: /dev/sd0b on /tmp/mnt-b: incorrect super block
# mount -r -t ext2fs /dev/sd0c /tmp/mnt-b
mount_ext2fs: /dev/sd0c on /tmp/mnt-b: incorrect super block
# 
Script done on Sun Jun 15 03:54:57 2008


Home | Main Index | Thread Index | Old Index