Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Frank Kingswood <frank@kingswood-consulting.co.uk>
To: Saint Germain <saintger@gmail.com>
Cc: linux-btrfs@vger.kernel.org, Chris Murphy <lists@colorremedies.com>
Subject: Re: BTRFS partitioning scheme (was BTRFS with RAID1 cannot boot when removing drive)
Date: Thu, 13 Feb 2014 08:50:49 +0000	[thread overview]
Message-ID: <52FC8769.9030405@kingswood-consulting.co.uk> (raw)
In-Reply-To: <CAJbEPe4FFBemxf289aRn8M2DKH6sZYVi=fpST8Jp-fd6_ot0mQ@mail.gmail.com>

On 12/02/14 17:13, Saint Germain wrote:
> Ok based on your advices, here is what I have done so far to use UEFI
> (remeber that the objective is to have a clean and simple BTRFS RAID1
> install).
>
> A) I start first with only one drive, I have gone with the following
> partition scheme (Debian wheezy, kernel 3.12, grub 2.00, GPT partition
> with parted):
> sda1 = 1MiB BIOS Boot partition (no FS, "set 1 bios_grub on" with
> parted to set the type)
> sda2 = 550 MiB EFI System Partition (FAT32, "toggle 2 boot" with
> parted to set the type),  mounted on /boot/efi

I'm curious, why so big? There's only one file of about 100kb there, and 
I was considering shrinking mine to the minimum possible (which seems to 
be about 33 MB).

> sda3 = 1 TiB root partition (BTRFS), mounted on /
> sda4 = 6 GiB swap partition
> (that way I should be able to be compatible with both CSM or UEFI)
>
> B) normal Debian installation on sdas, activate the CSM on the
> motherboard and reboot.
>
> C) apt-get install grub-efi-amd64 and grub-install /dev/sda
>
> And the problems begin:
> 1) grub-install doesn't give any error but using the --debug I can see
> that it is not using EFI.
> 2) Ok I force with grub-install --target=x86_64-efi
> --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
> /dev/sda
> 3) This time something is generated in /boot/efi: /boot/efi/EFI/grub/grubx64.efi
> 4) Copy the file /boot/efi/EFI/grub/grubx64.efi to
> /boot/efi/EFI/boot/bootx64.efi

                 ^^^^ is EFI/boot/ correct here?

If you're lucky then your BIOS will tell what path it will try to read 
for the boot code. For me that is /EFI/debian/grubx64.efi.

> 5) Reboot and disable the CSM on the motherboard
> 6) No boot possible, I always go directly to the UEFI-BIOS
>
> I am currently stuck there. I read a lot of conflicting advises which
> doesn't work:
>    - use "modprobe efivars" and efibootmgr: not possible because I have
> not booted in EFI (chicken-egg problem)

Not exactly. Boot in EFI mode into your favourite installer rescue mode, 
then chroot into the target filesystem and run efibootmgr there.

Frank


  parent reply	other threads:[~2014-02-13  8:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 17:02 BTRFS partitioning scheme (was BTRFS with RAID1 cannot boot when removing drive) Saint Germain
2014-02-11 18:15 ` Chris Murphy
2014-02-11 21:27   ` Duncan
2014-02-12 17:13   ` Saint Germain
2014-02-12 17:50     ` Chris Murphy
2014-02-13  8:50     ` Frank Kingswood [this message]
2014-02-13 10:03       ` Saint Germain
2014-02-13 17:43         ` Chris Murphy
2014-02-13 19:37           ` Saint Germain
2014-02-13 17:33       ` Chris Murphy
2014-02-13 18:02         ` Austin S Hemmelgarn
2014-02-13 18:17           ` Chris Murphy
2014-02-21 11:42           ` Frank Kingswood

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=52FC8769.9030405@kingswood-consulting.co.uk \
    --to=frank@kingswood-consulting.co.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=saintger@gmail.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