Insmod normal error file not found

У некоторых пользователей возникает необходимость в установке операционных систем Windows и Linux на свой компьютер. Как правило, чтобы это осуществить, используется программа-загрузчик GRUB, однако, нередко возникают ошибки при её использовании. В этой статье вы узнаете, как можно исправить ошибки GRUB.

Нередко возникает необходимость в установке двух принципиально разных операционных систем на один компьютер: Windows и Linux. Разумеется, подобное «соседство» будет связано с некоторыми неудобствами. Для установки, как правило, используют специальную программу GRUB. Но к сожалению, при её использовании можно столкнуться с рядом ошибок. В этой статье разберёмся с тем, как исправить ошибки загрузчика GRUB. Давайте же начнём. Поехали!

Исправление ошибок GRUB

Для начала давайте определимся с тем, что из себя представляет эта программа. GRUB — представляет собой системный загрузчик, устанавливающийся непосредственно с Линукса и записывающий все данные на первый раздел диска (MBR).

Сам rescue mode является отличительной чертой GRUB 2 от его предыдущей версии. Этот режим запускается, если программе-загрузчику не удалось найти файл «grub.cfg» либо не удалось передать управление в kernel (ядро). В итоге не удаётся найти загрузочные файлы и запустить операционную систему. Именно тогда и возникает ошибка.

Ошибка: Unknown Filesystem

Следуйте инструкциям ниже, чтобы узнать, как решить проблему с GRUB

Способ 1

Что делать в случае ошибки unknown filesystem grub-rescue? Перед вами окно, в котором можно использовать только 4 команды, их вполне достаточно, чтобы исправить все проблемы и успешно загрузиться:

  • ls — позволяет вывести всё содержимое;
  • set — применяется для установки переменных;
  • unset — очищает переменную;
  • insmod — необходима для загрузки модулей.

Также можно сделать доступным ряд других команд. Сделать их доступными можно, загрузив модуль «normal». Для этого пропишите:

insmod normal

После этого станут доступны:

  • dump — для очистки памяти;
  • exit — команда выхода из загрузчика;
  • chainloader — необходима, чтобы указать последующей команде boot передать управление цепочечному загрузчику;
  • kfreebsd — несколько команд, позволяющих загрузить ядро FreeBSD, его модули;
  • rmmod — позволяет выгрузить указанный модуль ядра;
  • multiboot.

Первым делом нужно отыскать модули, чтобы загрузить их. Для этого введите:

ls

Результатом выполнения команды будет следующее:

(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1)

Из этого можно сделать вывод, что загрузчик не может определить файловые системы дисков, поэтому определяет их как msdos. Теперь необходимо угадать видимые диски. В конкретном примере перед вами два диска: hd0 (с тремя разделами) и hd1 (с двумя разделами). Допустим, вы знаете, что Linux инсталлирован на диск, который имеет три раздела. В таком случае вам нужен диск с индексом «0».

GRUB даёт названия разделам в обратном порядке. В связи с этим, неясно как трактовать запись: «(hd0,msdos3)». Ведь можно посчитать это как первым разделом, так и третьим. К счастью, из этой ситуации можно выйти при помощи такого синтаксиса команды: «(hd0,1)». Обратите внимание, что в программе-загрузчике GRUB отсчёт дисков идёт с 0, а разделов с 1.

Допустим, что Линукс хранится в первом разделе, тогда он будет обозначаться (hd0,1). В этом случае команда, которую необходимо прописать, будет иметь вид:

set prefix=(hd0,1)/boot/grub
set root=(hd0,1)

Теперь модули могут быть загружены. Использовать их можно только после загрузки.

После того как вы выбрали нужный диск, проверьте содержится ли там то, что нужно. Для этого пропишите:

ls /boot/grub

В результате выполнения на экране появится список md файлов.

Далее, пропишите:

insmod ext2
insmod normal
normal

После этого загрузчик будет переведён в режим полной функциональности. Затем автоматически будут найдены разделы с операционной системой, и откроется меню программы.

Теперь остаётся загрузить Linux. Делается это при помощи команды:

grub-install /dev/sda

Ноутбук с ОС Linux

Способ 2

Всё сильно упрощается, если использовать Live CD – загрузочный диск с системой Linux. Он может быть записан на флешке, на внешнем винчестере или на обычном диске – это неважно, главное, чтобы с него можно было загрузить компьютер.

