LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-14-2024, 01:24 PM   #1
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Rep: Reputation: 11
grub-install: error: unknown filesystem


Hi people,

This problem doesn't seem to duplicate other threads, as there's no "grub-rescue" option. Perhaps I'll need to provide more details, but it went like this (LFS-SysV 11.2):

(lfs chroot) root:/sources# grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: unknown filesystem

I'd run df -h and confirmed /dev/sda1 was mounted at /boot (it's ext4)

The GPT partitions are:
/dev/sda1 212M /boot ext4
/dev/sda2 1M bios_boot
/dev/sda3 16G swap
/dev/sda4 40G /root ext4

The machine is a ThinkPad X200, host dist is ArchLinux.

I've left the machine untouched at that point. Can anyone suggest how I can rescue 3 days careful work ?!

Thanks anyhow.

Last edited by Don Pedro; 01-14-2024 at 01:45 PM.
 
Old 01-14-2024, 01:49 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Is /dev/ mounted on the client ( in the chroot )?
 
Old 01-14-2024, 03:42 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
This may be the problem: https://askubuntu.com/questions/8956...own-filesystem
 
Old 01-14-2024, 09:34 PM   #4
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
Thanks to Keith Hedger fo your reply. Yes, when I did df -h, dev is mounted on /dev.

(lfs chroot) root:/sources/Linux-5.19.23 df -h
/dev/sda4 ... /
/dev/sda1 ... /boot
dev ... /dev
tmpfs ... /run

I note that I am still in the Linux-5.19.23 directory, from compiling the kernel. Might this be a mistake? NB. I changed down to /sources before running the grub-install command.
 
Old 01-14-2024, 09:48 PM   #5
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
And thanks to colorpurple21859 for you response. I will chase that link, which looks 'not-dissimilar' to some other posts in Ubuntu forums I investigated, but without the 'grub-rescue' element. I used cfdisk to partition, not gparted.

I will try the "tune2fs -O ^metadata_csum_seed /dev/sda1" solution, and see what happens.

A thought: I have previously made a successful LFS-11.2 install on the X200, but on that occasion used an msdos partition table. Truth is I'm not knowledgeable enough to know whether that's relevant.

I don't have the 'update-grub' facility installed on my ArchLinux worker. But I'll try grub-probe too.
 
Old 01-14-2024, 09:57 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
I don't have the 'update-grub'
update-grub is equivalent to:
grub-mkconfig -o /boot/grub/grub.cfg
 
Old 01-14-2024, 10:05 PM   #7
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
The tips from the Ubuntu forum haven't taken me anywhere. Here are the results:

(lfs chroot) root:/sources# tune2fs -l /dev/sda1 | grep metadata_csum_seed
Filesystem features: has_journal ext_attr resize_inode dir_index FEATURE_C12 filetype needs_recovery extent 64bit flex_bg metadata_csum_seed sparse_super large_file huge_file dir_nlink extra_isize metadata_csum FEATURE_R16

I'm afraid I can't deduce anything from that output.

(lfs chroot) root:/sources# grub-probe --target=fs --device /dev/sda1
grub-probe: error: unknown filesystem.
(lfs chroot) root:/sources# tune2fs -O ^metadata_csum_seed /dev/sda1
tune2fs 1.46.5 (30-Dec-2021)
tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1
Couldn't find valid filesystem superblock.

Perhaps I might try a 'pacman -S grub-install'
 
Old 01-14-2024, 10:12 PM   #8
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
Thanks colorpurple21859, I ran that familiar command, and got this:

(lfs chroot) root:/sources# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.19.2-lfs-11.2
/usr/sbin/grub-probe: error: unknown filesystem.
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

So ... I'll press ahead, complete the configuration and see if she boots. Thanks for your help, and we'll see if I get to put a SOLVED sticker on this thread.
 
Old 01-15-2024, 12:20 AM   #9
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
All seemed to go well in completing the installation, but sadly, it won't boot. Grub says

