#[solved] [grub] `unknown filesystem` trying to boot from btrfs filesystem

342 messages · Page 1 of 1 (latest)

carmine blade
#

Solution: used /dev/sda instead of /dev/sdb (no explanation, don't use the advice)

Hey so. I just installed Debian, and here's what I did:

  • I merged two physical drives sda and sdb into one volume group with lvm
  • I created two logical volumes, one with btrfs and the other one with swap
  • Once the installer asked about grub, I chose sdb to install to
  • Now it falls into grub's rescue shell with error unknown filesystem
  • For some reason too few commands are available. There's no command boot, normal, lsblk and others which people suggest and use on stackoverflow with this error

Any idea?

#

The first pic is the default grub's options
in the second pic I booted from another OS from usb
in the third pic I mounted the drive to see what's up, it mounted and has all the needed files

#

Oh, I omitted important fact. Doing ls (hd0) (and for all three other things) fails with unknown filesystem too

#

I suspect that it's due to the fact that I installed it on sdb and the default prefix is (hd0,msdos1) which I guess means sda

agile perch
#

Are you booted into the btrfs system when you do the grub-mkconfig?

carmine blade
#

Should I try that command?

#

or what, sorry

agile perch
#

How do you make mkconfig? Is that the update-grub command?

carmine blade
#

I never successfully booted into the system yet

agile perch
#

Grub needs a configuration file

#

Chroot into the root and run update-grub

#

I assume your root is the btrfs partition

carmine blade
#

it is

agile perch
#

I believe update-grub will run the configuration generation

carmine blade
#

there's no chroot

agile perch
#

Once that is done show us ls /boot and ls /boot/grub

carmine blade
#

and there's no grub-update either

#

there's no even command cd

agile perch
carmine blade
#

ah one sec then

agile perch
#

You’ll need to look up a guide on how to chroot into your Os, I only chrooted into arch before

carmine blade
#

but why do you think the config file is the problem?

#

shouldn't it have been created on install?

agile perch
#

I don’t know if it is an issue or the only issue, just that it might be an issue, on top of that I’d try reinstalling the kernel

carmine blade
#

that doesn't sound right at all

#

It's a 100% freshly installed debian

agile perch
#

I mean it’s either a Debian issue or a grub issue

carmine blade
#

I'm thinking if installing grub on the second drive was a bad idea, but other than that?

agile perch
#

Is your grub on fat32?

carmine blade
#

no, it's on btrfs too

agile perch
#

Then the grub installed failed

#

You need it to be on fat32

#

Show lsblk -f

carmine blade
agile perch
#

Which one is your EFI partition for grub?

carmine blade
#

There's no partition for grub

agile perch
carmine blade
#

what?

agile perch
#

You need a bootloader for your OS, it should be fat32 and on its own partition

carmine blade
#

okay... I mean, right. That's useful info. I wish it was written somewhere

#

But also, the installer suggested to use physical drives, not partitions

#

as if it didn't care about partitions

agile perch
#

It only needs to be like 300MiB

carmine blade
#

so I wans't really choosing a partition

#

I'm not exactly getting this now

#

if I create a separate partition, it will still most likely suggest a physical drive to choose

#

btw can I fix it by creating a partition now and moving /boot there?

#

or do I have to reinstall it all?

agile perch
#

/boot will be the mount point to be clear

#

The partition will be like /dev/sda3 or whatever

carmine blade
#

devices are under lvm

#

so I guess i have to shrink my logical volume first

agile perch
#

I know nothing about lvm beyond what it means

carmine blade
#

I merged the drives into one volume group

agile perch
#

Never used it

#

Sounds like shrinking it might be the right thing to do

carmine blade
agile perch
#

Sorry

#

Edited

#

Watching a film and typing from my phone

carmine blade
#

okay so I did some crazy stuff

#

I have no clue if it's gonna work but here's what I did

#

I shrank my main volume

#

created a new 300mb volume

#

made it fat

#

copied /boot into /boot-1 (for backup)

#

deleted /boot

#

mounted the volume as /boot

#

copied the content of /boot-1 into /boot

#

I have zero idea if it's gonna work and if what I did even remotely makes sense

#

I feel like it shouldn't work

#

okay this is very discouraging

#

nothing changed

#

like... still the same rescue shell, still the same output for ls

agile perch
#

You need to install grub to /boot assuming that’s where the efi is mounted

#

Only the efi should be mounted to /boot

#

Then you should reinstall the kernel

#

And then you should do update-grub

carmine blade
#

I mounted the FAT volume to /boot

#

and just copied what was in boot before there

#
mv boot boot-1
mount /dev/data/lvol0 /boot
cd boot-1
cp -r * /boot
agile perch
#

I dunno about some of that or why you’d need anything that was in boot

#

But maybe it’ll work

#

Ls /boot and ls /boot/grub

carmine blade
#

I mean

#

I had boot as a folder before

#

you said I shouldn't have it on btrfs

#

so I made it fat

#

I have no idea if I did it correctly, though

agile perch
#

I think on debian you can just wipe /boot and then do grub-install then reinstall the kernel and then update-grub?

#

I think you'll need to do that because it likely relies on UUID

#

but either way let me know if you've managed to boot or not

#

for grub install you might have to put the /dev/<drive in> by the looks of it like this:
grub-install /dev/sda

#

replace sda with your EFI partition

#

then do this:
grub-mkconfig > /boot/grub/grub.cfg

#

making sure that you reinstalled your kernel

hidden plume
#

the EFI partition has to be a plain partition formatted to FAT32. that's the only format that a motherboard's UEFI will be able to read

hidden plume
#

/boot (where the kernel images reside) can be on anything that grub supports, though. that includes LVM.

carmine blade
hidden plume
#

they can be

carmine blade
hidden plume
#

grub-install probably needs the hard drive to already have a correctly formatted partition to put grub on

carmine blade
#

I have /boot formatted as fat

hidden plume
#

the command you need would be grub-install --target=x86_64-efi --efi-directory=boot --bootloader-id=GRUB

#

make sure to cd / first

carmine blade
#

x86_64
haha naive

#

thanks, I'll try

hidden plume
carmine blade
#

btw is it possible that i have problems with booting because it's 32bit?

hidden plume
#

no idea

carmine blade
#

For IA32 (32-bit) UEFI systems (not to be confused with 32-bit CPUs), replace x86_64-efi with i386-efi where appropriate.
wait... can you have 64bit UEFI and 32bit CPU?

#

actually wait

#

UEFI... isn't it a new thing?

hidden plume
carmine blade
#

yeah, I wonder if my netbook has it

hidden plume
#

UEFI requires the firmware and operating system loader (or kernel) to be size-matched; that is, a 64-bit UEFI firmware implementation can load only a 64-bit operating system (OS) boot loader or kernel (unless the CSM-based Legacy boot is used) and the same applies to 32-bit. After the system transitions from "Boot Services" to "Runtime Services", the operating system kernel takes over. At this point, the kernel can change processor modes if it desires, but this bars usage of the runtime services (unless the kernel switches back again).[31]: sections 2.3.2 and 2.3.4  As of version 3.15, the Linux kernel supports 64-bit kernels to be booted on 32-bit UEFI firmware implementations running on x86-64 CPUs, with UEFI handover support from a UEFI boot loader as the requirement.[32] UEFI handover protocol deduplicates the UEFI initialization code between the kernel and UEFI boot loaders, leaving the initialization to be performed only by the Linux kernel's UEFI boot stub.[33][34]

#

if you need to install it for BIOS instead of UEFI then i don't have any experience, but that arch wiki page has instructions for that as well

carmine blade
#

Thanks. I'll try, but I feel like this is a wrong way

#

because it's a completely new install

#

so I either messed up something while installing, which can be easily fixed by reinstalling

agile perch
carmine blade
#

I think it's fourth time I'm installing Debian, and fourth day in row

#

btw, fwiw I once succeeded installing Debain and booting into it

#

That's when I just mounted sda as / and sdb as /home

#

However that install lacked non-free firmware, and it was a netinstaller

agile perch
#

I assume Debian can work out the best grub for you to install

carmine blade
#

so it didn't get me any DE or even working wifi

agile perch
#

my only experience is bad ubuntu's like, many many years ago

carmine blade
agile perch
#

why are you using debian instead of arch out of interest?

agile perch
carmine blade
#

I want something the least upgradable as possible

#

I mean, as rarely

#

also I'm lazy ass

#

I never installed arch and that page looks long

agile perch
carmine blade
#

(so instead I spent 4 days installing 5-minutes-to-install OS)

carmine blade
#

anyway let's do this, if debian fails again and again, I'll try arch

agile perch
carmine blade
#

no

#

I use dvd with firmware

agile perch
carmine blade
#

It's just that DVD is not netinst

#

it ships all I need

agile perch
#

and what is your CPU?

carmine blade
#

32bit

agile perch
carmine blade
#

Intel Atom

agile perch
#

intel, okay

#

pretty sure that means you want this:

#

the grey one

agile perch
#

yeah you've got that by the looks of that link

#

yeah, didn't see it sorry

carmine blade
#

it's not that, it's another one

agile perch
#

it's the same

carmine blade
#

It's not net install and it ships non-free firmware

agile perch
#

so it should know what to do with grub

carmine blade
#

let's see when we're getting to that point, could be me being blind

#

the installation is slow as fuck

agile perch
carmine blade
#

I wish it could ask me all questions first, and then proceed with full installation

#

why the fuck it's localised

#

anyway

#

I hope I won't need it

#

I mean I surely won't, because if I don't succeed with one or two more installs, I'll switch to another distro

agile perch
#

you do want grub

carmine blade
#

Yeah but it also says "UEFI partition" whcih I don't have

agile perch
#

or master boot record

carmine blade
#

what does it mean?

agile perch
#

I think it's saying that your drive needs to be MBR?

carmine blade
#

it should be MBR

agile perch
#

then it should be fine

#

the annoying thing about this GUI is it doesn't show you lsblk -f

#

that would be super helpful here

#

maybe it will on the next screen?

carmine blade
carmine blade
#

yeah but there's no lsblk

agile perch
carmine blade
agile perch
#

/dev/sda3 or /dev/sdb2 or whatever?

carmine blade
#

anyway there's no lsblk and fdisk available from the shell

agile perch
carmine blade
agile perch
carmine blade
#

there are two partitions: / and swap

carmine blade
agile perch
carmine blade
#

guess I'm about to start from scratch

carmine blade
agile perch
#

okay, so this thing has had you do partitioning already?

carmine blade
#

I didn't know if it should be done, you were recommending how to repair

carmine blade
#

It's all installed

#

one last thing is grub

agile perch
#

just select sda

#

see what happens

carmine blade
#

Yep, no other choices anyway

#

ik I need it

agile perch
#

maybe it'll make a partition?

carmine blade
#

It just doesn't make it obvious that I have to make a partition

agile perch
#

I've never installed debian, only ubuntu, many years ago

carmine blade
#

It doesn't even let to choose among partitions

#

it suggests physical devices

#

which are very different from my partitions

agile perch
#

go back to partitioning, make sda1 300MiB MBR FAT32, and then the rest of it however you want it

#

and on this screen select sda1

carmine blade
#

why do you think it will even show sda1

#

if it shows physical devices

#

anyway "go back to partitioning" means doing all over again, so I first check if sda changed anything

#

jesus fuck

#

it worked

agile perch
# carmine blade

I assume because it says enter device manually you can do that

carmine blade
#

lmao

agile perch
carmine blade
#

Debian installer:

if (device_for_grub == "/dev/sdb")
    crash("fuck you in particular");
agile perch
#

it's booting into debian?

carmine blade
#

the OS is loading atm

#

yes

agile perch
#

okay, cool

carmine blade
#

insane

#

madness

#

@agile perch thanks for wasting your time to help me XD

north gorgeBOT
#

vegancookies received a thank you cookie!

agile perch
#

do me a favour once you're in and show lsblk -f

carmine blade
#

but jesus fuck, Debian is not for beginners. given that I don't consider myself a complete beginner, it's only hell for them

carmine blade
agile perch
carmine blade
#

I'm fine staying as "intermediate" 😆

#

wait Debian Desktop Environment is ... gnome???

agile perch
#

your choice, but it sounds fun

carmine blade
#

I specifically unchecked gnome

#

fuck

agile perch
#

I mean this server prefers KDE in general but I prefer gnome to KDE

carmine blade
#

I prefer neither of those tbh

#

gnome isn't gonna work not as shit on this calculator

agile perch
#

so did you just select SDA from that grub screen or did you go back for partitioning?

carmine blade
#

former

#

with sdb doesn't work, with sda worked

#

no clue

agile perch
#

are you on the same LVM setup?

carmine blade
#

Yes

agile perch
#

interesting

carmine blade
#

no grub partition

agile perch
#

where is grub??

#

yeah...

#

that's super confusing

carmine blade
#

🐸

agile perch
#

I don't understand

carmine blade
#

¯_(ツ)_/¯

agile perch
#

I hope your USB stick isn't grub 😂

carmine blade
#

lol

#

but no, it booted after I ejected the stick

agile perch
#

actually I kind of hope it is, that'd be hilarious

#

ahh okay

#

I don't understand at all. and I'm going to ask in #tech-general

carmine blade
#

[solved] [grub] unknown filesystem trying to boot from btrfs filesystem

#

wow it froze already

agile perch
carmine blade
#

100%

#

that's what I wanted

agile perch
#

well, TTY first actually

carmine blade
#

I thought Debian Desktop environment would be something more ... innocent

#

but it's fucking gnome 😆

carmine blade
#

seems like I have hw issues

#

basically I was just running nano, it worked fine

#

then I exited it

#

now every command yields "input/output error"

#

ig it's just the disk is dead harold1

#

it explains why it froze

#

or, another option ; when it froze and I hard powered off, is when it broke

#

broken disk explains the failure of windows too

#

this doesn't look good either

agile perch
#

I dunno, that looks like gnome issues again maybe?

#

but maybe sdb has bad sectors?

#

maybe it's an LVM issue?

#

I don't know

carmine blade
#

it feels like one of the drives is half-dead

#

all the symptoms:

  • Windows XP (which was installed before) froze last time I used it
  • I powered it off, now it became corrupt
  • Debian live and OpenSUSE live don't start due to some kernel error
  • Now installed Debian froze
  • I powered it off, it became corrupt
#

it found no bad blocks

#

I have no idea what's going on

agile perch
#

have you done a RAM check?

carmine blade
#

a bit later though, I'm a bit exhausted atm XD

carmine blade
#

alright whatever, started memtest86, let's see (it's gonna take hours though)

