{"id":599,"date":"2023-11-23T08:01:46","date_gmt":"2023-11-23T08:01:46","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/11\/23\/8624545-what-to-do-if-your-vps-is-in-grub-rescue-mode\/"},"modified":"2026-03-16T12:12:01","modified_gmt":"2026-03-16T12:12:01","slug":"8624545-what-to-do-if-your-vps-is-in-grub-rescue-mode","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/8624545-what-to-do-if-your-vps-is-in-grub-rescue-mode\/","title":{"rendered":"What to Do if Your VPS Is in Grub Rescue Mode"},"content":{"rendered":"<p class=\"no-margin\">Grub Rescue Mode is a <b>troubleshooting environment<\/b> within the server&rsquo;s bootloader system. It activates automatically when there are challenges loading the operating system, often due to issues such as corrupted or missing system files.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">If you get the following message after accessing your VPS through the Browser Terminal:<\/p><p class=\"no-margin\">\n<\/p><pre><code>grub rescue&gt;<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">It means your VPS entered Grub Rescue Mode. To fix it, follow these steps:<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_e43a851046\">Step 1 &ndash; Preparations<\/h2><ol>\n<li>\n<p class=\"no-margin\">Enable the <b><a href=\"\/support\/5726577-how-to-use-emergency-mode-on-your-vps\" target=\"_blank\" class=\"intercom-content-link\">VPS emergency mode<\/a><\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Locate your server&rsquo;s <b>main partition <\/b>by referring to this guide: <b><a href=\"\/support\/8600853-vps-emergency-mode-where-to-find-files\" target=\"_blank\" class=\"intercom-content-link\">VPS Emergency Mode: Where to Find Files<\/a><\/b><\/p>\n<\/li>\n<\/ol><p class=\"no-margin\">\n<\/p><h2 id=\"h_65da1fe27d\">Step 2 &ndash; Unmount the partition<\/h2><p class=\"no-margin\">After connecting to Emergency Mode SSH, run the following command:<\/p><p class=\"no-margin\">\n<\/p><pre><code>lsblk<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">The output will show the details about the storage devices detected by the system and their associated information. It will look similar to this example:<\/p><p class=\"no-margin\">\n<\/p><pre><code>root@machine:\/# lsblk <br>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS<br>loop0 7:0 0 63.4M 1 loop \/snap\/core20\/1974<br>loop1 7:1 0 111.9M 1 loop \/snap\/lxd\/24322 <br>loop2 7:2 0 53.3M 1 loop \/snap\/snapd\/19457<br>loop3 7:3 0 40.9M 1 loop \/snap\/snapd\/20290 <br>loop4 7:4 0 63.5M 1 loop \/snap\/core20\/2015 <br>sda 8:0 0 50G 0 disk <br>&#9500;&#9472;sda1 8:1 0 49.9G 0 part \/mnt\/sda1 <br>&#9500;&#9472;sda14 8:14 0 4M 0 part <br>&#9492;&#9472;sda15 8:15 0 106M 0 part \/mnt\/sda15<br>                           \/boot\/efi <br>sdb 8:16 0 2.2G 0 disk <br>&#9500;&#9472;sdb1 8:17 0 2.1G 0 part \/ <br>&#9500;&#9472;sdb14 8:30 0 4M 0 part <br>&#9492;&#9472;sdb15 8:31 0 106M 0 part<br>sr0 11:0 1 4M 0 rom<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">The main partition can be identified as the largest in size. In the example above, the largest partition is <code>sda1<\/code>, designated witht the mount point <code>\/mnt\/sda1<\/code><\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">If the <b>MOUNTPOINTS<\/b> column for your device is <b>empty<\/b>, skip this part and proceed directly to the next step.<\/p>\n<\/div><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Unmount the main partition if the MOUNTPOINTS column for your device is <b>not empty<\/b> by entering the following command:<\/p><p class=\"no-margin\">\n<\/p><pre><code>umount mountpoint<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Replacing <code>mountpoint<\/code> with your main partition&rsquo;s mount point. In this example, it would look like this:<\/p><p class=\"no-margin\">\n<\/p><pre><code>umount \/mnt\/sda1<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">If you receive a warning stating that the <b>device is busy<\/b>, ensure that there are no ongoing accesses to this directory from other sources such as the File Manager, SSH, or FTP.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_e08495954d\">Step 3 &ndash; Restore the file system<\/h2><p class=\"no-margin\">Once the main partition is unmounted, run the following command:<\/p><p class=\"no-margin\">\n<\/p><pre><code>xfs_repair \/dev\/device<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Replacing <code>device<\/code> with your device name. Following the same example:<\/p><p class=\"no-margin\">\n<\/p><pre><code>xfs_repair \/dev\/sda1<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Make sure to leave the <b>\/dev<\/b> directory at the beginning of the path, as this is the directory that stores all devices, whether mounted or not.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_213562761c\">Step 4 &ndash; Restart your VPS<\/h2><p class=\"no-margin\">After repairing the file system on your main partition, <b>reboot <\/b>the server &ndash; the filesystem will be fixed and your VPS should start working.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Resolving VPS boot issues caused by filesystem errors<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[199],"tags":[],"class_list":["post-599","post","type-post","status-publish","format-standard","hentry","category-vps-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/8624545-what-to-do-if-your-vps-is-in-grub-rescue-mode\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=599"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/599\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}