После загрузки Linux стандартным способом устанавливается бесплатная утилита Boot Repair. Она предназначена именно для устранения ошибок загрузки с помощью загрузчика Grub и очень проста в использовании – достаточно кликнуть по кнопке.

Заметим, что иметь Live CD для линуксоида всегда полезно и даже необходимо. Это зачастую избавляет от множества проблем, так как позволяет загрузить полноценную систему с внешнего носителя и использовать весь её инструментарий. Скачать такой диск с любой версией Linux не представляет сложностей, в комплекте обычно идёт инструкция по записи его на флешку.

После выполнения всех этих действий ошибка будет устранена. Пишите в комментариях была ли полезна для вас эта статья и задавайте любые интересующие вопросы по рассмотренной теме.

Heya! Hope you all are doing well. Me too. So, today I am gonna share something amazing and insightful. I have attended a meetup held by LinuxChix last Sunday. So after the talks, there held a chaos engineering session. Even though I hadn’t attended any session like this before, I was eager to experience these things myself. Because whenever I do something on my system, I am always very careful in case it doesn’t run into any system failures. So, this was a golden opportunity for me. In the session, my friend Neeraj and I were given a system with the error shown as:

error: file '/grub/i386-pc/normal.mod' not found.
grub rescue>

We have to resolve this error and get into the system safely. We were at the grub-rescue prompt. Basically grub-rescue prompt is somewhat more restricted as compared to grub prompt. This is because not all commands run in this shell. Only some selected commands work at the grub-rescue prompt. Very first command which we tried was “ls” command which worked and it showed the all the devices or partitions which were present in the system. So, the  output was somewhat like:

grub rescue> ls
(hd0) (hd0,msdos1) (hd0,msdos2) (hd0,msdos4) (hd0,msdos5) (hd0,msdos6)

These are the partitions which were present in the system. After that we run the “ls” command on each partition, which gives us some unexpected output. It tells if  the file-system is known or not. Grub only recognizes the “ext2” file-system. So, we were left with only three partitions to work with which were (hd0,msdos2) (hd0,msdos4) (hd0,msdos6). Now you might be wondering what does this partition name means. So, if I would explain in short, it would be like

  • (hd0,msdos1) = /dev/sda1
  • (hd0,msdos2) = /dev/sda2

and so on. Now, in words (hd0,msdos1) will be the 1st partition in hard-drive 0 and (hd0,msdos2) means 2nd partition in hard-drive 0. Since the system had only single hard-drive and it’s been divided into partitions, so all partition contains (hd0). Partitions except the known file systems showed the error of “Unknown file system“.

Now, we were left with the 3 partitions to look into for the required file which is “normal.mod“. Before going any further, we should understand the need for this file. Basically, normal.mod is a module which grub loads at the boot time which provides the use of normal command. Using normal command we can display the GRUB menu. Since, the grub couldn’t locate the file in its usual location, it means either the file has been displaced or it could have been deleted somehow.

Case 1: ‘normal.mod’ is displaced from its default location

So, let’s consider the first case for now ie the file has been displaced and could be in some other partitions. Grub looks for this module in the /boot/grub/i386-pc/ by default(Here i386-pc is specific, it depends on your system architecture). For that we have to check the contents of each of the three partitions in order to ensure if the file is present there or not. We can do this using ls command.

grub rescue> ls (hd0,msdos1)/boot/grub/i386-pc/

We need to do this for every partition. If we get the required module in any of the partition. Let’s say we get it in the 1st partition. So,  now we need to set the prefix variable to the partition which contains the required file. prefix variable is set to the location of grub directory at the time of grub installation. So, it is possible that grub couldn’t locate the normal.mod because the prefix variable is pointing to the wrong partition. So we can set the prefix variable using set command. Also, we need to set the root to the same partition as that of prefix . For eg

grub rescue> set root=(hd0,msdos1)
grub rescue> set prefix=(hd0,msdos1)/boot/grub

Now, since we have set the correct path to root and prefix, we can use the normal module now. So for that we have to import the module. To import it, we would use insmod command.

grub rescue> insmod normal
grub rescue> normal

Now, the grub menu would be shown and you can enter into the system safely.

Special case:

In this there can be situations like the normal.mod is not present in the exact location we are looking into. Like in our case, we are trying to locate it into “(hd0,msdos1)/grub/boot/i386-pc/”. But what if it is present in the location “(hd0,msdos1)/root/”, then pointing prefix to this location won’t be useful and also we can’t transfer it to its correct location. So, to resolve cases like this what we can do is use insmod command to import the normal module as:

