Find the answer to your Linux question:
Results 1 to 5 of 5
I want to mount my FreeBSD SCSI drive on Linux. I have read many HOWTOs but I need someone with experience to show me how to do it. My Distro ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    8

    Question Mounting FreeBSD SCSI drive on Linux problem


    I want to mount my FreeBSD SCSI drive on Linux. I have read many HOWTOs but I need someone with experience to show me how to do it.

    My Distro is: SLACKWARE 10.2
    My Kernel Version is: 2.4.31

    My SCSI drives are sda1, sdb1 and sdc1. This is a multiboot system with XP on sda1, Linux on sdb1 and FreeBSD on sdc1.

    I can mount ntfs no problem. mount -t ntfs /dev/sda1 /mnt/sda1 for example or in fstab the below:

    /dev/sda1 /mnt/sda1 ntfs defaults 0 0

    So I can read the Windows drive. Now I want to read the freeBSD one.

    I have tried to use the command modprobe ufs and that doesn't give an error. Not sure what that does, but load a UFS read module. Do I need to do this with Kernel ver 2.4 or higher? I do it anyway.

    Then I try... mount -r -t ufs -o ufstype=44bsd /dev/sdc1 /mnt/sdc1

    This returns the error... - wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so.

    In Dmesg I have located the FreeBSD drive which reads:

    Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
    Attached scsi disk sdb at scsi1, channel 0, id 2, lun 0
    Attached scsi disk sdc at scsi1, channel 0, id 6, lun 0
    SCSI device sda: 17774160 512-byte hdwr sectors (9100 MB)
    Partition check:
    sda: sda1
    SCSI device sdb: 17774160 512-byte hdwr sectors (9100 MB)
    sdb: sdb1
    SCSI device sdc: 17774160 512-byte hdwr sectors (9100 MB)
    sdc: sdc1
    sdc1: <bsd: sdc5 sdc6 sdc7 sdc8 sdc9 >

    So I tried to replace /dev/sdc1 with sdc5. sdc6. sdc7. sdc8 and sdc9.

    They all return the same error as before.

    Will someone who has experience mounting a FreeBSD drive please help.

  2. #2
    Just Joined!
    Join Date
    Feb 2006
    Posts
    8
    Ok I think I understand the problem, not sure about the solution though.

    FreeBSD 5.x and above, including the new 6.x release, no longer use UFS even though it says UFS on in /etc/fstab of FreeBSD. It uses UFS2.

    Apparently, UFS2 read only support is with linux kernel 2.6.5 and onwards.

    http://ufs-linux.sourceforge.net/

    So it looks like I must find out how to do a 2.4 to 2.6 kernel compiling update.

    I have heard this is very difficult... and not recommended because 2.6 is still beta.

  3. #3
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    The Hot Humid South
    Posts
    602
    Quote Originally Posted by Cpt|Kirk
    and not recommended because 2.6 is still beta.
    Who said that? Not at all!

    First thing you should do is check to see if your distribution has a 2.6 series kernel on the official repositories. I'm pretty sure that ALL major distros now come with a 2.6 somewhere (even if not default).

    Compiling your own kernel can be hard if it's your first time doing it. I'd recommend reading through some tutorials before attempting it, then doing it a few times so you understand what goes into it (you probably want to do this on a test system). An option is going through the Linux Pocket Guide (it can be found at www.tldp.org), which in my opinion was one of the best moves I've ever did concerning Linux. Another consideration is package managing, it's a good idea to get your kernel install into the package manager list.

  4. #4
    Just Joined!
    Join Date
    Feb 2006
    Posts
    8

    Upgrading to 2.6 question.

    My machine is a multiboot for learning XP, Slackware and FreeBSD. It has SCSI drives using the Adaptec SCSI storage controller: Adaptec AHA-7850

    XP SP2 = sda1, Linux Slackware 10.2 = sdb1, FreeBSD 6 = sdb1
    LILO boots of the MBR of sba1
    My current Kernel version is: 2.4.31

    I have everything setup however I have been eager to mount the FreeBSD drive in linux. You can see details of this at http://www.linuxforum.com/forums/ind...owtopic=177601 What I have come to learn is that even though fBSD fstab shows that the file format is UFS, that FreeBSD 5.x and greater no longer uses UFS file formats but UFS2 instead. This is a problem because only Linux Kernel 2.6.5 and greater can recognize UFS2. This appears to be the nature of my problem with mounting that sdc1 drive. So basically I need to upgrade from 2.4 to 2.6. However I can't even compile a 2.4 one properly yet! When trying to compile a 2.4 kernel I have experienced some difficulty. In fact I have never gotten a compile to work for me, and this is something I would like to learn how to do. All along I have been using the Kernel Compile information in the Slackware book here -> http://www.slackbook.org/html/system...KERNEL-COMPILE
    I have also been reading the HOWTO in usr/src/linux
    I have made a backup of the entire contents of my /boot directory
    I have also made a backup of LILO from /etc and the .config from the /usr/src/linux directory
    Between the HOWTO on the 2.4 kernel and the Slackbook I have noticed some variations.

    The commands I use to compile a kernel are:

    *extra items in the HOWTO

    - cd /usr/src/linux
    - make mrproper
    * - make oldconfig
    - make menuconfig
    - make dep
    - make clean
    - make bzImage
    - make modules
    - mv /boot/vmlinuz /boot/vmlinuz.old
    - cat arch/i386/boot/bzImage > /vmlinuz
    - mv /boot/System.map /boot/System.map.old
    - cp System.map /boot/System.map
    - make modules_install
    - make modules

    Now apart from the fact that the HOWTO has me do a make oldconfig before make menuconfig I have noticed that sometimes the bzImage does not get copied to the /boot directory after these commands are run. Maybe my bad, but I mc to copy it over. Then I can change my LILO to reflect the OLDKernel and the NewKernel. I rename the files in /boot so that they reflect LILO. Then I run LILO. I have also been told to run a mkinitrd (i just type in the command mkinitrd).

    The error I get when I boot this NewKernel is a fatal one on startup. It is very similar to the one I get on a 2.4 to 2.6 upgrade below. I use the manual on http://www.linuxforum.com/forums/ind...owtopic=152070 for this 2.4 to 2.6 upgrade.

    2.4 to 2.6

    As a note here I am compiling almost everything, especially SCSI stuff, as onboard and not as a module.

    I extract kernel 2.6.15.4 to /usr/src/linux-2.6.15.4
    - I backup .config for /usr/src/linux
    - I go to the directory /usr/src/linux-2.6.15.4
    - make xconfig
    - Used Compiling 2.6 PDF example
    - make bzImage

    I copy System.map from /usr/src/linux-2.6.15.4 and replace the current System.map in /boot with this one. I think the command for this would be cp /usr/src/linux-2.6.15.4 /boot
    I also make another copy of this file in /boot and name it System.map-2.6.15.4
    My next step is to copy the bzImage from /usr/src/linux-2.6.15.4/arch/i386/boot into /boot
    I rename it bzImage bzImage-2.6.15.4
    I edit LILO to load bzImage-2.6.15.4 and run Lilo with the lilo command

    Now when I start the load the new bzImage on boot through lilo, two penguins appear at the top of the screen. I have no idea why there are two. Everything seems to run through okay until I get the error:

    starting balanced_irq
    Using IPI shortcut mode
    VFS: Cannot open root device "811" or unknown-block(8,17)
    Please append a correct "root=" boot option
    Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,17)

    Now I know on CD2 of Slackware 10.2 there is a 2.6 kernel package there but I have no idea where to even begin with that one, but maybe this is where I should actually be going. Anyway any help in solving this problem would be most appreciated. I pretty much need someone to walk me through this one.

  5. #5
    Just Joined!
    Join Date
    Feb 2006
    Posts
    8
    Finally compiled my first kernel making the update from 2.4 to 2.6

    This is how I did it.

    Download the PDF above.

    Open two Xterms.

    In one go to /usr/src/linux

    make xconfig

    In the other terminal go to /usr/src/linux-2.6.x.x

    make xconfig

    Now try to replicate as much of the /linux xconfig as you can in the /linux-2.6.x.x config as the /linux config is a working config that boots your linux. After you have done this close the usr/src/linux xconfig without saving. With the /linux-2.6.x.x. xconfig open go back to start of it. Now do everything in the PDF in this config.

    SAVE the config and even SAVE again under another name like "MyNewConfig" as a backup.

    Complete kernel compiling operation, fix LILO and reboot.

    If you need to do it again then make sure to 'make mrproper' inside the linux-2.6.x.x. directory to clean out any previous compiling done.

    THIS WILL WORK!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •