help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FreeBSD Boot Details


From: Jordan Uggla
Subject: Re: FreeBSD Boot Details
Date: Fri, 15 Jun 2012 10:51:20 -0700

On Thu, Jun 14, 2012 at 1:47 PM, Werner Scheinast <address@hidden> wrote:
> Yesterday Jordan Uggla wrote:
>
>> 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).
>
> Thanks. During most of my Linux years I used LILO, so I'm not too familiar
> with GRUB.
>
>> > /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).
>>
>> 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).
>
> What you say is partially wrong. Of course, I _can_ install GRUB into the
> MBR, but I do not have to. Of course, this installation works and yields
> no error, just because behind the MBR the whole first cylinder of the HD
> is usually free and offers enough space for the stage 2 code.
> (Sorry, I noticed that GRUB uses the numbering "stage 1", "stage 1.5" and
> "stage 2" instead of 1,2,3, so I must say: ... for the stage 1.5 code.)

http://www.gnu.org/software/grub/manual/grub.html#Images

>
> BUT: The MBR is originally not the place for a boot loader, only for a
> boot manager, because every operating system may have its own particular
> boot loader, that should actually reside locally in the partition: Stage 1
> in the partition's boot sector, the rest ... somewhere else. Stage 1 does
> not know about any file system, but in Linux it can directly access the
> last stage's file via block addressing. In *BSD (or when installed in the

Blocklists pointing to blocks on an active filesystem are unreliable,
and thus should not be used. Most filesystems do not provide an
embedding area for the bootloader and thus for most configurations the
only reliable place to store a boot sector (if you use a boot sector
at all, rather than having your preferred boot manager load grub's
core.img reliably using multiboot), is in the MBR. Thus, grub's boot
sector should always go in the MBR (unless you're installing grub to a
partition containing a filesystem like btrfs, but even in that case I
would recommend installing grub's boot sector to the mbr for
simplicity).

> MBR) it uses a reserved space for the stage 1.5 code that can, in turn,
> read from a file system - and the rest is no problem.
>
> Here was my question: Is this difference between *BSD and Linux hard-coded
> in GRUB or can I make GRUB behave like in Linux, without using stage 1.5?

What difference do you think there is between grub installed from/for
*BSD and grub installed from/for GNU/Linux?

> This would give me a flexibility that FreeBSD's own boot loader does not
> have.
>
> Best regards,
> Werner
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub



reply via email to

[Prev in Thread] Current Thread [Next in Thread]