Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* grub/grub2 boot into btrfs raid root and with no initrd
@ 2013-05-03 20:42 Martin
  2013-05-03 20:45 ` Harald Glatt
  0 siblings, 1 reply; 2+ messages in thread
From: Martin @ 2013-05-03 20:42 UTC (permalink / raw)
  To: linux-btrfs

I've made a few attempts to boot into a root filesystem created using:

mkfs.btrfs -d raid1 -m raid1 -L btrfs_root_3 /dev/sda3 /dev/sdb3

Both grub and grub2 pick up a kernel image fine from an ext4 /boot on
/dev/sda1 for exaample, but then fail to find or assemble the btrfs root.

Setting up an initrd and grub operates fine for the btrfs raid.


What is the special magic to do this without the need for an initrd?

Is the comment/patch below from last year languishing unknown? Or is
there some problem with that kernel approach?


Thanks,
Martin


See:

http://forums.gentoo.org/viewtopic-t-923554-start-0.html


Below is my patch, which is working fine for me with 3.8.2.
Code:

$ cat /etc/portage/patches/sys-kernel/gentoo-sources/earlydevtmpfs.patch
--- init/do_mounts.c.orig   2013-03-24 20:49:53.446971127 +0100
+++ init/do_mounts.c   2013-03-24 20:51:46.408237541 +0100
@@ -529,6 +529,7 @@
    create_dev("/dev/root", ROOT_DEV);
    if (saved_root_name[0]) {
       create_dev(saved_root_name, ROOT_DEV);
+      devtmpfs_mount("dev");
       mount_block_root(saved_root_name, root_mountflags);
    } else {
       create_dev("/dev/root", ROOT_DEV);



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: grub/grub2 boot into btrfs raid root and with no initrd
  2013-05-03 20:42 grub/grub2 boot into btrfs raid root and with no initrd Martin
@ 2013-05-03 20:45 ` Harald Glatt
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Glatt @ 2013-05-03 20:45 UTC (permalink / raw)
  To: Martin; +Cc: linux-btrfs

On Fri, May 3, 2013 at 10:42 PM, Martin <m_btrfs@ml1.co.uk> wrote:
> I've made a few attempts to boot into a root filesystem created using:
>
> mkfs.btrfs -d raid1 -m raid1 -L btrfs_root_3 /dev/sda3 /dev/sdb3
>
> Both grub and grub2 pick up a kernel image fine from an ext4 /boot on
> /dev/sda1 for exaample, but then fail to find or assemble the btrfs root.
>
> Setting up an initrd and grub operates fine for the btrfs raid.
>
>
> What is the special magic to do this without the need for an initrd?
>
> Is the comment/patch below from last year languishing unknown? Or is
> there some problem with that kernel approach?
>
>
> Thanks,
> Martin
>
>
> See:
>
> http://forums.gentoo.org/viewtopic-t-923554-start-0.html
>
>
> Below is my patch, which is working fine for me with 3.8.2.
> Code:
>
> $ cat /etc/portage/patches/sys-kernel/gentoo-sources/earlydevtmpfs.patch
> --- init/do_mounts.c.orig   2013-03-24 20:49:53.446971127 +0100
> +++ init/do_mounts.c   2013-03-24 20:51:46.408237541 +0100
> @@ -529,6 +529,7 @@
>     create_dev("/dev/root", ROOT_DEV);
>     if (saved_root_name[0]) {
>        create_dev(saved_root_name, ROOT_DEV);
> +      devtmpfs_mount("dev");
>        mount_block_root(saved_root_name, root_mountflags);
>     } else {
>        create_dev("/dev/root", ROOT_DEV);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

The initrd has to run btrfs-scan so that btrfs can find the other
devices that have btrfs on them. Alternatively you can give all
involved devices in the fstab and kernel command line with
device=/dev/name

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-03 20:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-03 20:42 grub/grub2 boot into btrfs raid root and with no initrd Martin
2013-05-03 20:45 ` Harald Glatt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox