1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Mount a ext2fs(linux) in freebsd...

Discussion in 'Linux and Unix' started by Gibble, Feb 7, 2005.

Thread Status:
Not open for further replies.
Advertisement
  1. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    I *may* be seeing part of the problem...if I run an fdisk on the drive ad1 I get the following:
    Code:
    [root@goldmember:/mnt/olddrive/usr] # fdisk ad1
    ******* Working on device /dev/ad1 *******
    parameters extracted from in-core disklabel are:
    cylinders=5005 heads=255 sectors/track=63 (16065 blks/cyl)
    
    Figures below won't work with BIOS for partitions not in cyl 1
    parameters to be used for BIOS calculations are:
    cylinders=5005 heads=255 sectors/track=63 (16065 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 130,(Linux swap or Solaris x86)
        start 63, size 273042 (133 Meg), flag 0
            beg: cyl 0/ head 1/ sector 1;
            end: cyl 16/ head 254/ sector 63
    The data for partition 2 is:
    sysid 15,(Extended DOS, LBA)
        start 787185, size 79618140 (38876 Meg), flag 0
            beg: cyl 49/ head 0/ sector 1;
            end: cyl 1023/ head 254/ sector 63
    The data for partition 3 is:
    sysid 131,(Linux filesystem)
        start 273168, size 514017 (250 Meg), flag 80 (active)
            beg: cyl 17/ head 1/ sector 1;
            end: cyl 48/ head 254/ sector 63
    The data for partition 4 is:
    <UNUSED>
    Compared to my fstab...it makes sense.

    Partition 1 is linux Swap...my fstab hda1 is swap.
    Partition 2 is Extended DOS, LBA...it's not in my fstab.
    Partition 3 is Linux filesystem...my fstab hda3 is / and I can mount this.
    Partition 4 is UNUSED...it's not in my fstab.

    So where are the rest of the partitions, 5 through 9, which would contain the rest of my data?
     
  2. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    Hmm...according to dmesg, the magic number is wrong...:confused:

    [root@goldmember:/mnt/olddrive/usr] # dmesg
    Copyright (c) 1992-2004 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
    FreeBSD 4.10-RELEASE #1: Sun Jan 30 18:01:28 CST 2005
    ...
    ...
    ...
    ad0: 152627MB <WDC WD1600JB-00GVA0> [310101/16/63] at ata0-master UDMA66
    ad1: 39266MB <IC35L040AVER07-0> [79780/16/63] at ata0-slave UDMA66
    acd0: CDROM <FX4824T> at ata1-master PIO4
    Mounting root from ufs:/dev/ad0s1a
    ext2fs: #ad/0x2000a: wrong magic number 0 (expected 0xef53)
    ext2fs: #ad/0x3000a: wrong magic number 0x1e64 (expected 0xef53)
    ext2fs: #ad/0x3000a: wrong magic number 0x1e64 (expected 0xef53)
    ext2fs: ad1: wrong magic number 0 (expected 0xef53)
    ext2fs: #ad/0x2000a: wrong magic number 0 (expected 0xef53)
    ext2fs: #ad/0x2000a: wrong magic number 0 (expected 0xef53)
    ext2fs: ad1: wrong magic number 0 (expected 0xef53)
    ext2fs: #ad/0x20002: wrong magic number 0x8b6 (expected 0xef53)
    ext2fs: #ad/0x3000a: wrong magic number 0x1e64 (expected 0xef53)
    ext2fs: #ad/0x2000a: wrong magic number 0 (expected 0xef53)
    ext2fs: #ad/0x3000a: wrong magic number 0x1e64 (expected 0xef53)
     
  3. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    EUREKA!!!

    The extended partitions were
    /dev/ad1s5-9
    But I had to use MAKEDEV ad1s5-9 to make them available. Then I could easily mount them :)

    Finally. Thanks for the help guys.
     
  4. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/327729