General TC > General TC Talk

[Solved] grub cannot read usb drive's ext4 partition

<< < (4/7) > >>

Rich:
Hi GNUser

--- Quote from: GNUser on February 07, 2024, 12:42:57 PM --- ... My suspicion is that the  mkfs.ext4  step in TCL is silently failing to write some metadata to the usb stick. ...
--- End quote ---
Maybe try running:

--- Code: ---e2fsck -f /dev/sdXX
--- End code ---
after  mkfs.ext4  step?

patrikg:
Are you using some old grub version ?
Or is this only then you boot from the usb ?
And what i would test, just format the partition with a lover ver of ext, like ext2.
That not have any journal.

GNUser:

--- Quote from: Rich on February 07, 2024, 01:43:39 PM ---Maybe try running:

--- Code: ---e2fsck -f /dev/sdXX
--- End code ---
after  mkfs.ext4  step?

--- End quote ---

No luck. I also tried a different usb stick to exclude something wrong with the stick itself.

Can anyone reproduce this? To try, simply grab a usb stick you don't care about, then:

0. tce-load -wil gdisk e2fsprogs
1. use  gdisk  to delete all the partitions and create a single "Linux filesystem" (hex 8300) partition
2. use  mkfs.ext4  to format the partition
3. reboot and, at grub menu, press "c" for a command prompt
4. try listing the partition's contents with ls (hdX,gptX)/
5. press Esc to leave the grub prompt and return to the grub menu

When I do 1-2 above in TCL15 x86_64, I consistently get an error at step 4.
When I do 1-2 above in Devuan, I don't get an error at step 4 using same machine, same grub, same usb stick.

GNUser:
On TCL15 x86_64 I tried using  fdisk  then  mkfs.ext4  (instead of  gdisk  then  mkfs.ext4). It made no difference.

I think that confirms the problem is with the  mkfs.ext4  step on TCL. I'll keep investigating.

GNUser:
I tried two experiments:

Experiment 1: gdisk step in Devuan, mkfs.ext4 step in TCL15
Result: "error: unknown filesystem" in grub

Experiment 2: gdisk step in TCL, mkfs.ext4 step in Devuan
Result: no error in grub

Everything points to  mkfs.ext4  creating the filesystem in a way that causes problems for grub.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version