You are not logged in.

#1 2013-07-29 00:01:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Just reformatted my SSD with 3 partitions.

1) EFI
2) /boot (ext4)
3) / (btrfs)

I copied over my systefrom tars, adjusted the new fstab to use btrfs, I rebuilt my kernel images, and rebuilt grub.cfg in the chroot.  When I reboot, I get:

Welcome to grub!

error: unknown filesystem
Entering rescue mode...
grub rescue>

Per the wiki, there should be no special setup steps to boot to a btrfs root with grub.  When did I f-up?

/etc/fstab

LABEL=arch64    / btrfs defaults,discard,noatime,ssd,compress=lzo 0 0
LABEL=boot    /boot                 ext4  defaults,discard,noatime        0 2

Excuse the short post, typing in a phone.

Last edited by graysky (2013-07-29 01:24:47)

Offline

#2 2013-07-29 00:11:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Are you stuck in grub?  Or does it get through grub and start to boot the kernel and initramfs before dropping you there?

What happens if you specify rootfstype=btrfs?  You otherwise might need to do a wipefs on the filesystem to remove any traces of old filesystem identifiers left behind.


Edit: BTW, that is an impressive first post for typing on your phone!

Last edited by WonderWoofy (2013-07-29 00:12:27)

Offline

#3 2013-07-29 00:14:42

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Grub loads fine but is stuck in rescue mode... almost like it isn't seeing the btrfs partition... if I look in /boot/grub/grub.cfg it has loaded the btrfs module just fine and has correctly identified my root UUID.

...
insmod part_gpt
insmod btrfs
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  bb6f9133-a2ce-4c92-97ab-35cdc3c2d2a9
else
  search --no-floppy --fs-uuid --set=root bb6f9133-a2ce-4c92-97ab-35cdc3c2d2a9

Offline

#4 2013-07-29 00:16:44

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Its just that I'm not familiar with grub, so I guess I'm asking if you are dropped into some kind of a grub rescue mode, or the systemd rescue mode (or the initramfs).

Offline

#5 2013-07-29 00:22:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Yes, it is dropped to a GRUB rescue shell.  I can boot if I manually type the following but WTF?!  Why isn't grub doing this by itself?

grub rescue> set prefix=(hd0,2)/grub
grub rescue> insmod (hd0,2)/grub/x86_64-efi/linux.mod
grub rescue> set root=(hd0,2)
grub rescue> linux /vmlinuz-linux-ck root=/dev/sda3
grub rescue> initrd /initramfs-linux-ck.img
grub rescue> boot

Link to my autogenerated /boot/grub/grub.cfg

Last edited by graysky (2013-07-29 00:28:58)

Offline

#6 2013-07-29 00:41:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Unfortunately, I know very little about grub, so I'm going to have to drop out here.  Maybe you should reinstall grub though... as maybe there is some kind of autodetection that takes place in order for it to know to stick the btrfs drivers in the MBR/bios partition.... that is just a guess though.

Offline

#7 2013-07-29 01:24:30

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

What solved it was nuking my EFi partition and reinstalling it.  Makes no sense to me that simply changing the filesystem format would affect this.  Rrrrrrrr.

Offline

#8 2013-07-29 01:56:55

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

Yeah, that doesn't make any sense to me either. 

I did run into an issue once where gummiboot didn't like my configs being copied from one drive to another.  So I actually have to move the old configs and then write the new ones with the same content by hand.  They even produced the same md5sum... so I know how frusturating some of these UEFI things can be sometimes.  Overall though, I do really like UEFI, even with the quirks.

Offline

#9 2013-07-29 06:43:49

neilzium
Member
Registered: 2011-12-17
Posts: 41

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

just FYI despite some of the documentation, grub can read kernels from btrfs, so a seperate ext4 boot partition is no longer necessary.

Offline

#10 2013-07-29 08:51:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Fresh btrfs root partition cannot boot/unknown filesystem [solved]

I am aware of that from the wiki, but old habits die hard I guess.

Offline

Board footer

Powered by FluxBB