This tutorial is for all of us that has done everything by the book with parted and still they receive an error when installing grub2 to the boot sector!
srv@local ~ # grub2-install /dev/sda Installing for i386-pc platform. grub2-install: error: disk `mduuid/613f3f0bb202bf03a5664e17b3d568a0' not found.
The solution is relatively simple:
Boot from a rescue disk and reinstall grub from there!
The problem is that currently loaded kernel remembers the old device, which was deleted, and probably you won’t be able to fresh the metadata in the memory. In fact, if you receive this error when booted in a rescue disc you probably have done some changes on the layout of the disks or the partitions or the RAID devices and you must reboot the machine again and then JUST reinstall the grub.
Such problems could have happened if you deleted partitions or made some disk layout changes (using parted?) on mounted or partitions in use and the kernel could loaded the partition changes in memory. The parted reports the changes will take effect after system reboot.
STEP 1) Check the devices and mount the root and boot
They might be on the same device here they are on different MD devices (in the case, software array). md1 is the boot and md2 is the root.
root@rescue ~ # cat /proc/mdstat Personalities : [raid1] md3 : active raid1 sda5[3] sdb5[2] 422716416 blocks super 1.2 [2/2] [UU] bitmap: 0/4 pages [0KB], 65536KB chunk md2 : active raid1 sda3[3] sdb3[2] 31440896 blocks super 1.2 [2/2] [UU] md1 : active raid1 sda2[3] sdb2[2] 523712 blocks super 1.2 [2/2] [UU] md0 : active raid1 sda1[3] sdb1[2] 33521664 blocks super 1.2 [2/2] [UU] unused devices: <none> root@rescue ~ # mount /dev/md2 /mnt/ root@rescue ~ # mount /dev/md1 /mnt/boot/ root@rescue ~ # ls -altr /mnt/ total 396K drwxr-xr-x. 2 root root 4.0K Apr 11 2018 srv drwxr-xr-x. 2 root root 4.0K Apr 11 2018 opt drwxr-xr-x. 2 root root 4.0K Apr 11 2018 mnt drwxr-xr-x. 2 root root 4.0K Apr 11 2018 media drwxr-xr-x. 2 root root 4.0K Apr 11 2018 home lrwxrwxrwx. 1 root root 8 May 14 2018 sbin -> usr/sbin lrwxrwxrwx. 1 root root 9 May 14 2018 lib64 -> usr/lib64 lrwxrwxrwx. 1 root root 7 May 14 2018 lib -> usr/lib lrwxrwxrwx. 1 root root 7 May 14 2018 bin -> usr/bin drwxr-xr-x. 13 root root 4.0K May 14 2018 usr drwx------. 2 root root 16K Feb 12 2019 lost+found drwxr-xr-x 2 root root 4.0K Feb 12 2019 boot drwxr-xr-x 2 root root 4.0K Feb 12 2019 storage1 drwxr-xr-x 2 root root 4.0K Feb 12 2019 sys drwxr-xr-x 2 root root 4.0K Feb 12 2019 dev drwxr-xr-x 2 root root 4.0K Feb 12 2019 prochttps://www.google.com/search?client=firefox-b-d&q=samsung+tab10+2020 drwxr-xr-x 3 root root 4.0K Feb 12 2019 run -rw-r-----. 1 root root 575 Feb 12 2019 installimage.conf -rw-r-----. 1 root root 13K Feb 12 2019 installimage.debug drwxr-xr-x. 20 root root 4.0K Feb 12 2019 var drwxr-xr-x. 85 root root 4.0K Nov 2 2019 etc -rw-r--r--. 1 root root 291K Nov 2 2019 .readahead drwxr-xr-x. 19 root root 4.0K Nov 2 2019 . dr-xr-x---. 6 root root 4.0K May 4 19:24 root drwxrwxrwt. 7 root root 4.0K May 8 14:14 tmp drwxr-xr-x 1 root root 160 May 8 16:57 .. root@rescue ~ # ls -altr /mnt/boot/ total 194M drwxr-xr-x. 3 root root 1.0K Sep 18 2017 efi -rw-------. 1 root root 49M Sep 18 2017 initramfs-0-rescue-9063ac396d784f4c997ceacdd0590c25.img -rwxr-xr-x. 1 root root 5.7M Sep 18 2017 vmlinuz-0-rescue-9063ac396d784f4c997ceacdd0590c25 -rw-------. 1 root root 3.4M Feb 1 2019 System.map-3.10.0-957.5.1.el7.x86_64 -rw-r--r--. 1 root root 149K Feb 1 2019 config-https://www.google.com/search?client=firefox-b-d&q=samsung+tab10+20203.10.0-957.5.1.el7.x86_64 -rw-r--r--. 1 root root 170 Feb 1 2019 .vmlinuz-3.10.0-957.5.1.el7.x86_64.hmac -rwxr-xr-x. 1 root root 6.4M Feb 1 2019 vmlinuz-3.10.0-957.5.1.el7.x86_64 -rw-r--r--. 1 root root 307K Feb 1 2019 symvers-3.10.0-957.5.1.el7.x86_64.gz drwx------. 2 root root 12K Feb 12 2019 lost+found drwxr-xr-x. 2 root root 1.0K Feb 12 2019 grub -rw-------. 1 root root 3.5M Oct 18 2019 System.map-3.10.0-1062.4.1.el7.x86_64 -rw-r--r--. 1 root root 150K Oct 18 2019 config-3.10.0-1062.4.1.el7.x86_64 -rw-r--r--. 1 root root 171 Oct 18 2019 .vmlinuz-3.10.0-1062.4.1.el7.x86_64.hmac -rwxr-xr-x. 1 root root 6.5M Oct 18 2019 vmlinuz-3.10.0-1062.4.1.el7.x86_64 -rw-r--r--. 1 root root 312K Oct 18 2019 symvers-3.10.0-1062.4.1.el7.x86_64.gz -rw-------. 1 root root 13M Nov 2 2019 initramfs-3.10.0-957.5.1.el7.x86_64kdump.img -rw-------. 1 root root 47M Nov 2md 2019 initramfs-3.10.0-1062.4.1.el7.x86_64.img -rw-------. 1 root root 46M Nov 2 2019 initramfs-3.10.0-957.5.1.el7.x86_64.img -rw-------. 1 root root 13M Nov 2 2019 initramfs-3.10.0-1062.4.1.el7.x86_64kdump.img dr-xr-xr-x. 6 root root 1.0K Nov 2 2019 . drwxr-xr-x. 19 root root 4.0K Nov 2 2019 .. drwx------. 5 root root 1.0K May 4 16:11 grub2
STEP 2) mount the dev, proc and sys relative to the root mount above and chroot in the root.
After chroot it is recommended to
root@rescue ~ # mount -o bind /dev /mnt/dev root@rescue ~ # mount -o bind /proc /mnt/proc root@rescue ~ # mount -o bind /sys /mnt/sys root@rescue ~ # chroot /mnt/ root@rescue / # cd root@rescue ~ # . /etc/profile
STEP 3)Install grub2
Unmount all mounted directories above and reboot.
root@rescue ~ # grub2-install /dev/sda Installing for i386-pc platform. Installation finished. No error reported. root@rescue ~ # grub2-install /dev/sdb Installing for i386-pc platform. Installation finished. No error reported. root@rescue ~ # exit root@rescue ~ # umount /mnt/boot root@rescue ~ # umount /mnt/dev root@rescue ~ # umount /mnt/proc root@rescue ~ # umount /mnt/sys root@rescue ~ # umount /mnt/ root@rescue ~ # reboot
* If you are using UEFI enabled boot you probably need more options for the grub installation
Something like that for the grub2 installation (but it is specific for your distro – the path for efi directory, just find it under /boot and put the right path – nothing special!):
grub-install --recheck --target=x86_64-efi --efi-directory=/boot/efi/ /dev/sda
Where does this error come from?
If you search the ID by part of it you will discover it under /dev/disk/by-id/, which is a link to md1, but still there is an error for missing device, because the kernel loaded the device as md-name-rescue:1. And if you reboot the kernel the old and wrong name won’t exists. As mentioned above this could have happened if you deleted partitions or made some disk layout changes (using parted?) on mounted or partitions in use and the kernel could loaded the partition changes.
[root@srv47 ~]# cd /dev/disk/by-id/ [root@srv47 by-id]# ls -altr total 0 drwxr-xr-x. 5 root root 100 4 May 9,14 .. lrwxrwxrwx. 1 root root 9 4 May 10,14 md-uuid-e4023626:e09f7c39:20ed5720:2ef1b5af -> ../../md0 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-uuid-ae63857c:b8d537f5:4c09ae48:48148f59 -> ../../md3 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-uuid-4a28f3a7:94dc6dc7:a40a7084:c21463d7 -> ../../md2 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-name-rescue:3 -> ../../md3 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-name-rescue:2 -> ../../md2 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-name-rescue:0 -> ../../md0 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-uuid-613f3f0b:b202bf03:a5664e17:b3d568a0 -> ../../md1 lrwxrwxrwx. 1 root root 9 4 May 10,14 md-name-rescue:1 -> ../../md1 drwxr-xr-x. 2 root root 680 4 May 12,16 . lrwxrwxrwx. 1 root root 9 8 May 12,01 wwn-0x500a075116bd3e33 -> ../../sda lrwxrwxrwx. 1 root root 9 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_171416BD3E33 -> ../../sda lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a075116bd3e33-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_171416BD3E33-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a075116bd3e33-part5 -> ../../sda5 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a075116bd3e33-part4 -> ../../sda4 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a075116bd3e33-part3 -> ../../sda3 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a075116bd3e33-part2 -> ../../sda2 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_171416BD3E33-part5 -> ../../sda5 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_171416BD3E33-part4 -> ../../sda4 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_171416BD3E33-part3 -> ../../sda3 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_171416BD3E33-part2 -> ../../sda2 lrwxrwxrwx. 1 root root 9 8 May 12,01 wwn-0x500a07511bb48b38 -> ../../sdb lrwxrwxrwx. 1 root root 9 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_18081BB48B38 -> ../../sdb lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a07511bb48b38-part5 -> ../../sdb5 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a07511bb48b38-part4 -> ../../sdb4 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a07511bb48b38-part3 -> ../../sdb3 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a07511bb48b38-part2 -> ../../sdb2 lrwxrwxrwx. 1 root root 10 8 May 12,01 wwn-0x500a07511bb48b38-part1 -> ../../sdb1 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_18081BB48B38-part5 -> ../../sdb5 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_18081BB48B38-part4 -> ../../sdb4 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_18081BB48B38-part3 -> ../../sdb3 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_18081BB48B38-part2 -> ../../sdb2 lrwxrwxrwx. 1 root root 10 8 May 12,01 ata-Micron_1100_MTFDDAK512TBN_18081BB48B38-part1 -> ../../sdb1
Содержание
- mduuid — disk not found
- error: disk mduuid not found
- Debian User Forums
- Grub rescue, will not boot from mdadm RAID, no such disk
- Grub rescue, will not boot from mdadm RAID, no such disk
- grub2: grub-install: error: disk mduuid not found even after the partition has bios_grub on
- STEP 1) Check the devices and mount the root and boot
- STEP 2) mount the dev, proc and sys relative to the root mount above and chroot in the root.
- STEP 3)Install grub2
- * If you are using UEFI enabled boot you probably need more options for the grub installation
- Where does this error come from?
- Leave a Reply Cancel reply
- Find Us
- About This Site
mduuid — disk not found
Всем привет! Решил проверить, что с рейдом-1 на одной тестовой машинке, рейд на двух дисках, рейд софтовый mdadm. Загружаюсь с одного диска — все ок. Загружаюсь со второго диска:
Пробовал установить груб повторно на дисках, для этого делал
Посмотрел uuid самого массива, через mdadm —detail /dev/md0 , такой же uuid прописан в grub.cfg. Груб второй версии.
Затирал диск перед установкой в массив с удалением суперблока, и нулями забивал, массив синкается успешно, но не могу загрузиться с одного диска.
Что еще можно глянуть? Спасибо.
покажи fdisk -l с обоих дисков
тут все ок. бывает иногда, что на одном из дисков mrb, а на другом gpt..
в /etc/mdadm.conf правильно прописано всё? не забыл пересобрать initramfs на всякий случай?
Загуглю, вроде зацепка. Отпишу позднее, спасибо.
в /etc/mdadm.conf правильно прописано всё?
Смущает что в mdadm.conf:
dpkg-reconfigure grub-pc — вот тут что пишет?
По советам из гугла грузанулся в liveCD, примонтировал / к /dev/md127, запустил переконфигурацию конфига груба, после его установил на каждый из дисков в массиве.
При загрузке с одного диска проблема сохранена. Опять что-то или упустил, или подводный камень какой-то неочевидный..
Ну судя по выхлопу, всё ок. А в диалоге выбора диск выбран второй?
У тебя похоже, что грузится не тот initrd, который нужен. В результате не может найти и md устройство. Но почему так — идей нет.
Сижу в grub rescue , по команде set вижу
По команде ls вижу
ругаются на Unknown command
Хотя insmod что-то готов принять, но потом ругается: error: disk ‘mduuid/63babd6180a15939e186260e5eebae53’ not found
Как проверить, тот или не тот initrd не разобрался, но старое ядро удалил, повторил процедуры, результат прежний.
А сколько у тебя всего дисков?
Всего 2 диска, оба в raid-1.
ПОсле установки сразу проверил работоспособность загрузки системы с каждого диска, убедился, все ок.
А вот проверил сейчас — и вот такая ситуация
Можно попробовать ещё запустить принудительно ресинк массива.
Но ведь уже собирал пару раз массив.
Тоже подумал об этом, запустил пока форматирование винта, потом попробую создать таблицу разделов вручную, а не копируя с рабочего винта, ну и потом поставлю на синхронизацию.
Отпишусь наверное в понедельник
Из rescue режима загрузился с одного проблемного диска, занулил его. Через fdisk указал метку linux raid autodetect , перезагрузился.
Потом загрузился с двумя дисками в rescue, собрал массив (он начал называться md0, как в системе и был, а не md127 в предыдущих итерациях по восстановлению) с одним «исправным» диском, добавил первый «проблемный» диск, массив синхронизировался, потом запустил dpkg-reconfigure grub-pc
Ошибок не выдал, и в итоге я успешно загрузился с «проблемного» диска!
Источник
error: disk mduuid not found
Столкнулся со следующей проблемой.
Имеет 2 массива RAID5 на mdadm c 3-мя накопителями. в первом расположен «/grub» во втором LVM с «/» и файлом подкачки.
Так же присутствует еще один диск для бэкапов вне массива.
После уменьшения раздела с «/» и уменьшения раздела LVM — система перестала грузится. Хотя по прежнему прекрасно монтируется.
При попытке загрузки системы выдается следующая ошибка:
Я так полагаю, изменилось имя у массива, по этом груб не может его собрать.
Причем могу просмотреть содержимое, когда он не ругается на файловую систему лишь на (hd0,msdos1) (hd2,msdos1) и (hd3,msdos1). Но показывает как пустой раздел.
Можно как нибудь решить данную проблему? Есть предположение, что нужно переписать содержимое grub.cfg с новым наименованием массива, но верно ли оно? И как его можно зафиксировать с livecd на дисках?
Если grub.cfg где-то внутри RAID, то помимо правки нужно ещё grub-install.
т.е. ядро и конфиг груба лежат на софтовом рейде? WTF? биос уже научился в линуксовый софт-рейд?
Добро пожаловать в GRUB2.
биос уже научился в линуксовый софт-рейд?
Ему не нужно ничего этого уметь.
Загрузить машину с livecd/liveusb с поддержкой lvm и raid, посмотреть uuid и partuuid и поправить конфиг.
можно в двух словах?
А кроме grub-install еще нужен какой нибудь параметр?
GRUB2 умеет любой софтрейд, в т.ч. страйп. Драйвер для RAID запихивается в какой-то stage (не в самый первый), туда же данные для сборки массива. Аналогично работает с LVM и dm-crypt.
Параметр чего? Команды? Да, нужно указать, на какой диск ставить (т.е. поочерёдно на все диски, нужные для загрузки). Проще всего через dpkg-reconfigure grub-pc (если у тебя Debian и не-EFI).
Grub грузится с MBR сектора диска. Это и позволяет помещать его внутрь рейда, но есть нюанс. В случае предупреждения выхода из строя RAID, я его распространяю на MBR всех дисков RAID. Это позволяет грузится системе, какой бы диск массива не был бы удален.
Именно так. Debian и должен быть не EFI
да, anonymous (20.02.2017 13:29:09), спасибо
Grub грузится с MBR сектора диска.
помню эту эпопею лет десять назад, когда в ограниченный объем кода пытались впихнуть драйвера разных файловых систем, чтобы потом найти на соответствующем разделе конфиг груба, ядро, initramfs, и уже грузить последнюю стадию
но теперь под файловой системой лежит еще один слой — soft-raid/LVM, и код с их поддержкой нужно разместить рядом с кодом, отвечающим за fs; неужели умудрились все это запихнуть в один MBR-сектор?
В GRUB2 данная функция реализована. Но положа руку на сердце, мне не удалось корректно ее реализовать. При вынимании 2-х из 3-х дисков RAID5 рушился.
Что бы исключить данную возможность я boot вывел за LVM раздел отдельным массивом.
Нет. На дисках с DOS-разметкой давно действует стандарт на отступ в 2048 секторов до первого раздела. Туда и ставится следующий стейдж загрузчика. На GPT такие хаки не приняты, там создаётся раздел с типом ef02 (обычно 2 Мб), куда и помещается жирная часть GRUB. Ну а на GPT с загрузкой через EFI таких проблем и вовсе нет, потому что загрузчик всегда является EFI-приложением, лежащим в ESP.
При вынимании 2-х из 3-х дисков RAID5 рушился.
На дисках с DOS-разметкой давно действует стандарт на отступ в 2048 секторов до первого раздела. Туда и ставится следующий стейдж загрузчика.
т.е. в MBR-секторе лежит код, который читает вот эти 2048 секторов (а это 2048*512=1M достаточно много для кучи разного кода)? наверно это как раз и называется 1.5 stage?
На GPT такие хаки не приняты, там создаётся раздел с типом ef02 (обычно 2 Мб), куда и помещается жирная часть GRUB.
ну, тут, я так понимаю, нужно заранее руками позаботиться об этом разделе на каждом диске, который потом в рейде участвовать будет? а при инсталляции груба нужно явно указать раздел для этой жирной части? а если не указать, то груб попытается найти подходящий по типу?
Ну а на GPT с загрузкой через EFI таких проблем и вовсе нет, потому что загрузчик всегда является EFI-приложением, лежащим в ESP.
про это знаю мало (погуглю при необходимости), но вроде бы под EFI тоже отдельный раздел создается, а значит там тоже места должно хватить под много кода
ну, вроде, пазл сложился в общих чертах, спасибо, народ!
Источник
Debian User Forums
Grub rescue, will not boot from mdadm RAID, no such disk
Grub rescue, will not boot from mdadm RAID, no such disk
#1 Post by ctrlbrk » 2014-09-19 03:59
I am running a 14 disk RAID 6 on mdadm behind 2 LSI SAS2008’s in JBOD mode (no HW raid) on Debian 7 in BIOS legacy mode.
Grub2 is dropping to a rescue shell complaining that «no such device» exists for «mduuid/b1c40379914e5d18dddb893b4dc5a28f».
Output from mdadm:
The UUID for md0 is `2c61b08d-cb1f-4c2c-8ce0-eaea15af32fb` so I do not understand why grub insists on looking for `b1c40379914e5d18dddb893b4dc5a28f`.
**Here is the output from `bootinfoscript` 0.61. This contains alot of detailed information, and I couldn’t find anything wrong with any of it:**
During the grub rescue an `ls` shows the member disks and also shows `(md/0)` but if I try an `ls (md/0)` I get an unknown disk error. Trying an `ls` on any member device results in unknown filesystem. The filesystem on the md0 is XFS, and I assume the unknown filesystem is normal if its trying to read an individual disk instead of md0.
I have come close to losing my mind over this, I’ve tried uninstalling and reinstalling grub numerous times, `update-initramfs -u -k all` numerous times, `update-grub` numerous times, `grub-install` numerous times to all member disks without error, etc.
I even tried manually editing `grub.cfg` to replace all instances of `mduuid/b1c40379914e5d18dddb893b4dc5a28f` with `(md/0)` and then re-install grub, but the exact same error of no such device mduuid/b1c40379914e5d18dddb893b4dc5a28f still happened.
I don’t have IPMI on this box so please forgive the embarrassing cell phone phone picture:
One thing I noticed is it is only showing half the disks. I am not sure if this matters or is important or not, but one theory would be because there are two LSI cards physically in the machine.
This last screenshot was shown after I specifically altered grub.cfg to replace all instances of `mduuid/b1c40379914e5d18dddb893b4dc5a28f` with `mduuid/2c61b08d-cb1f-4c2c-8ce0-eaea15af32fb` and then re-ran grub-install on all member drives. Where it is getting this old b1c* address I have no clue.
I even tried installing a SATA drive on /dev/sda, outside of the array, and installing grub on it and booting from it. Still, same identical error.
Источник
grub2: grub-install: error: disk mduuid not found even after the partition has bios_grub on
This tutorial is for all of us that has done everything by the book with parted and still they receive an error when installing grub2 to the boot sector!
The solution is relatively simple:
Boot from a rescue disk and reinstall grub from there!
The problem is that currently loaded kernel remembers the old device, which was deleted, and probably you won’t be able to fresh the metadata in the memory. In fact, if you receive this error when booted in a rescue disc you probably have done some changes on the layout of the disks or the partitions or the RAID devices and you must reboot the machine again and then JUST reinstall the grub.
Such problems could have happened if you deleted partitions or made some disk layout changes (using parted?) on mounted or partitions in use and the kernel could loaded the partition changes in memory. The parted reports the changes will take effect after system reboot.
STEP 1) Check the devices and mount the root and boot
They might be on the same device here they are on different MD devices (in the case, software array). md1 is the boot and md2 is the root.
STEP 2) mount the dev, proc and sys relative to the root mount above and chroot in the root.
After chroot it is recommended to
STEP 3)Install grub2
Unmount all mounted directories above and reboot.
* If you are using UEFI enabled boot you probably need more options for the grub installation
Something like that for the grub2 installation (but it is specific for your distro – the path for efi directory, just find it under /boot and put the right path – nothing special!):
Where does this error come from?
If you search the ID by part of it you will discover it under /dev/disk/by-id/, which is a link to md1, but still there is an error for missing device, because the kernel loaded the device as md-name-rescue:1. And if you reboot the kernel the old and wrong name won’t exists. As mentioned above this could have happened if you deleted partitions or made some disk layout changes (using parted?) on mounted or partitions in use and the kernel could loaded the partition changes.
Leave a Reply Cancel reply
Find Us
Address
101010010100 Main Street
Earth, EA 101010101010100
E-mail
info@ahelpme.com
Hours (in the TimeBank)
1000000:00:0:00:00 in time…
About This Site
Highly skilled hominins inhabited planet Earth a long long ago! And these hominins have a need to share some knowledge here.
Источник
-
-
May 25 2018, 19:25
- IT
- Технологии
- Cancel
Однажды я устанавливал Ubuntu Server 16 на старинную платформу IBM SR1500, на базе материнской платы Intel S5000PAL.
Sata-контроллер поддерживает только «fake-raid», я решил его включить, но выяснилось, что дистрибутив Ubuntu не содержит соответствующих драйверов. Тогда ничего не оставалось, как использовать программный массив mdadm. Во время процесса установки, установщик Linux предложил использовать уже имеющуюся разметку от Intel:
One or more drives containing MDADM containers (Intel/DDF RAID) have been found. Do you wish to activate these RAID devices?
Я согласился чтобы, не конфигурировать вручную(как выяснилось, это было большой ошибкой). Установщик смотнировал этот массив, установил все компонетны системы, но не смог установить grub.
После перезагрузки сервер отрапортовал, что загрузочных дисков не найдено.
На форме serverfault.com главным советом в таком случае была зачистка дисков от следов Intel DDF, с последующей полной переустановкой системы.
Я загрузился с live-CD, подмотировал raid и выполнил chroot, чтобы установить загрузчик самостоятельно.
Не повезло:
grub-install /dev/sda
grub-install: error: disk ‘mduuid/XXXXXXXX:XXXXXXXX:XXXXXXXX:XXXXXXXX’ not found
update-grub
grub-probe: error: disk ‘mduuid/XXXXXXXX:XXXXXXXX:XXXXXXXX:XXXXXXXX’ not found
Установка загрузчика не увенчалась успехом, зато загрузка дошла до стадии grub-консоли.
При вводе правильных параметров загрузки, система оказалась способной к запуску.
В моем случае команды выглядели так:
root (hd0,msdos1)
linux (hd0,msdos1)/boot/vmlinuz-4.4.0-116-generic root=/dev/md126p1 rw
initrd (hd0,msdos1)/boot/initrd.img-4.4.0-116-generic
Информацию по командам консоли grub2 найти не трудно, я хочу остановиться только на паметре ядра root, это путь к корневой директории, без него загрузка невозможна. Получается он так: в файле mdadm.conf установщик задал имя устройства dm-raid, у меня оно было md126, в файле fstab корневой раздел на массиве идет первым номером, значит имя блочного устройства корневого раздела будет /dev/md126p1.
Чтобы система могла загружаться самостоятельно, я создал вручную файл /boot/grub/grub.cfg на основе проверенных параметров загрузки:
set timeout=10
set default=0
menuentry «Ubuntu» {
root (hd0,msdos1)
linux (hd0,msdos1)/boot/vmlinuz-4.4.0-116-generic root=/dev/md126p1 rw
initrd (hd0,msdos1)/boot/initrd.img-4.4.0-116-generic
}
На всякий случай продублировал это содержимое в файле /boot/grub2/grub.cfg.
Все, этого оказалось достаточно для корректной загрузки.
П.С.
Через некоторое время мне пришлось заменить систему на Ubuntu 14 по причинам не связанным с загрузкой, заодно я очистил диски от разметки DDF, создал штатный soft-raid.
Кое-что по тематике использования DDF:
https://raid.wiki.kernel.org/index.php/DDF_Fake_RAID
Когда я писал этот пост нашел вот такое решение, и судя по всему, оно наиболее правильное, но возможности его проверить уже нет.
«Не удалось установить GRUB [РЕШЕНО]» http://forum.ubuntu.ru/index.php?topic=254351.0
GRUB2 boots, but gives «drive not found» error when attempting update
Server edition — Ubuntu 16.04, XFCE desktop
RAID 1 configuration with 1 hot spare — mdstat:Code:
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sda1[3] sdb1[4] sdc1[2](S) 14324 blocks super 1.2 [2/2] [UU] md1 : active raid1 sdc2[2](S) sda2[3] sdb2[4] 976745336 blocks super 1.2 [2/2] [UU] unused devices: <none>Today I updated the system in order to install about 3 months of updates, which froze halfway into the update (systemd? system-journal? something like that)— I didn’t write it down, figuring to re-boot and complete the upgrade. Long story short, the system took about 10 minutes to shut down, and upon reboot began to re-sync the RAID drives. I attempted the usual ‘sudo dpkg —configure -a’ to continue the upgrade, which worked, except for grub-pc and 3 other packages, which returned this worrying error message:
Code:
Setting up grub-pc (2.02~beta2-36ubuntu3.20) ... Generating grub configuration file ... grub-probe: error: disk `mduuid/0b332fe0048b87be574e721ad520ca94' not found. dpkg: error processing package grub-pc (--configure): subprocess installed post-installation script returned error exit status 1 Setting up friendly-recovery (0.2.31ubuntu2) ... Generating grub configuration file ... grub-probe: error: disk `mduuid/0b332fe0048b87be574e721ad520ca94' not found.If I try ‘sudo grub-probe /boot/grub’ on the identical (working) backup server, I get the response ‘ext2’ When I try it on this server I get the same error as when upgrading:
Code:
grub-probe: error: disk `mduuid/0b332fe0048b87be574e721ad520ca94' not found.Running ‘blkid’ gives the following output:
Code:
/dev/sda1: UUID="84fb6a65-5556-b6c4-3a00-42d3bdbbca0d" UUID_SUB="650b5441-ec83-1c59-a8fc-246c1acdeb7c" LABEL="drupal-server:0" TYPE="linux_raid_member" /dev/sda2: UUID="0b332fe0-048b-87be-574e-721ad520ca94" UUID_SUB="94674221-2a5f-f02d-c6dc-6c65f0fc0059" LABEL="drupal-server:1" TYPE="linux_raid_member" /dev/sdb1: UUID="84fb6a65-5556-b6c4-3a00-42d3bdbbca0d" UUID_SUB="a9d57793-f19c-4127-b9d0-ec81bd26eb4b" LABEL="drupal-server:0" TYPE="linux_raid_member" /dev/sdb2: UUID="0b332fe0-048b-87be-574e-721ad520ca94" UUID_SUB="d661c1db-8f1f-cf34-0587-0095b4950b7f" LABEL="drupal-server:1" TYPE="linux_raid_member" /dev/sdc1: UUID="84fb6a65-5556-b6c4-3a00-42d3bdbbca0d" UUID_SUB="be529f27-5b81-1915-a811-b47125255e7e" LABEL="drupal-server:0" TYPE="linux_raid_member" /dev/sdc2: UUID="0b332fe0-048b-87be-574e-721ad520ca94" UUID_SUB="1c2844c4-6988-3aee-c7b5-4ea1b611b8e5" LABEL="drupal-server:1" TYPE="linux_raid_member" /dev/md1: UUID="2db88bd0-5338-47d9-b766-5131a31b1716" TYPE="ext4" /dev/md0: UUID="08cb30f9-fdaf-4eb3-b85f-ed56835e41da" TYPE="swap"which tells me that the UUID for sda2 and sdb2 match what GRUB says it cannot find. When I checked the grub.cfg file, I found that the system had attempted to create a new file, but failed with a truncated version (grub.cfg.new) that never got re-named to grub.cfg. Here is a snippet from the beginning of the old (working) grub.cfg
Code:
set root='mduuid/0b332fe0048b87be574e721ad520ca94' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/0b332fe0048b87be574e721ad520ca94' 2db88bd0-5338-47d9-b766-5131a31b1716 else search --no-floppy --fs-uuid --set=root 2db88bd0-5338-47d9-b766-5131a31b1716And finally, (with apologies for the length) here are the results of running the BootInfo script:
Code:
Boot Info Script 0.61 [1 April 2012] ============================= Boot Info Summary: =============================== => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks in partition 112 for . => Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks in partition 97 for . => Grub2 (v1.99) is installed in the MBR of /dev/sdc and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks in partition 97 for . sda1: __________________________________________________________________________ File system: linux_raid_member Boot sector type: - Boot sector info: sda2: __________________________________________________________________________ File system: linux_raid_member Boot sector type: - Boot sector info: sdb1: __________________________________________________________________________ File system: linux_raid_member Boot sector type: - Boot sector info: sdb2: __________________________________________________________________________ File system: linux_raid_member Boot sector type: - Boot sector info: sdc1: __________________________________________________________________________ File system: linux_raid_member Boot sector type: - Boot sector info: sdc2: __________________________________________________________________________ File system: linux_raid_member Boot sector type: - Boot sector info: md/1: __________________________________________________________________________ File system: ext4 Boot sector type: - Boot sector info: Mounting failed: mount: /dev/md1 is already mounted or /tmp/BootInfo-Z3rZ3W1z/MDRaid/md/1 busy /dev/md1 is already mounted on / md/0: __________________________________________________________________________ File system: swap Boot sector type: - Boot sector info: ============================ Drive/Partition Info: ============================= Drive: sda _____________________________________________________________________ Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Partition Boot Start Sector End Sector # of Sectors Id System /dev/sda1 2,048 30,719 28,672 fd Linux raid autodetect /dev/sda2 * 30,720 1,953,523,711 1,953,492,992 fd Linux raid autodetect Drive: sdb _____________________________________________________________________ Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Partition Boot Start Sector End Sector # of Sectors Id System /dev/sdb1 2,048 30,719 28,672 fd Linux raid autodetect /dev/sdb2 * 30,720 1,953,523,711 1,953,492,992 fd Linux raid autodetect Drive: sdc _____________________________________________________________________ Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Partition Boot Start Sector End Sector # of Sectors Id System /dev/sdc1 2,048 30,719 28,672 fd Linux raid autodetect /dev/sdc2 * 30,720 1,953,523,711 1,953,492,992 fd Linux raid autodetect "blkid" output: ________________________________________________________________ Device UUID TYPE LABEL /dev/md0 08cb30f9-fdaf-4eb3-b85f-ed56835e41da swap /dev/md1 2db88bd0-5338-47d9-b766-5131a31b1716 ext4 /dev/sda1 84fb6a65-5556-b6c4-3a00-42d3bdbbca0d linux_raid_member drupal-server:0 /dev/sda2 0b332fe0-048b-87be-574e-721ad520ca94 linux_raid_member drupal-server:1 /dev/sdb1 84fb6a65-5556-b6c4-3a00-42d3bdbbca0d linux_raid_member drupal-server:0 /dev/sdb2 0b332fe0-048b-87be-574e-721ad520ca94 linux_raid_member drupal-server:1 /dev/sdc1 84fb6a65-5556-b6c4-3a00-42d3bdbbca0d linux_raid_member drupal-server:0 /dev/sdc2 0b332fe0-048b-87be-574e-721ad520ca94 linux_raid_member drupal-server:1 ================================ Mount points: ================================= Device Mount_Point Type Options /dev/md1 / ext4 (rw,relatime,errors=remount-ro,data=ordered)So there appears to be an error — «Mounting failed: mount: /dev/md1 is already mounted or /tmp/BootInfo-Z3rZ3W1z/MDRaid/md/1 busy
/dev/md1 is already mounted on /» unless this is an error caused by running the script from within an already mounted drive rather than from a USB or repair disk.Many, many thanks for anyone who can point me towards a solution.
Best
Darrell Eifert
Lane Memorial Library
Hampton, NH