linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@fusionio.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: 64KB "boot sector" gap
Date: Mon, 3 Dec 2012 11:08:53 -0500	[thread overview]
Message-ID: <20121203160853.GI30633@shiny> (raw)
In-Reply-To: <B41E960E-A16B-4856-AFFE-FC5C99DDC7D5@colorremedies.com>

On Mon, Dec 03, 2012 at 12:34:06AM -0700, Chris Murphy wrote:
> When creating a btrfs volume with mkfs.btrfs, I'm noticing that the
> first 64KB are completely blank. Is this gap expressly intended for
> installing a boot manager/loader? e.g. GRUB 2 allows installation of
> boot.img + core.img into a btrfs formatted partition, without using
> block lists (the --force flag). It appears to produce a bootable
> system.
> 

Right, I wanted to leave room for bootloaders.  I actually would have
used a larger offset, but the other filesystem mkfs commands don't zero
very far into the drive.  I had to make sure that mkfs.foo would
overwrite the btrfs super, otherwise you might have a stale btrfs
filesystem recognized inside the new filesystem.

> However, the man page says -A, --alloc-start specifies the offset to
> the start of the file system, and that the default is zero. If the
> default is zero, the file system starts immediately, which implies
> those 64KB of zero aren't actually intended for a boot loader.

The alloc start doesn't change the location of the super, just the
preferred location for any blocks we allocate.  The idea was to test
huge drives without having to fill them with data.

-chris

  parent reply	other threads:[~2012-12-03 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03  7:34 64KB "boot sector" gap Chris Murphy
2012-12-03  7:52 ` Rock Lee
2012-12-03  7:54   ` Chris Murphy
2012-12-03 16:08 ` Chris Mason [this message]
2012-12-03 20:01 ` Zach Brown

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=20121203160853.GI30633@shiny \
    --to=chris.mason@fusionio.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /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;
as well as URLs for NNTP newsgroup(s).