grub rescue> insmod (hd0,msdos1)/root/normal.mod
grub rescue> normal

Using this you would be able to use the normal module and get into the GRUB menu. But since it isn’t placed in its correct location, this means that there were some problem while installing grub. So, if you reboot the system, you would again be thrown into the grub rescue prompt and have to follow the same procedure. It would be better if you install the grub again using the following command after entering into the system terminal:

$ sudo grub-install /dev/sda

And then you are good to go.

Case 2: ‘normal.mod’ is not present

Well, the whole procedure was for the case when the required module is misplaced. But what if it isn’t present at all in any partition and somehow got deleted. To your curiousness, this was the case with us in chaos engineering session. We tried to find the module in each known partition but couldn’t locate it anywhere. So, now we have to do the work which normal module would’ve done if it would be present. Therefore we have to find the kernel files and boot the system manually.

To boot the system we would require the kernel file which would be something like “vimlinuz-linux” and the file “initramfs-linux.img“(Sometimes, you can find it as “initrd-linux.img”). The vimlinuz-linux is actually the kernel image which mounts the root partition on the hard-disk. The initramfs-linux.img loads the futhur required modules needed for booting of the system. So, very first thing we did was to locate these files in any of the known partitions. So, we looked for these files under the /boot directory using the same ls command as:

grub rescue> ls (hd0,msdos2)/boot/
# some output
grub rescue> ls (hd0,msdos4)/boot/
# some output

We finally found the above mentioned files in the (hd0, msdos4) partition. This was the great success after searching through the internet and several wrong attempts for a long time. Now, we have to set the root to the partition which contains the kernel image using the set command so that it always points to the right location.

grub rescue> set root=(hd0,msdos4)

Next thing to be done is to run the kernel image. So for that we need to import the linux module using the insmod command and also the initramfs-linux.img file using the initrd command:

grub rescue> insmod linux
grub rescue> linux /boot/vimlinuz-linux root=/dev/sda4
grub rescue> initrd /boot/initramfs-linux.img

And finally the boot command, which would boot the system(using the above files) and allow us to get into the system

grub rescue> boot

Yay! finally  we were able to enter into the system. We were feeling like a cracker who has solved some crucial problem(just kidding!). But yet the problem existed ie the normal module isn’t present. In case if we would reboot the system, same error would’ve been shown and we have to repeat the same procedure. So to resolve it we need to do the same thing which we did for the 1st case. Do you remember it? Yeah, we need to re-install the grub to repair the damaged or deleted files using the system terminal.

$ sudo grub-install /dev/sda

As soon as the installation successfully completed, we reboot the system to check if it actually worked(we both crossed our fingers at that moment). And Hurrah! we have successfully solved the problem.

We both were appreciated by the people there. It was really an amazing experience. Cocoa was our mentor during the session and helped us in understanding things and showed us the path to solve the problem. I really look forward to attend more of these sessions. I think you should also. So, watch the LinuxChix space for more of these session.

References:

  1. https://wiki.archlinux.org/index.php/GRUB#Normal_loading
  2. https://askubuntu.com/questions/266429/

For now, bidding you goodbye. Meet you in the next blog. Till then…

Be curious and keep learning!

Wondering how to resolve Ubuntu error “/boot/grub/i386-pc/normal.mod not found”? We can help you.

As part of our Server Management Services, we assist our customers with several Ubuntu queries.

Today, let us see how our Support techs proceed to resolve it.

How to resolve Ubuntu error “/boot/grub/i386-pc/normal.mod not found”?

Typically, error looks as shown below:

error: file '/grub/i386-pc/normal.mod' not found.
grub rescue>

Basically grub-rescue prompt is somewhat more restrict as compare to grub prompt.

This is because not all commands run in this shell.

Only few commands work at the grub-rescue prompt.

Very first command which we tried was “ls” command which worked and it will show the all the devices or partitions which were present in the system.

So, the output was somewhat like:

grub rescue> ls
(hd0) (hd0,msdos1) (hd0,msdos2) (hd0,msdos4) (hd0,msdos5) (hd0,msdos6)

These are the partitions which were present in the system.

After that we run the “ls” command on each partition, which gives us some unexpect output.

It tells if the file-system is known or not.

