/boot on a separate partition

Ross Kendall Axe ross at axe.homelinux.net
Tue Jul 19 01:13:40 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luke Dean wrote:
> 
> On Mon, 18 Jul 2005, Ross Kendall Axe wrote:
> 
>> I am currently trying to get to grips with FreeBSD and am trying it out
>> on an old Pentium machine.  However, the machine's BIOS can't seem to
>> read past 504MB, so I want to place the /boot directory in a small 25MB
>> partition at the start of the drive.  Setting up the partition with
>> sysinstall is easy enough, but does anyone have any suggestions of how
>> to diddle the bootloader to accept this configuration?
> 
> All I would expect you have to do is use FDISK to make two partitions,
> remembering to mark the first one as bootable.  Then use disklabel to
> create your slices.  Make a /boot slice on the first partition, then
> make a / slice and a swap slice on the second partition.
> That should be all that's required for what you're trying to do.
> A little over a year ago, I had to split up a drive to solve the same
> problem you're having, but I went the "small /" route instead, so you
> might be running into a problem I didn't have.
> 
> Luke Dean
> 

I created the partitions easily enough when installing the system.  I
created a single slice and, inside that, partition d as my small /boot
partition and partition a as the root.

The problem I'm having is trying to actually boot the system.  On boot,
the output (after the BIOS) looks like this:

error 1 lba 1190783
No /boot/loader

FreeBSD/i386 boot
Default: 0:ad(0,a)/kernel
boot: <short delay...>
No /kernel

FreeBSD/i386 boot
Default: 0:ad(0,a)/kernel
boot:

The 'error 1' is presumably due to my dodgy BIOS, and 'No /boot/loader'
happens because it's looking on the wrong place for the stage 3 loader.
 Undaunted, I type 'ad(0,d)/loader' to load the stage 3 loader.  The
loader appears to load properly, apart from the fact that is displays
the message "can't load 'kernel".  At this point, I type 'boot
kernel/kernel', which successfully loads the kernel and produces a
momentary 'twirling baton'.  The keyboard then resets and the system hangs.

Attempt 2: Change all occurrences of /boot/ in all text files in the
/boot directory to /.  Then, at the stage 3 loader prompt, type 'include
/loader.rc' instead of 'boot /kernel/kernel'.  Again, the kernel appears
to be loaded successfully, and I get the standard boot menu with the
ASCII beastie.  However, the boot hangs as before, with a keyboard reset.

Attempt 3: Try to load the kernel directly from stage 2 by typing
'ad(0.d)/kernel/kernel'.  Fails with a register dump and the message
'BTX halted'.

It's starting to look to me as though the stage 2 bootloader and kernel
both want to be in the /boot directory on partition a.  I'd love to be
proved wrong :-)

I'm using 5.4-RELEASE.

Ross

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC3FO99bR4xmappRARAvntAJ9Li1qQiwaOwWjPVS/rIUpAe/D5HgCgn3+h
dqOa0NtBGzkctnk4B2JvSbE=
=YdAF
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list