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 had a slackware machine crash, and refuse to boot. But I need information of that harddrive. I've got a freebsd box that I'm trying to mount the drive in...with little success.

    Code:
    [[email protected]:~] #  mount_ext2fs /dev/ad1s1a /old-drive
    mount_ext2fs: /dev/ad1s1a: Invalid argument
    
    What do I need to do to mount this drive?
     
  2. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
    I see nothing wrong with your syntax.
    Do you have the option for ext2fs compiled in your kernal? Does the old_drive directory exist? Why not place the mount point in the mnt directory?
     
  3. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    I did that yesterday...or so I thought...

    is there a way to check to make sure it did compile into the kernel?
     
  4. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
    Check the kernal configuration file for

    options "EXT2FS"


    Also your mount point has to be created in an existing directory.
     
  5. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    Well, I checked the kernel config, and it was there, but I wanted to add a couple options for my firewall, so I'm recompiling it again now.

    And yes, the mounting directory DOES exist.
     
  6. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
    You could try editing the fstab and adding
    /dev/ad1s1a /old-drive auto rw,noauto,user,exec,sync 0 0
     
  7. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    how would that be any different than just using mount?
     
  8. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
    When you use the mount command your getting default options, by specifying the options in fstab your 1st: allowing autodetection of the filesystem, 2: getting past the default nouser option allowing a standard user to mount the drive. 3: getting past the async default when mounting.

    I figured the auto option may help if there's a question of the filesystem on the disk.
     
  9. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
    BRB smoke break. :)
     
  10. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    Tried it, still a no go...
     
  11. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
  12. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    I actually attempted it with ro, not rw...as I only need to read some data from it.
     
  13. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    I've made a little inroads...
    I tried several of the slices(?) and 'mount -t ext2fs /dev/ad1s3 /old-drive' mounted successfully...but while it appears to contain the entire file system
    Code:
    [[email protected]:/old-drive] # ls
    bin             command         fat-c           lib             opt             root            usr
    boot            dev             home            lost+found      package         sbin            var
    cdrom           etc             install         mnt             proc            service         vmlinuz
    Only some of the dirs contain data...

    Is there a way to find out what the other slices (is that what the s stands for?) should be mounted as? I currently have no clue
     
  14. Gibble

    Gibble Thread Starter

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    oh, wait, with that bit mounted I can read the old fstab :)

    Code:
    /dev/hda1       swap        swap        defaults   0   0
    /dev/hda3       /        ext2        defaults   1   1
    /dev/hda5       /usr      ext2        defaults   1   1
    /dev/hda6       /usr/local      ext2        defaults   1   1
    /dev/hda7       /opt      ext2        defaults   1   1
    /dev/hda8       /var      ext2        defaults   1   1
    /dev/hda9       /home      ext2        defaults   1   1
    
    This should be helpful :) I just need to figure out how those match up with these...

    Code:
    [[email protected]:/old-drive] # ls /dev/ad1*
    /dev/ad1        /dev/ad1c       /dev/ad1f       /dev/ad1s1      /dev/ad1s1c     /dev/ad1s1f     /dev/ad1s2
    /dev/ad1a       /dev/ad1d       /dev/ad1g       /dev/ad1s1a     /dev/ad1s1d     /dev/ad1s1g     /dev/ad1s3
    /dev/ad1b       /dev/ad1e       /dev/ad1h       /dev/ad1s1b     /dev/ad1s1e     /dev/ad1s1h     /dev/ad1s4
    
     
  15. gotrootdude

    gotrootdude

    Joined:
    Feb 19, 2003
    Messages:
    8,812
    Can you try configuring the disk in bios as PIO mode? One person on that link I gave you said he finally got the disk mounted useing PIO.
     
  16. 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...
Similar Threads - Solved Mount ext2fs(linux)
  1. Roqua
    Replies:
    3
    Views:
    378
Thread Status:
Not open for further replies.

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice