LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-10-2022, 05:00 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,501
Blog Entries: 2

Rep: Reputation: 68
grub not load after a power fault during an update


Yesterday I started to upgrade TW from 20220630->20220706 when at some point we had a power fault in the area.

As result, grub don't load

Code:
GRUB loading....

Welcome to GRUB!

error: ../../grub-core/fs/btrfs.c:2076: file /boot/grub2/i386-pc' not found.
error: ../../grub-core/fs/btrfs.c:2076:file /boot/grub2/i386-pc/normal.mod' not found.

Entering rescue mode...
grub rescue>
Which is the proper way to recovery from this state, taking in account the fact the root FS is a BTRFS with subvolumes as is standard in Tumbleweed ?

My google-fu was not good enough to find a specific guide for opensuse/tumblewee with a btrfs root disk and subvolumes to boot....
 
Old 07-10-2022, 06:10 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
It's not materially different with BTRFS than with EXT4. Grub isn't finding what it's looking for, so a boot from another OS is required to btrfs-check the root filesystem, then try booting again after. If that isn't enough to bring up the Grub menu, then again boot another OS to setup and run the installed system in chroot, from which YaST can be run in text mode to reconfigure the bootloader. Any change whatsoever in yast bootloader will completely configure everything to do with Grub, even (re)install rpms if necessary, as long as internet is available.
 
Old 07-12-2022, 04:58 PM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,501

Original Poster
Blog Entries: 2

Rep: Reputation: 68
SOLVED

For anyone interested, as I was unable to find a specif guide to opensuse/btrfs which complicates a bit the standard procedure that applies to a regular FS like ext4:

Boot with a USB stick with btrfs support, preferentially a version of the same distro, in this case, opensuse net installer.

If using the same distro to boot, look at boot menu. There is an option to "upgrade" the current system. It will scan the disk and if found a up-gradable version, proceed with the process, eventually it get fixed.

Manual approach: Boot with the USB stick , look at menu for an option "rescue" or if it is a live distro, boot normally.
1) identify the boot disk and partition: "lsblk -f"; lets say you identify the system at /dev/sda4
2) create a mount point at "/mnt" to mount the whole partition: "mkdir /mnt/volume"
3) mount it: "mount /dev/sda4 /mnt/volume";
3a) optional: at "/mnt/volume/@" you will see the root disk structure and at "/mnt/volume/.snapshots" you see all snapshots for this disk.
3b) optional: to figure out which is the current snapshot so you can navigate to it in "/mnt/volume/.snapshots/_ID_number_here_" you can run "btrfs subvolume get-default /mnt/volume".
3c) optional: CAUTION, BY YOU OWN RISK: you can rollback to a specific snapshot with "btrfs subvolume set-default _ID_number_here_ /mnt/volume", but it is probably safer doing that at the specific opensuse grub menu.
4) check the current subvolumes avaiable: "btrfs subvolume list /mnt/volume"; take a note of pairs of path/_ID_number_ for each relevant paths: (@, usr, var, etc...specially the 2 /boot/grub2 entries)
5) Create another mount point to the root fs: "mkdir /mnt/myroot";
6) Mount those paths at /mnt/myroot/whatever: i.e: for path "@", id 256: "mount /dev/sda4 -o subvolid=256 /mnt/myroot" ; for path "usr" id 257: "mount /dev/sda4 -o subvolid=257 /mnt/myroot/usr" ; repeat for all system paths/IDs, don't forget the 2 /boot/grub2 entries.
7) bind mounts: "mount /proc -o bind /mnt/myroot/proc"; "mount /sys -o bind /mnt/myroot/sys"; "mount /dev -o bind /mnt/myroot/dev";
8) chroot /mnt/myroot
9) You are ready to re-install grub, either by "update-bootloader --reinit" or/and "grub2-install"

Good luck for you, not for me though. The folders/files structure was FUBAR due to power loss.

Last edited by marozsas; 07-16-2022 at 08:41 AM.
 
  


Reply

Tags
btrfs, grub, opensuse, subvolume, tumbleweed



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
WiFi starts after power off/power on but not after reboot taylorkh Linux - Hardware 10 07-25-2015 09:06 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] power crash during BIOS update cccc Linux - Hardware 11 03-11-2012 05:27 AM
Yum update stopped responding during kernel update install, now server load is high pulsorock Linux - Kernel 1 12-31-2008 01:55 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 12:53 AM.

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