Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: BTRFS over LVM remounts read-only
Date: Sun, 12 Jan 2014 04:44:20 +0000 (UTC)	[thread overview]
Message-ID: <pan$44ad6$8e22fa31$f96b5e0f$d62a7be1@cox.net> (raw)
In-Reply-To: 600B31B7-08B2-4A72-B8C3-518A736B9DE5@colorremedies.com

Chris Murphy posted on Sat, 11 Jan 2014 16:03:20 -0700 as excerpted:

> On Jan 11, 2014, at 11:48 AM, Szalma László <dblaci@dblaci.hu> wrote:
> 
>> but the grub itself has to be on a standard bios bootable partition (as
>> far as I know)
> 
> Negative. GRUB2 has support for pretty much everything out there: ZFS,
> Btrfs, LVM, LUKS, md raid 0, 1, 10, 5, 6. It will boot Btrfs multiple
> devices, single, raid1, raid0, and raid10, and zlib or lzo.
> 
> The proper modules are baked into core.img during grub-install which
> determines the requirements for finding grub's root (which is typically
> /boot/grub). Core.img is embedded in the MBR gap (or into grubx64.efi).
> And that core.img is all that's needed to locate /boot/grub/ where even
> more modules can be arbitrarily loaded, as well as grub.cfg. At this
> point the kernel and initramfs could be anywhere, located, and booted.

Correct, but omitting one critical bit, GPT on legacy BIOS, with a BIOS-
reserved partition grub can install its core image into.

Recommended BIOS-reserved partition size is 1-2 MiB and grub can often 
work with as little as 32 KiB, often the gap size if it has to install to 
the gap, so 1-2 MiB should be plenty.  However, in ordered to align 
partitions properly, as my smallest partition, I generally start the BIOS 
reserved partition at 1 MiB and make it 3 MiB in size, so all further 
partitions are 4 MiB aligned.

With a full 3 MiB to work with grub-install can do a pretty fat core.img, 
including a bunch of modules it wouldn't otherwise have room for.  
Actually, looking on /boot, the entire grub/i386-pc subdir with ALL 
modules is only 1886013 bytes according to du, so a full grub core with 
all modules (for i386-pc anyway) builtin should be less than 2 MiB, and 
it shouldn't need the modules installed on /boot at all, tho I'm not sure 
whether it takes advantage of all that room to install everything in the 
core image since the room is available to do so, or only includes what it 
detects it needs, regardless.

Completing my under-1-gig layout is a 124 MiB efi-reserved partition, 
unused ATM but there to prevent a forced re-gdisk in case I need it later 
(leaving further partitions 128 MiB aligned), a 256 MiB /boot, and a 640 
MiB /var/log.  That's the first 1 GiB and all further partitions are 
whole-GiBs in size, leaving all partitions beyond 1 GiB, full-GiB aligned.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


      reply	other threads:[~2014-01-12  4:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11 14:32 BTRFS over LVM remounts read-only MegaBrutal
2014-01-11 15:04 ` Hugo Mills
2014-01-11 17:10   ` MegaBrutal
2014-01-11 17:28     ` Hugo Mills
2014-01-11 18:03     ` Chris Murphy
2014-01-11 18:48     ` Szalma László
2014-01-11 19:16       ` Roman Mamedov
2014-01-11 19:24         ` Szalma László
2014-01-11 23:08         ` Chris Murphy
2014-01-11 23:03       ` Chris Murphy
2014-01-12  4:44         ` Duncan [this message]

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='pan$44ad6$8e22fa31$f96b5e0f$d62a7be1@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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