Monday, April 6, 2009

Install FreeBSD current on hp2133

Hi,

Last week, I tried to install FreeBSD current on my hp2133. I had some problems to install it so here is how I did it.

First this laptop has no cdrom, so I installed FreeBSD on it with an usbkey. You need to take another laptop with a FreeBSD and checkout the sources :

cd /usr


cvs -danoncvs@anoncvs.fr.freebsd.org:/home/ncvs checkout -P src


After that you have to build the system for the usb key:

make buildworld
make buildkernel KERNCONF="GENERIC"

When the userland and the kernel are compiled you need to prepare the usb disk :

fsdisk -I /dev/da0
fdisk -B /dev/da0
bsdlabel -w /dev/da0s1a auto
bsdlabel -B /dev/da0s1a
newfs /dev/da0s1a
mount /dev/da0s1a /mnt

Now the disk is mounted & you need to install the binaries on it:

make installworld DESTDIR=/mnt
make installkernel DESTDIR=/mnt KERNCONF="GENERIC"
make distrib-dirs DESTDIR=/mnt
make distribution DESTDIR=/mnt
echo /dev/da0s1a / ufs rw 1 1 > /mnt/etc/fstab
echo hostname="myname" > /mnt/rc.conf
cp -fr /usr/src /mnt/usr/.

Now you can boot with the usb key on the hp2133. Warning: during the bootloader you must boot in failsafe mode, because there are an apic problem on current with the laptop...

When you have booted you can log with the root account without password. Now you need to recompile the userland and the kernel but instead installing it on da you can do it on ad (your disk drive) :

make buildworld

make buildkernel KERNCONF="GENERIC"
fsdisk -I /dev/ad0
fdisk -B /dev/ad0
bsdlabel -w /dev/ad0s1a auto
bsdlabel -B /dev/ad0s1a
newfs /dev/ad0s1a
mount /dev/ad0s1a /mnt
make installworld DESTDIR=/mnt
make installkernel DESTDIR=/mnt KERNCONF="GENERIC"
make distrib-dirs DESTDIR=/mnt
make distribution DESTDIR=/mnt
cp /etc/rc.conf /etc/fstab /mnt/etc

Now you can remove your usb key and boot on your hp2133 drive :)

HTH

0 comments: