grub rescue how to load differnt type file system

Asked by MasterCATZ

I boot from a file system consisting of mdadm raid 5 and LVM

I had
BTRS for /Boot and /
and
EXT4 for my /Var /Home

but because grub can not use last save state with BTRFS I decided to make it EXT4

( needed it to not keep trying to load the last beta kernel installed if I tried doing a remote restart )

after many hours chasing my tail thinking a UUID changed when I formatted the old boot partition I discovred grub would only read from BTRFS partitions

how can I get "grub rescue" to load/read from ext4 ? without it saying unknown file system ?

I can not re-install grub either it complains about a block device

I tried using boot-repair but that no longer works as it is trying to get files from Ubuntu 17 and they seem to be disabled downloads now ( tried with Ubuntu 18 and 17 live )

http://paste.ubuntu.com/p/cpgvD7YQ2t/

for now re-formatting back to BTRFS then I might just have to back everything up and do a fresh reinstall with new partition layout but at least it allowed me to manually boot from my / when I copied my boot backup to it

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Not a GRUB specialist myself but you can boot to the Ubuntu install media and chroot to the Ubuntu instilled OS on the internal drive. You can then reinstate GRUB as you require

Skip this to 1:25 and it shows you (The rest is making a bootable USB stick)
https://www.youtube.com/watch?v=8lod8sRb_6I

Revision history for this message
MasterCATZ (mastercatz) said :
#2

thanks but not what I need ,

I need to somehow add in ext2 support as my "grub rescue" only loads

modules: crypto lzopio gzio btrfs diskfilter lvm part_msdos mdraid1x raid5rec
    biosdisk

I should have been able to do grub-install --install-modules= ***

/dev/md/0 is the mdadm array

sudo grub-install /dev/md/0
Installing for i386-pc platform.
grub-install: error: unable to identify a filesystem in mduuid/bcfc4033b1c33bb4b0c8ab4dfd46e40a; safety check can't be performed.

Raid5LVM-Boot is the LVM that contains boot

sudo grub-install /dev/mapper/Raid5LVM-Boot
Installing for i386-pc platform.
grub-install: error: diskfilter writes are not supported.

but its not playing the game

the actually grub.cfg loads ext2 ..... so I do not know why grub rescue is only supporting btrfs

for now system is working again and I will just have to disable

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Plan F is to just backup everything wipe reformat and reinstall grub via Ubuntu Server again for Raid / LVM and then copy it all back over just because 1024k at the start of the drive that not letting me configure it

Revision history for this message
MasterCATZ (mastercatz) said :
#3
Revision history for this message
MasterCATZ (mastercatz) said :
#4

well I did a little hack backed up the first 5 meg's of the disks then started playing with a hex editor

made a fresh install in a virtual machine and stole that code and over written my disks sectors with it
and it booted ext4 :P

now just need to solve

" Diskfilter writes are not supported "

and apparently just wasted my entire afternoon as
The problem is that the
save_env statement only works in simple installations
(you can't run save_env inside a RAID or LVM disk).
 From the GRUB manual:

Can you help with this problem?

Provide an answer of your own, or ask MasterCATZ for more information if necessary.

To post a message you must log in.