agile perch
#

this is a laptop or a desktop out of interest?

#

looks like a laptop...

#

how easy are the drives to replace?

#

kinda wondering if you could test the SSD's out in another computer

#

if the RAM is fine, could you just put your /home on one drive and keep the root and grub on another instead of doing an LVM?

carmine blade
#

Well, I booted from another linux and ran badblocks on both drives, no bad blocks it found

agile perch
#

I don't know how LVM works properly, I wonder if the computer is just too old to do it well, if that's a thing?

carmine blade
carmine blade
#

LVM is a very neat technology, but no clue how it works

agile perch
#

no offense intended in how I phrased the question in #tech-general

carmine blade
#

ik it's a calculator

agile perch
#

can it run skyrim?

carmine blade
#

well now it can't run anything

#

from hard drive

agile perch
#

how wedded are you to btrfs?

#

I'd suggest maybe moving away from LVM, and just mounting SDB as a secondary drive, and also using ext4 instead of btrfs, in case it's related to how old your hardware is

carmine blade
agile perch
carmine blade
agile perch
#

also don't use LVM unless you have a reason to

carmine blade
#

why not floshed

#

because I'm about to

agile perch
#

because you're just over-complicating things and it'll likely lead to more confusion if and when you need to fix your computer

#

just mount your secondary drive in the fstab and it'll mount each time you boot

carmine blade
#

this time the drives aren't small

#

but there are still two of them

#

:|

agile perch
#

I don't see what that's related?

carmine blade
agile perch
#

but why do they need to be merged? why can't you just mount one to the other?

carmine blade
#

like it always happened to me back on Windows

agile perch
#

okay, your choice