{"id":382,"date":"2024-02-16T13:00:51","date_gmt":"2024-02-16T12:00:51","guid":{"rendered":"https:\/\/linowebserver.org\/?p=382"},"modified":"2024-02-28T06:55:58","modified_gmt":"2024-02-28T05:55:58","slug":"grub-recover-btrfs","status":"publish","type":"post","link":"https:\/\/linowebserver.org\/index.php\/2024\/02\/16\/grub-recover-btrfs\/","title":{"rendered":"grub recover btrfs"},"content":{"rendered":"\n<p>if u stay on <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;grub rescue>\n\/\/if u got the \"grub>\" prompt so move over to STEP 2\n** STEP 1 **\n\/\/find disks\nls\n\/\/output like\n(hd0),(hd0,gpt1),(hd0,gpt2)....\n\/\/try to ls hd0\nls hd0\n\/\/u got an output about partitions keep an eye on btrfs\n\/\/in this example its (hd0,gpt1)\nls (hd0,gpt1)\/\n\/\/output be like \n\/\/ @, @\/root, ....\n\/\/now we have to setup the grub\n\ngrub rescue> set root(hd0,gpt1)\ngrub rescue> set prefix=(hd0,gpt1)\/@\/boot\/grub\ngrub rescue> insmod normal\ngrub rescue> normal\n\/\/grub boots into the normal mode\n\n** STEP 2 **\n\/\/check the enviroment vars\ngrub> set\n\n\/\/ now we setup the needed settings\ngrub> insmod part_msdos\ngrub> insmod btrfs\ngrub> insmod {gzio|xzio|lzopio|??}\n\n\/\/ if not working... try insmod gzio; insmod xzio... and so on.\ngrub> set root=(hd0,gpt2)\n\n\/\/ now wee need to find out the boot UUID so we read the fstab file\ngrub> cat \/@\/etc\/fstab\n\/\/ find the UUID for the \/ \n\ngrub> linux \/@\/boot\/vmlinux-'(Your VMLinuz-File)' root=UUID='(Your ROOT \/ UUID)' rw rootflags=subvol=@ \n\ngrub> initrd \/@\/boot\/initrd.img-'(Your INITRD IMAGE FILE)' \ngrub> boot\n\n\/\/ now sit back and cross your finger, and watch your OS boots again. \n\/\/ after sucessfull boot u have to update your UEFI enviroment. \n\/\/ start a console with root access\n\n#>efibootmgr -v\n\/\/check ur root HDD \n\n#> mount \n\/\/keep an eye for your boot drive in this case \/dev\/sda \n\/\/ Setup a new UEFI ENTRI for ur Vendor like debian, Ubuntu ... \n\n#> grub-install --bootloader-id (YOUR VENDOR) \/dev\/sda\n\/\/Check the UEFI Bootmanager again..\n\n#> efibootmgr -v \n\/\/ now we need to install the GRUB Bootloader \n#> update-grub\n\n\/\/or\n#> update-grub2\n\n#>init 6\n\/\/ for reboot an now ur system boots again\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>if u stay on<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,9,66],"tags":[89,81,90,91,88],"class_list":["post-382","post","type-post","status-publish","format-standard","hentry","category-howto-2","category-linux","category-linux-3","tag-bootloader","tag-btrfs","tag-grub","tag-grubrescue","tag-rescue"],"_links":{"self":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts\/382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/comments?post=382"}],"version-history":[{"count":1,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts\/382\/revisions"}],"predecessor-version":[{"id":383,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts\/382\/revisions\/383"}],"wp:attachment":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/media?parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}