Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Nov 2007 21:10:10 +0100
From:      Erik Cederstrand <erik@cederstrand.dk>
To:        =?ISO-8859-1?Q?Javier_Mart=EDn_Rueda?= <jmrueda@diatel.upm.es>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Changing the boot device from PXE to hard disk
Message-ID:  <4741EDA2.3030504@cederstrand.dk>
In-Reply-To: <474170F2.4080909@diatel.upm.es>
References:  <474170F2.4080909@diatel.upm.es>

next in thread | previous in thread | raw e-mail | index | archive | help
Javier Martín Rueda wrote:
> I have set up a simple unattended installation system for FreeBSD, so
> that I can manually configure a group of computers to boot with PXE,
> and when they boot they will automatically install FreeBSD.
> 
> The final step would be to configure the BIOS to boot from the first 
> hard drive. So far I can do that manually by pressing "Del" when the 
> computer boots and entering the ROM BIOS setup program, but I would
> like to know if it is possible somehow to change the boot device
> priority in the BIOS from FreeBSD?

It's not possible to access the BIOS setting through FreeBSD. What I do
is to set the boot order in BIOS to:

1. hard drive
2. PXE

Before the unattended install, wipe out the MBR. If this is a blank hard
drive, then you're already OK. If the drive contains a previous FreeBSD
install, do:

# sysctl kern.geom.debugflags=16
# dd if=/dev/zero of=/dev/ad0 bs=512 count=1k

as root. This makes the BIOS skip the hard drive on the next boot and
continue to boot via PXE. Make sure your install puts an MBR on the
disk, so the BIOS picks the hard drive after rebooting.

Erik



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4741EDA2.3030504>