Google Answers Logo
View Question
 
Q: Mounting a linux (ext2fs) partition under FreeBSD ( No Answer,   6 Comments )
Question  
Subject: Mounting a linux (ext2fs) partition under FreeBSD
Category: Computers > Operating Systems
Asked by: tseven-ga
List Price: $10.00
Posted: 08 Aug 2004 12:41 PDT
Expires: 22 Sep 2004 11:20 PDT
Question ID: 385105
My FreeBSD 5.2.1-RELEASE box is being hosted remotely.

I switched from RH to FreeBSD. All my web files etc are on the second
hdd in an ext2fs partition.

I have read numerous guides, manuals, etc, but have not found a
solution for my problem.

I have compiled my kernel with the "option ext2fs".

Here is what happens if i try to mount the other hdd:
# mount_ext2fs /dev/ad2s2 /mnt
mount_ext2fs: /dev/ad2s2: Invalid argument

# mount -t ext2fs /dev/ad2s2 /mnt
ext2fs: /dev/ad2s2: Invalid argument

Here is all the information I could gather about the disks:

Boot message:
Aug  3 07:35:34 server1 kernel: GEOM: create disk ad0 dp=0xc4857c60
Aug  3 07:35:34 server1 kernel: ad0: 76319MB <WDC WD800BB-00DKA0>
[155061/16/63] at ata0-master UDMA100
Aug  3 07:35:34 server1 kernel: GEOM: create disk ad2 dp=0xc4857960
Aug  3 07:35:34 server1 kernel: ad2: 57241MB <ST360021A>
[116301/16/63] at ata1-master UDMA100
Aug  3 07:35:34 server1 kernel: Mounting root from ufs:/dev/ad0s1a


/dev listing:

            ad2
ad0             ad2s1
ad0s1           ad2s2
ad0s1a          ad2s3
ad0s1b          ad2s4
ad0s1c          ad2s5
ad0s1d          ad2s6
ad0s1e          ad2s7
ad0s1f         

File: fstab                                                                      
 
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1b             none            swap    sw              0       0
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad0s1e             /tmp            ufs     rw              2       2
/dev/ad0s1f             /usr            ufs     rw              2       2
/dev/ad0s1d             /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
*--> /dev/ad2s2              /mnt/2          ext2fs  ro,noauto       0       0

*Added by me, didn't work.


Fdisk:
Disk name:      ad2                                    FDISK Partition Editor
DISK Geometry:  7297 cyls/255 heads/63 sectors = 117226305 sectors (57239MB)
 
Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags
 
         0         63         62        -     12     unused        0
        63      96327      96389    ad2s1      4     ext2fs      131
     96390   83264895   83361284    ad2s2      4     ext2fs      131
  83361285    2088450   85449734    ad2s3      4 linux_swap      130
  85449735   31776570  117226304    ad2s4      4 extended DOS, LBA       15
 117226305       5103  117231407        -     12     unused        0         

While entering fdisk I did get a message saying the geometry of my
disk wasn't correct, and it would pick a better one, I didn't write
the "new" geometry if fear of messing something up. Could this be part
of the problem?

Also I read that some versions of linux use "Magic Clusters" to create
more hdd space on larger drives, this also may be part of the problem.

Please keep in mind I don't have physical access to the box (I do
however have full root access via ssh), and only have access to
FreeBSD.



What I would like to get is:
Fairly simple step by step solution for mounting an getting the files
off the 2nd ext2fs drive. Mounting it in read only mode would work
fine. I'll be happy to disclose any other information about what
libraries/binaries I have installed.
Thanks,

-Tseven
Answer  
There is no answer at this time.

Comments  
Subject: Re: Mounting a linux (ext2fs) partition under FreeBSD
From: georgiaville-ga on 09 Aug 2004 06:28 PDT
 
Try shotgun approach:

# mount_ext2fs /dev/ad2sN /mnt

with N = 1 to 7

Try appending letters too:

# mount_ext2fs /dev/ad2sNL /mnt

with L = a, b, c, etc.

(I might try first /dev/ads2a)
Subject: Re: Mounting a linux (ext2fs) partition under FreeBSD
From: tseven-ga on 09 Aug 2004 07:36 PDT
 
Thanks for the tip, I've hit it with a few shotgun shells as you
suggested, but each time I receive:
mount_ext2fs: /dev/ad2sN: No such file or directory

I don't think i'm doing anything wrong, perhaps it's my system.
Subject: Re: Mounting a linux (ext2fs) partition under FreeBSD
From: georgiaville-ga on 09 Aug 2004 08:30 PDT
 
First, you're certain /mnt exists, yes?

Then, you tried all permutations of /dev/ad2sNL,

with N = 1, 2, 3...7 and

L = a, b, c...f

i.e. /dev/ad2s2a
     /dev/ad2s2b
     etc.
     /dev/ad2s1a
     /dev/ad2s1b
     etc.

?

Absent any luck with the above, I'd post to one of the freebsd mailing
lists or newsgroups.
Subject: Re: Mounting a linux (ext2fs) partition under FreeBSD
From: tseven-ga on 10 Aug 2004 05:17 PDT
 
Yes, that is what I did. Yes /mnt exists and is chmod'd to 777.
Thank you for taking time to reply and sugest an alternative. :)
Subject: Re: Mounting a linux (ext2fs) partition under FreeBSD
From: cscguy-ga on 22 Sep 2004 10:28 PDT
 
ext2 should be already compiled into the 5.2.1 kernel, and if it isn't
it should still be a module so that really should be an issue.

mkdir /linux
mkdir /linux2
mount -t ext2 /dev/ad2s1 /linux
mount -t ext2 /dev/ad2s2 /linux2
you apparently also have another linux partition on /dev/ad2s1
Subject: Re: Mounting a linux (ext2fs) partition under FreeBSD
From: tseven-ga on 22 Sep 2004 11:20 PDT
 
Thanks for the coments. My hosting provider gave up and ended up
sending my the hdd. I've since grabbed the files needed.

Thanks for the help!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy