После некоторого шаманства с RAID перестал загружатся дебиан.
Конфигурация такова: есть 4 диска sda, sdb, sdc, sdd и 1 RAID6 в который входят эти диски(потом я удалил 2). Ранее(когда не было raid) система нормально загружалась через sda, на котором находился grub.
После добавления 4 дисков к массиву при загрузке выдает такое сообщение «invalid arch independent ELF magic».
Что я делал в grub rescue
ls
(hd0) (hd0,msdos5) (hd0,msdos1) (hd1) (hd1,msdos5) (hd1,msdos1) (hd2) (hd2,msdos5) (hd2,msdos1) (hd3) (hd3,msdos5) (hd3,msdos1) (md/0)
set prefix=(md/0)/boot/grub
set root=(md/0)
ls /boot/grub
... i386-pc/ locale/ fonts/ grub.cfg ...
insmod ext2
insmod normal
error: invalid arch independent ELF magic
Потом загружался через live-cd kali, запускал RAID массив, монтировал его и пытался восстановить grub
mdadm -A --scan /dev/md0 /dev/sda1
mdadm: /dev/md/0 has been started with 2 drives (out of 4)
cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active (auto-read-only) raid6 sdd1[4] sdc1[2]
4190208 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/2] [U_U_]
mount /dev/md0 /mnt
apt-get install grub-pc
grub-probe: error: failed to get canonical path of `overlay'.
grub-probe: error: failed to get canonical path of `overlay'.
grub-probe: error: failed to get canonical path of `overlay'.
grub-install --root-directory=/mnt /dev/md0
Installing for i386-pc platform.
grub-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..
grub-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..
grub-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..
grub-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
Дальше не знаю что делать
вывод fdisk -l
Disk /dev/sda: 3 GiB, 3221225472 bytes, 6291456 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x866231b5
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 4196351 4194304 2G 83 Linux
/dev/sda2 4198398 6289407 2091010 1021M 5 Extended
/dev/sda5 4198400 6289407 2091008 1021M 82 Linux swap / Solaris
Disk /dev/sdc: 3 GiB, 3221225472 bytes, 6291456 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x866231b5
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 4196351 4194304 2G 83 Linux
/dev/sdc2 4198398 6289407 2091010 1021M 5 Extended
/dev/sdc5 4198400 6289407 2091008 1021M 82 Linux swap / Solaris
Disk /dev/sdb: 3 GiB, 3221225472 bytes, 6291456 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x866231b5
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 4196351 4194304 2G 83 Linux
/dev/sdb2 4198398 6289407 2091010 1021M 5 Extended
/dev/sdb5 4198400 6289407 2091008 1021M 82 Linux swap / Solaris
Disk /dev/sdd: 3 GiB, 3221225472 bytes, 6291456 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x866231b5
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 4196351 4194304 2G 83 Linux
/dev/sdd2 4198398 6289407 2091010 1021M 5 Extended
/dev/sdd5 4198400 6289407 2091008 1021M 82 Linux swap / Solaris
Disk /dev/loop0: 752.14 MiB, 788676608 bytes, 1540384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md0: 3.102 GiB, 4290772992 bytes, 8380416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
вывод lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0 squashfs 0 100% /usr/lib/live/mount/rootfs/filesystem.squashfs
sda
├─sda1 linux_raid_member debian:0 8cb56d09-785b-65db-d7b6-fae1f53ff0f4
├─sda2
└─sda5 swap 80ef77ee-860d-4d2d-b60f-79e922fbd0ad
sdb
├─sdb1 linux_raid_member debian:0 8cb56d09-785b-65db-d7b6-fae1f53ff0f4
├─sdb2
└─sdb5 swap 80ef77ee-860d-4d2d-b60f-79e922fbd0ad
sdc
├─sdc1 linux_raid_member debian:0 8cb56d09-785b-65db-d7b6-fae1f53ff0f4
│ └─md0 ext4 dc2f4298-25af-4bda-abbf-a3c0a8fc9592 873.2M 49% /mnt
├─sdc2
└─sdc5 swap 80ef77ee-860d-4d2d-b60f-79e922fbd0ad
sdd
├─sdd1 linux_raid_member debian:0 8cb56d09-785b-65db-d7b6-fae1f53ff0f4
│ └─md0 ext4 dc2f4298-25af-4bda-abbf-a3c0a8fc9592 873.2M 49% /mnt
├─sdd2
└─sdd5 swap 80ef77ee-860d-4d2d-b60f-79e922fbd0ad
sr0 iso9660 Kali Live 2019-08-27-11-08-45-00 0 100% /run/live/medium