Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub2-bhyve fails to boot XFS file system with Centos7 / RHEL7 #8

Open
girgen opened this issue Jan 5, 2017 · 8 comments
Open

grub2-bhyve fails to boot XFS file system with Centos7 / RHEL7 #8

girgen opened this issue Jan 5, 2017 · 8 comments

Comments

@girgen
Copy link

girgen commented Jan 5, 2017

Hi,

Downloaded CentOS-7-x86_64-Everything-1611.iso, and also rhel-server-7.3-x86_64-dvd.iso, and tried to install on

  • FreeBSD 11.0-p6 host
  • grub2-bhyve-0.40_1 from ports

After successful installation of the linux host from ISO image, restart the bhyve with GRUB and it fails to read the XFS file system – [see also this forum post (https://forums.freebsd.org/threads/58981/):

grub> ls
(lvm/cl-root) (lvm/cl-swap) (hd0) (hd0,msdos2) (hd0,msdos1) (host) 
grub> ls (lvm/cl-root)/
error: not a correct XFS inode.
...
grub> ls (hd0,msdos2)/
error: unknown filesystem.
grub> ls (hd0,msdos1)/
error: not a correct XFS inode.
...

I tried all options for standard partition, btreefs, LVM, etc with the latest Centos and RHEL7 ISO:s. There is no alternative that works, they all give the same problem.

$ cat device-cd.map 
(hd0) /dev/zvol/tank/bhyves/rhel/disk
(cd0) /home/girgen/rhel-server-7.3-x86_64-dvd.iso
$ cat grub-cd.in 
linux  (cd0)/isolinux/vmlinuz
initrd  (cd0)/isolinux/initrd.img 
boot
$ cat rhel-cd.sh 
#! /bin/sh

grub-bhyve -m device-cd.map -r cd0 -M 16384 rhel < grub-cd.in 
bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \
	-s 3:0,virtio-blk,/dev/zvol/tank/bhyves/rhel/disk \
	-s 4:0,ahci-cd,/home/girgen/rhel-server-7.3-x86_64-dvd.iso \
	-l com1,stdio -c 4 -m 16384 rhel
bhyvectl --vm=rhel --destroy

running the script, all is dandy. after installation has finished, restarting grub with grub-bhyve -m device-cd.map -M 16384 rhel gives the problems above.

@benkard
Copy link

benkard commented Feb 26, 2017

This looks related: https://bugzilla.redhat.com/show_bug.cgi?id=1001279

@girgen
Copy link
Author

girgen commented Feb 26, 2017 via email

@jeroen92
Copy link

jeroen92 commented Jul 9, 2017

I also stumbled upon this issue. My first attempt to work around this issue was to re-create the XFS filesystem and disabling CRCs (mkfs.xfs -m crc=0). However, in grub-bhyve this resulted in grub either throwing the same inode errors, or magic number errors. Then I decided to ditch XFS and went with ext4, which works solid, at least in the grub-bhyve part.

@jjurkus
Copy link

jjurkus commented Sep 8, 2017

This should be fixed in grub 2.02, so maybe this version can be imported?

@grehan-freebsd
Copy link
Owner

It could, but I suspect it's a fair amount of work. I had an preliminary attempt at pulling in just the XFS changes, but the surrounding 2.02 changes were big enough that it is probably easier to move forward to 2.02. Still a big job though.

@anteract
Copy link

Since XFS isn't going away, is anyone working on making this work yet? Any chance that we can continue using Centos post XFS?

@grehan-freebsd
Copy link
Owner

I'm not working on it. As above, it's a big job.

For Centos, using UEFI as the bootloader works, and perhaps selecting EXT4 for the filesystem (if that's possible; I've not tried it).

@jpiper
Copy link

jpiper commented Aug 25, 2020

I've had to build my own VM using Hashicorp packer with a kickstart script, and then ensuring that the boot partition is ext4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants