unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ada Stevenson <adanskana@gmail.com>
To: Franz Geffke <m@f-a.nz>, guix-devel@gnu.org
Subject: Re: Guix bios installation: Grub error: unknown filesystem
Date: Sun, 21 Apr 2024 06:14:49 +0000	[thread overview]
Message-ID: <c211dde2-89b3-5bfb-2786-31daafb7e1db@gmail.com> (raw)
In-Reply-To: <49d45f8a-6c97-419c-8221-f400f52f886e@app.fastmail.com>

Hi Franz,

On 4/19/24 2:24 PM, Franz Geffke wrote:
> I'm having trouble installing guix in qemu, using a "fresh" guix ISO.
> 
> ```
> building /gnu/store/byjlc85abyjc3fjj9z982677skmda7ib-module-import-compiled.drv...
> building /gnu/store/psw8xn9qpsjjnrqmjrfv0v3jj9fphq5m-module-import-compiled.drv...
> building /gnu/store/a1zcrrcdwhb4wb2g4r0ph8mqclq7f5xn-install-bootloader.scm.drv...
> guix system: error: '/gnu/store/li1ic17hz460vp1sg0cx2dwgw8q7i8pj-grub-2.06/sbin/grub-install --no-floppy --target=i386-pc --boot-directory /mnt/boot /dev/sda' exited with status 1; output follows:
> 
>    Installing for i386-pc platform.
>    /gnu/store/li1ic17hz460vp1sg0cx2dwgw8q7i8pj-grub-2.06/sbin/grub-install: error: unknown filesystem.
> ```
> 
> Here's what I've tried so far:
> 1. The ISO from 2022 https://ftpmirror.gnu.org/gnu/guix/guix-system-install-1.4.0.x86_64-linux.iso: Success
> 2. Generated a new ISO today: Failure
> 
> These are the channels, on the booted ISO:
> 
> ```
> guix describe
>    guix 65e8472
>      repository URL: https://git.savannah.gnu.org/git/guix.git
>      branch: master
>      commit: 65e8472a4b6fc6f66871ba0dad518b7d4c63595e
> ```
> 
> Steps I used to install (1) and (2):
> 
> ```
> parted -s /dev/sda -- mklabel msdos mkpart primary ext4 1MiB 100%
> parted /dev/sda set 1 boot on
> mkfs.ext4 -L my-root /dev/sda1
> mount LABEL=my-root /mnt
> cp /etc/configuration/lightweight-desktop.scm /mnt/etc/config.scm
> # adjust disk, bootloader
> herd start cow-store /mnt
> guix system init /mnt/etc/config.scm /mnt
> ```
> 
> Findings:
> 
> I didn't really dig too deeply yet; Only noticed that this command produces a different result, depending on whether the install succeeds, or not `grub-probe --target=fs --device /dev/sda`
> 
> - Success: `ext2`
> - Failure: `grub-probe: error: unknown filesystem.`
> 
> I also tried using GPT instead of MBR, but it makes no difference.
> 

I've encountered this problem too, and managed to solve it. I'm 85% sure 
you're experiencing the same problem as me, and I've been meaning to 
document it somewhere - its a super obtuse error and it is a showstopper 
when it comes to installing guix.

Basically, there is a compatibility issue regarding the ext4 filesystem 
features that GRUB 2.06 supports and the features that 
`e2fsprogs@1.47.0` enables by default when creating your ext4 
filesystem. When these features are enabled, it changes the structure of 
the filesystem enough that GRUB can't recognise it properly and it fails.

To fix this, you will need to make sure you create your ext4 filesystem 
with the following features:
`mkfs.ext4 /dev/you-partition-here -O 
has_journal,ext_attr,resize_inode,dir_index,filetype,needs_recovery,extent,flex_bg,sparse_super,large_file,huge_file,uninit_bg,dir_nlink,extra_isize`

These are the features that worked for me. I had to do a lot of trial 
and error, and I used `tune2fs -l` to see what features weren't 
supported. The ones I can remember are the metadata_csum features, and 
some other ones (they showed up as FEATURE_X when running `tune2fs` on 
my Guix installation image, so I used a Gparted Live CD to get rid of 
the features that weren't recognised by tune2fs).

This should allow grub to recognise your filesystem during the 
installation process. I think using a later version of grub would fix 
this, but that hasn't happened yet. I think there's a patch to upgrade 
it in `core-updates` somewhere, but I'm not sure.

Anyway, hope this helps!

Warmly,
Ada


  reply	other threads:[~2024-04-21  6:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 14:24 Guix bios installation: Grub error: unknown filesystem Franz Geffke
2024-04-21  6:14 ` Ada Stevenson [this message]
2024-04-21 10:49   ` Franz Geffke
2024-04-22 21:04   ` Attila Lendvai
2024-04-23  5:52     ` Ada Stevenson
2024-05-01 22:06   ` Ludovic Courtès
2024-05-02  5:22     ` adanskana
2024-05-02  8:33       ` Ludovic Courtès
2024-05-02 14:26         ` Efraim Flashner

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c211dde2-89b3-5bfb-2786-31daafb7e1db@gmail.com \
    --to=adanskana@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=m@f-a.nz \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).