Grub only recognizes the “ext2” file-system.

There are three partitions to work with which were (hd0,msdos2) (hd0,msdos4) (hd0,msdos6).

Partitions names will as shown below:

(hd0,msdos1) = /dev/sda1
(hd0,msdos2) = /dev/sda2

and so on. Now, in words (hd0,msdos1) will be the 1st partition in hard-drive 0 and (hd0,msdos2) means 2nd partition in hard-drive 0.

Since the system had only single hard-drive and it’s been divided into partitions, so all partition contains (hd0).

Partitions except the known file systems showed the error of “Unknown file system“.

Now, we were left with the 3 partitions to look into for the required file which is “normal.mod“.

Before going any further, we should understand the need for this file.

Basically, normal.mod is a module which grub loads at the boot time which provides the use of normal command.

Using normal command we can display the GRUB menu.

Since, the grub couldn’t locate the file in its usual location, it means either the file has been displaced or it could have been deleted somehow.

Case 1: ‘normal.mod’ is displaced from its default location

In this case, Grub looks for this module in the /boot/grub/i386-pc/ by default(Here i386-pc is specific.

For that we have to check the contents of each of the three partitions in order to ensure if the file is present there or not.

We can do this using ls command.

grub rescue> ls (hd0,msdos1)/boot/grub/i386-pc/

Then, we need to do this for every partition.

If we get the required module in any of the partition. Let’s say we get it in the 1st partition.

So, now we need to set the prefix variable to the partition which contains the require file.

prefix variable is set to the location of grub directory at the time of grub installation.

So, it is possible that grub couldn’t locate the normal.mod because the prefix variable is pointing to the wrong partition.

Then, we can set the prefix variable using set command.

Also, we need to set the root to the same partition as that of prefix . For eg

grub rescue> set root=(hd0,msdos1)
grub rescue> set prefix=(hd0,msdos1)/boot/grub

Now, since we have set the correct path to root and prefix, we can use the normal module now.

So for that we have to import the module. To import it, we would use insmod command.

grub rescue> insmod normal
grub rescue> normal

Now, the grub menu would be shown and you can enter into the system safely.

Case 2: ‘normal.mod’ is not present

Basically, the whole procedure is for the case when the require module is misplace.

But what if it isn’t present at all in any partition and somehow got delete.

So, try to find the module in each known partition but couldn’t locate it anywhere.

Now we have to do the work which normal module would’ve done if it would be present.

Therefore we have to find the kernel files and boot the system manually.

To boot the system we would require the kernel file which would be something like “vimlinuz-linux” and the file “initramfs-linux.img“.

The vimlinuz-linux is actually the kernel image which mounts the root partition on the hard-disk. The initramfs-linux.img loads the futhur required modules needed for booting of the system.

Firstly, locate these files in any of the known partitions.

So, we looked for these files under the /boot directory using the same ls command as:

grub rescue> ls (hd0,msdos2)/boot/
# some output
grub rescue> ls (hd0,msdos4)/boot/
# some output

Once we find the above mentioned files in the (hd0, msdos4) partition.

Now, we have to set the root to the partition which contains the kernel image using the set command so that it always points to the right location.

grub rescue> set root=(hd0,msdos4)

Next thing to be done is to run the kernel image.

So for that we need to import the linux module using the insmod command and also the initramfs-linux.img file using the initrd command:

grub rescue> insmod linux
grub rescue> linux /boot/vimlinuz-linux root=/dev/sda4
grub rescue> initrd /boot/initramfs-linux.img

And finally the boot command, which would boot the system(using the above files) and allow us to get into the system

grub rescue> boot

But yet the problem existed ie the normal module isn’t present.

In case if we would reboot the system, same error would’ve been shown and we have to repeat the same procedure.

So to resolve it we need to do the same thing which we did for the 1st case. Do you remember it? Yeah, we need to re-install the grub to repair the damaged or deleted files using the system terminal.

$ sudo grub-install /dev/sda

As soon as the installation successfully completed, we reboot the system to check if it actually work.

[Stuck in between? We’d be glad to assist you]

Conclusion

In short, today we saw steps followed by our Support Techs to fix this ubuntu error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

Понравилась статья? Поделить с друзьями:
  • Insite ошибка 5204
  • Insatiable boot device windows 10 ошибка при загрузке
  • Insanity error sans
  • Insanity clicker fatal error
  • Insane computer error скачать