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

Re: mount bsd partition



On Mon, Dec 01, 2003 at 01:43:11PM +0100, Filip Hroch wrote:
> 
> Hi All,
> 
> I'm newbie in BSD and trying to mount of FreeBSD partition (by FreeBSD
> 5.1 instaler, slice editor) under unstable debian/linux and
> 2.6.0-test[5,9,11] kernel. The slices are detected as:
> 
>  hda: hda1 hda2 hda3 hda4
>  hda1: <bsd: hda5 hda6 hda7 >
> 
> and this mount command fails:
> 
> mount -t ufs -o ro,ufstype=44bsd  /dev/hda5 /mnt
> mount: wrong fs type, bad option, bad superblock on /dev/hda5,
>        or too many mounted file systems
> 
> with record in dmesg:
> ufs_read_super: bad magic number
> 
> It seems to be problem of different filesystem format. This is
> important for me, I need it to transfer data between debian/linux and
> debian/freebsd and a possible opposite way is closed. I'm using xfs
> filesystem for my home directory. 

You're probably right. I think you have a UFS2 filesystem, which Linux
won't understand. IIRC, 5.1 uses UFS2 by default now. There's an option
to toggle that in the slice editor when you install FreeBSD 5. I think
it was default UFS1 in 5.0, and changed in 5.1.

> Second question.  I've a working installation of FreeBSD 5.1. How do I
> install the Debian/FreeBSD? The install manuall reccomends use of
> crosshurd package (it's useless for me, I cannot mount any BSD
> partition) or a second way with switch script, it doesn't work, it
> needs the non-root partition unmounted but it use the utilities from
> the /usr/*bin/ directory.

I think Robert wrote the switch script under the assumption that /usr
wasn't a separate partition.

One approach you could try, and it might work:

1. Create a Debian chroot under FreeBSD. Best way is to run debootstrap
   on a Debian box, and tar that up. Add the cross-hurd package to it.
2. Load the linux emulation module. (kldload linux)
3. Unpack the Debian/linux tarball, and chroot into it. You'll need to
   use a command that looks kind of like chroot /debian /bin/bash.
4. Run the cross-hurd.
5. The fun part: look at the switch script, and figure out how to
   manually swap you new freebsd-i386 chroot with your root directory.

Alternatively, you can just reinstall FreeBSD, and this time use UFS1 so
you can mount the filesystem from Linux. You might also want to make one
large partition, rather than create a /usr, since the primitive scripts
we have don't really understand that.  This is probably a bit less
complicated than what I describe above. It is less educational,
however... ;-)

> The debian/linux is my production system so I can experiment with this
> only very carefully, but the debian/FreeBSD is experimental for my and
> I can do with this everythink.

I don't really recommend dual-booting a production system with something
as experimental as freebsd-i386. But that's up to you.

	---Nathan



Reply to: