public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Andreas Jellinghaus <aj@dungeon.inka.de>
Cc: The development of BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: how does grub exactly work?
Date: Fri, 25 Sep 2009 15:48:48 +0200	[thread overview]
Message-ID: <4ABCCA40.3020501@gmail.com> (raw)
In-Reply-To: <200909251049.18109.aj@dungeon.inka.de>

Andreas Jellinghaus wrote:
> Hi Edward,
>   

Hello.

> I saw your mail on btrfs ml with the grub patches and the notes
> how to deal with btrfs.
>
> can you explain how grub and btrfs work exactly?
> I read the grub manual at
> http://www.gnu.org/software/grub/manual/html_node/Bootstrap-
> tricks.html#Bootstrap-tricks
>
> so I wonder: does btrfs provide a "boot loader area" similar
> to ffs and reiserfs, where grub places the stage 1.5 code
> and stage 1 can read it?
>
>   

Yes.

> or does grub find out the sectors of the stage 1.5 file and
> put the list of those into the stage 1 file (first sector address
> of stage 1.5 file) and stage 1.5 first sector (list of all
> other sectors)?
>   

Grub doesn't make the blocklist for stage1_5

Optionally grub makes the blocklist for stage2 (in particular
when stage1.5 can not be embedded for some reasons).

Note, that it is important to embed and use btrfs_stage1_5.
First, because btrfs has defragmentator, which can make the
blocklist out of date (so that you'll need to reinstall grub).
Second, I am not sure, if the blocklist will be composed
correctly in the case when stage2 locates in btrfs volume
(I didn't look at the blocklist specification: it can happen that
grub installer makes an assumption that all sectors of stage2
locate on the same device).

> and what would be the proper way to make boot from a raid1 device?
> so that if one disk fails the other can boot?
> device (hd0) /dev/sda
> root (hd0,X) 
> setup (hd0)
>
> device (hd0) /dev/sdb
> root (hd0,X)
> setup (hd0)
>   

Perhaps, it will work. But officially grub doesn't
understand software raid, and I am not familiar
with raid1 specifications, so...  ;)

> if data is written to mbr only and the sectors between mbr and
> the first partition, this could work. but if data is written to
> mbr and to btrfs (either a "boot loader area" or changes to the
> stage 1.5 file), then that data can only contain the valid block
> lists for one of the two hard disks - which shouldn't be a problem
> if drives are the same and have 100% the same geometry and partitioning.
>
> so I wonder, and it would be great if thise fine details would be
> documented for btrfs somewhere, as there is very little information
> about them (the situation isn't better with other filesystems either).
>
> thanks for your help!
>
> Regards, Andreas
>
>   


           reply	other threads:[~2009-09-25 13:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200909251049.18109.aj@dungeon.inka.de>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ABCCA40.3020501@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=aj@dungeon.inka.de \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox