HOWTO: Install FreeBSD8.2 on Laptop when Firewire and ACPI blocks normal install disc

I've been breaking my head on this last day, Since my laptop (Sony Vaio VGN-NR31E) had some issues with installing FreeBSD 8.2 I came by this method after normal install CD did not work (The laptop sees it as a empty disc, while other computers sees it as a FreeBSD Install Disc.)

After getting the USB Image I came further except the AMD64 version stops on
Code:
md0: Preloaded image (mfsroot)
When I took the i386 I got my joy, after having continues restarts with ACPI enabled, I've disabled ACPI from the menu, then it just kernel panics on FireWire. So I decided to try a kernel where the ACPI and FireWire is disabled by default.

Now I do not know if there was a how to on this, (I could not find much about it). It is a quick and a dirty way to get your installer working.

Note: This guide removes the portage from the USB Image, so you can only use Network Installation. (unless you compile the kernel only dedicated to your machine.)

Tested with FreeBSD 8.2

Things you need:
- USB PenDrive, Prefered minimal a 4GB
- The USB Image of FreeBSD 8.2
- A Computer With USB 2 Support running FreeBSD 8.2 OR a Virtual Machine which can connect USB devices to Guest OS, running FreeBSD 8.2

The Guide:
Grab the USB image file from FreeBSD (8.2 i386, As AMD64 makes laptop hang on "md0: Preloaded Image </boot/mfsboot>" for some reason, Have to figure this one out yet!)
Be sure to have access to a FreeBSD 8.2 System (arch can be AMD64 or i386 but be sure it have all the src's!) It can be on a Virtual Machine:
but the Virtual Machine should be able to give the guest OS direct access to USB. (VMware supports this).
Follow the instructions to extract the USB image to a USB PenDrive
Go to the FreeBSD system and do the following:

[cmd=]# mkdir -p /kernels/i386[/cmd]

Download my kernel config, and place it in /kernels/i386 with the name USBKERNEL.
After you have done this step link the kernel to the location /usr/src/sys/i386/conf/USBKERNEL.

[cmd=]# ln -s /kernels/i386/USBKERNEL /usr/src/sys/i386/conf/USBKERNEL[/cmd]

If you want to manually edit the kernel config, Follow these steps:

[cmd=]# cp /usr/src/sys/i386/conf/GENERIC /kernels/i386/USBKERNEL[/cmd]
[cmd=]# ln -s /kernels/i386/USBKERNEL /usr/src/sys/i386/conf/USBKERNEL[/cmd]

Edit the kernel config with your favorite editor, in this case I take nano.

[cmd=]# nano /kernels/i386/USBKERNEL[/cmd]

Then comment out with a hashtag: # the following lines:

Code:
acpi

(These few I have disabled because it is not needed on this laptop):
Code:
fdc
aurt
ppc
ppbus
lpt
plip
ppi

continuing the list which must be disabled anyway to make FreeBSD boot:

Code:
ohci # since the laptop seems not using ohci but ehci for usb.
firewire
sbp
fwe
fwip
dcons
dcons_crom

Once done, double check, nothing forgotten?

If you have not done extracting the USB Image to any usb storage device, please do so!

Once you have that done. Mount the usb device.
(Be sure to check dmesg where the mount is located. Also be sure about the partition you have to mount! in my case:)

[cmd=]# mount /dev/da1a /mnt[/cmd]

Once mounted, we're going to clean 2 things up, the portage and the kernel.
Why do we remove the portage? Since the new kernel will be a bit larger in size, we need the space, and since there's an option for FTP installation, we'll use this option.

Now we're going to compile the kernel:

[cmd=]# cd /usr/src[/cmd]
[cmd=]# make buildworld buildkernel installkernel installworld TARGET=i386 TARGET_ARCH=i386 KERNCONF=USBKERNEL DESTDIR=/mnt[/cmd]

Lay back, watch a movie, play a game, Because this can take a few minutes.

After it is done
Unmount

[cmd=]# umount /mnt[/cmd]

Put it into the laptop, and boot it up. (No need to choose "NO ACPI", since we disabled it already!)

Install it like you are used to, BUT DO NOT, I REPEAT: DO NOT RESTART WHEN YOU ARE FINISHED!
Since it will use the GENERIC kernel, the support for ACPI and Firewire is enabled.

When you have installed everything you needed, also the SRC, and a text editor. Go to your Emergency Shell.
Compile a new kernel with at least the options turned off I gave earlier.

Have fun.

My kernel config: http://pastebin.com/zBwWBeig

This might work on other laptops where it kernel-panics on FireWire.
You can also try to use this guide as a basic trying to solve other problems.

Any other success stories or comments are welcome.
 
Back
Top