[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FreeBSD Boot Details
Re: FreeBSD Boot Details
Wed, 13 Jun 2012 13:09:20 -0700
On Tue, Jun 12, 2012 at 8:06 AM, Werner Scheinast <address@hidden> wrote:
> Hi all,
> in the attempt to get a somewhat unusual FreeBSD installation booted by
> GRUB, I got stuck. Before I describe this, I ask a general question and
> would like either an acknowledgement or a correction:
> FreeBSD has its own partition scheme that is used either for the full hard
> disk ("dangerously dedicated") or nested in a primary partition of the MBR
> partitioning scheme. (Let's not consider GPT here.)
> The boot sector in the beginning contains stage 1 of the boot code, then
> comes a "disklabel" without file system that includes some reserved space
> for stage 2 of the boot loader, this is followed by a series of (sub-)
> partitions a,b,d,... whose 'a' has stage 3 of the boot loader as a normal
> file in its file system.
> If you install GRUB here, it wants - it must! - follow the same scheme,
> especially concerning stage 2. If there is no disklabel, GRUB can't be
> My questions:
> Is this correct?
> Can I circumvent this, i.e. install GRUB to work like in Linux?
> I made an experimental installation of FreeBSD in a primary partition
> (slice) ada0s3. This slice contains a "naked" FreeBSD, without
> disklabel and sub-partitions, just a file system directly in ada0s3.
> I have it booted by means of a small dedicated /boot partition ada0s2a.
> Now I copied the /boot branch directly into the local file system,
> installed the GRUB port and wanted to make it bootable itself, without
> ada0s2. But I can't install GRUB:
> /boot# grub-install --root-directory=/boot/grub /dev/ada0s3
grub-install's --root-directory= option is for specifying the root
directory, not the grub directory (it's also being deprecated by the
new --boot-directory option). Since you're not installing grub from a
different root filesystem (like when running from a LiveCD) you don't
need to specify any --root-directory (or --boot-directory) option, and
so you shouldn't. What's causing the error message though is that
you're trying to install grub's boot sector in a partition/slice.
GRUB's boot sector should go in the MBR. So the command you should run
is simply "grub-install /dev/ada0".
> /usr/local/sbin/grub-setup: error: /dev/ada0,3 appears to contain a ufs2
> filesystem which isn't known to reserve space for DOS-style boot.
> Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable
> data is overwritten by grub-setup (--skip-fs-probe disables this check,
> use at your own risk).
> From this error message I derived what I wrote above.
You've completely misunderstood the error message, the error is about
the UFS filesystem, not the BSD disklabel, and is properly solved by
installing grub's boot sector to the MBR (which is where it should go
no matter what disk label you're using).
Jordan Uggla (Jordan_U on irc.freenode.net)
- FreeBSD Boot Details, Werner Scheinast, 2012/06/12
- Re: FreeBSD Boot Details,
Jordan Uggla <=
- Re: FreeBSD Boot Details, Werner Scheinast, 2012/06/14
- Re: FreeBSD Boot Details, Jordan Uggla, 2012/06/15
- Re: FreeBSD Boot Details, Werner Scheinast, 2012/06/17
- Re: FreeBSD Boot Details, Jordan Uggla, 2012/06/18
- Re: FreeBSD Boot Details, Werner Scheinast, 2012/06/20
- Re: FreeBSD Boot Details, Jordan Uggla, 2012/06/20