Help - Search - Members - Calendar
Full Version: HOWTO: Mount old Linux drive after FreeBSD upgrade
The Planet Forums > Operating Systems > BSD > BSD HOWTOs
crmi
The FreeBSD kernels that are coming with the new EV1 FreeBSD image do not seem to have EXT2FS support turned on by default, therefore in most cases it is neccesary to rebuild the kernel before you are able to mount your old Red Hat drive which EV1 has added as a secondary into your machine (if you ordered the FreeBSD upgrade).

It is a fairly straightforward procedure to do so.

First, login as a wheel account and SU to root. Then, follow the steps below:

# cd /usr/src/sys/i386/conf
# cp GENERIC EXTCOMPAT

(EXTCOMPAT is simply a name I picked for the new kernel configuration, you may use whatever you are comfortable with)

# pico EXTCOMPAT

Add the following line to the EXTCOMPAT file:

options EXT2FS


Save and exit pico. Next, rebuild the kernel as follows:

# cd /usr/src
# make buildkernel KERNCONF=EXTCOMPAT
# make installkernel KERNCONF=EXTCOMPAT

After both these commands have completed error free, reboot the system.

You are now able to mount using the following command:

mount -t ext2fs /dev/da2s3 /mountpoint

Where /dev/da2s3 is the name of your old HD (if you are unsure what this is, run /stand/sysinstall to find out) and /mountpoint is the name of the directory to wish to mount it in. Be sure to create it first.

Hope this was helpful to at least one person out there!
mehmet
great, it helped me a lot to have my secondary harddrive mounted, thanks a lot.
Eric
Instead of reconfiguring the kernel to take the ext2 drive is there a way of converting the drive to ext3.
There is no data on my drive so it does not matter if the conversion wipes it.
As i understand ext3 is better and i would rather convert it now while it is empty.
jbyers
QUOTE (Eric)
Instead of reconfiguring the kernel to take the ext2 drive is there a way of converting the drive to ext3.
There is no data on my drive so it does not matter if the conversion wipes it.
As i understand ext3 is better and i would rather convert it now while it is empty.


You could convert it to ext2 with tune2fs under linux and mount it with ext2 support in BSD; Then, add the ext3 journal back when booting to linux

Any other ideas?

There's not enough activity here in the BSD forums ....icon_sad.gif
aussie
And the most important thing before any of the above happens would be to backup the existing kernel before doing anything. You dont want an unbootable kernel and no way to boot back into the box now do you?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.