error: unknown filesystem
Press any key ...

I wonder just what filesystem could be such a surprise. Perhaps I'll stick with the (older) install that did work, albeit with issues. I'll post questions about them separately.

Thanks to all. Sorry I can't clean up the thread. I'll click 'solved' if requested, even if it will be a bit of a fib.
 
Old 01-15-2024, 12:39 AM   #10
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
Perhaps I'll just add that the X200 in question is one of those Ministry Of Freedom machines, and there are a lot of systems it won't boot! Most recently I tried OpenBSD, FreeBSD -- all to no avail.

Anyway, thanks for the responses and advice. Maybe my skillset isn't up to fully benefiting.

Don Pedro
 
Old 01-15-2024, 05:12 AM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Sda4 may be the problem or need a newer version of tune2fs or newer version of grub.

Last edited by colorpurple21859; 01-15-2024 at 05:31 AM.
 
Old 01-15-2024, 08:23 AM   #12
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: LinuxfromScratch, OpenSuse, Slackware
Posts: 107

Rep: Reputation: Disabled
That command has to be run on an *unmounted* filesystem to remove the feature and enable grub to recognize the filesystem (back in the day i remember it was XFS that was always having this problem of new features not being recognized by grub).

I don't know if new grub (2.12 in current LFS) supports ext4 filesystems with "metadata_csum_seed" -- I would guess yes.

Update: I confirmed on my own system grub 2.12 supports the new ext4 default filesystem layout.

Last edited by bryan_S; 01-15-2024 at 02:22 PM.
 
Old 01-16-2024, 01:01 PM   #13
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
Thanks bryan_S

Archlinux, my host system, as a rolling release is updated and runs grub 2:2.12-1, with e2fsprogs 1.47.0-1 so I can't get newer than those.

However I note LFS-11.2 is using grub-2.06, as is the latest LFS-12. Surely I'm still running from the Host System at the stage I described? Pray do pardon my confusion if that becomes necessary.

I'm currently having another go at building 11.2, but on an msdos partition table this time. My previous (mostly successful) installation was so based.
 
Old 01-16-2024, 05:36 PM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
I'm currently having another go at building 11.2, but on an msdos partition table this time.
Why are you building 11.2 instead of 12.0? lfs 12.0 still has grub-2.06, However has the E2fsprogs-1.47.0 which would allow you to be able to disable the "metadata_csum_seed" feature. I don't think changing partition table type will help. You probably will have the same problem again. For 11.2 would suggest to bump E2fsprogs to 1.47 and/or grub to 2.12

Last edited by colorpurple21859; 01-16-2024 at 05:38 PM.
 
Old 01-17-2024, 06:34 AM   #15
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
I ran into roadblocks with 12 -- consistent (i.e. repeatable) FAILS, I forget where. Even the prolific 'Kernotex' came unstuck during his 'live' (i.e. non-edited) run at LFS-12. I simply reverted to an msdos PT of 11.2 because that's how I started the 'successful' installation I have -- partially successful, that is. Yes, perhaps it'll be no different, but SOMETHING I did must have been different.

I wish I had, at the start, kept better notes. Worklogs. But I'm often out of my depth with this stuff, and just thought to plunge in and 'give it a go'. I've had a complex experience, with two machines: Thinkpads X200 and X230i -- 11.2 and 11.3 respectively, each installation being machine specific/exclusive.

I'll report back
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub rescue> errors unknown filesystem, unknown commands, no live boot lazymonk Linux - Software 14 04-19-2016 01:51 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
GRUB error: unknown filesystem, grub rescue magnecticfield Linux - Newbie 28 07-30-2013 03:35 AM
GRUB loading. Welcome to GRUB! error: unknown filesystem. Raja Ahmad Nor Asmad Linux - Newbie 1 09-28-2012 07:02 AM
GRUB error: unknown filesystem, grub rescue nnjond Linux - Newbie 4 12-26-2011 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration