Tuesday, February 26, 2008

Attempts to run FreeBSD 6.3 from HDD (rather than as VM)

Some problems in installing FreeBSD from CD to Philips usb HDD. Seems that FreeBSD only recognises Primary partitions and NOT logical partitions.
So, as my first targetted partition was logical, I had to repartition this drive to get a suitable primary partition.
Thereafter the install went fairly smoothly.
I can't remember whether I tried the Boot Manager or the Standard MBR install (probably standard MBR).
Then I tried to boot to this (as follows):

First I tried to get FreeBSD to boot from the Philips HDD. For this I added to the Ubuntu /boot/grub/menu.lst the following:

title FreeBSD 6.3
root (hdo,5)
kernel /boot/freebsd/loader root=da0a

I then copied the file from FreeBSD (VM) /boot/loader to (Ubuntu) /boot/freebsd/ where the freebsd folder was new.
This actually got the FBSD loader working (know from format of boot messages) but then it stopped saying "cannot load kernel"
So then I saw that the FBSD /boot folder had a "kernel"
So I decided to install ALL of the FBSD /boot directory in the Ubuntu /boot/freebsd.
I did this by tarring and compressing which gave me one file in a compressed form (24 MB went to 10 MB, which meant it could now be easily emailed)
This is a very useful technique and I'm going to write a short howto in the next post so it'll be easier for me to find in months/years to come.
However, even having set up the Ubuntu /boot/freebsd directory EXACTLY as the FBSD /boot folder, I still get the "cannot load kernel" error.
At this stage it looked like I needed to put FreeBSD onto my internal HDD on the Dell, if I was to have any chance of including it in my multiboot menu.

So, repartitioned the 80GB internal HDD leaving a 12 GB partition for FreeBSD.
Installed FBSD, first with Boot Manager option and secondly with Standard MBR.
In both cases, this messed up the Ubuntu MBR I had on this HDD. I had a problem restoring Grub the first time and had to re-install Ubuntu (leaving the /home unformatted).
The second time, however, I found that to do the Grub restore, you MUST type "sudo grub", not just grub. The latter on its own will give misleading results.
I'm going to write another small Howto about this as it too will be useful in furture.
In any event, once the Grub MBR was restored, everything worked fine nd I could get FBSD to boot.
Unfortunately, I still haven't got a WM working as I had a problem when i was trying to install KDE. This is that he top CDROM on the Dell just wouldn't open when I tried to change disks (as instructed by the installer).
However, it seems to be fine now and I'm installing KDE through ports which is probably better as I don't have to go through all that disk-changing crap.

No comments:

Post a Comment