F29 Cannot boot after configuring RAID1
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2019
    Location
    Toronto, Ontario, Canada
    Posts
    2
    Windows NT 10.0 Firefox 65.0

    F29 Cannot boot after configuring RAID1

    Hello all!

    Long time reader, first time poster... and a huge fan! This forum has saved my systems numerous times so thank you in advance to all the posters out there.

    I've worked my way into a bit of mess that I can't seem to solve so I thought I'd post the details and beg for some help.

    Hardware:
    • Asus P8Z77-V-LK motherboard with Intel RAID
    • 2x 4TB Seagate SATA harddrives



    The background:
    • F29 system - originally installed at F20 and upgraded over time with no issues
    • 2x 4TB harddrives originally set up with hardware RAID1 - worked fine with mdadm
    • I've had drives fail over the years and each time I've been able to replace the drive and the hardware took care of rebuilding the array
    • On the most recent failure, replacing the drive and starting the hardware rebuild didn't seem to work - hardware said the rebuild would continue in the OS but mdadm never showed the replacement drive coming back into the array so the rebuild never completed
    • I should have asked for help earlier but (long story short) I managed to convert the hardware RAID1 into a software RAID1 using the steps at https://blog.voina.org/fedora-22-lvm...rror-migration
    • The first reboot at step 13 worked fine... I thought I was out of the woods
    • By the time I rebooted at step 22, the system would not come up. No boot disk was recognized.


    I have tried several times to boot from a F29 install USB into recovery mode but I have not been successful in restoring the system to a bootable state.

    Before the last reboot, I was able to capture the following information:
    Code:
    # lsblk -f
    NAME               FSTYPE            LABEL                  UUID                                   MOUNTPOINT
    sda
    ├─sda1             linux_raid_member mythtv.raposo-ca.net:0 76be0ad1-507c-fa3d-3c86-c9c9651106cb
    │ └─md0            vfat                                     468E-AFCD                              /boot/efi
    ├─sda2             linux_raid_member mythtv.raposo-ca.net:1 ea810175-dacf-7fa0-d7f7-f1bdfbd33d9a
    │ └─md1            ext4                                     648e9fb5-c5c5-421f-b1d9-81c7f7e9d681   /boot
    └─sda3             linux_raid_member mythtv.raposo-ca.net:2 1c835b10-8aa3-b4b6-7220-28dea9ce4c49
      └─md2            LVM2_member                              45JMSi-0024-upOy-GUGu-IGWo-fmuK-ayXDFL
        ├─rootvg-root  ext4                                     e28f0373-14d4-4279-b6b5-8f3f0a882918   /
        ├─rootvg-home  ext4                                     83f5c206-f346-4974-afde-e1356d3c7f10   /home
        ├─rootvg-media ext4                                     fcc9f95d-b7c4-406f-82d4-165027ad3349   /media
        └─rootvg-page  swap                                     1884ee77-d89d-4404-b1dd-eca6728e59dc   [SWAP]
    sdb
    ├─sdb1             linux_raid_member mythtv.raposo-ca.net:0 76be0ad1-507c-fa3d-3c86-c9c9651106cb
    │ └─md0            vfat                                     468E-AFCD                              /boot/efi
    ├─sdb2             linux_raid_member mythtv.raposo-ca.net:1 ea810175-dacf-7fa0-d7f7-f1bdfbd33d9a
    │ └─md1            ext4                                     648e9fb5-c5c5-421f-b1d9-81c7f7e9d681   /boot
    └─sdb3             linux_raid_member mythtv.raposo-ca.net:2 1c835b10-8aa3-b4b6-7220-28dea9ce4c49
      └─md2            LVM2_member                              45JMSi-0024-upOy-GUGu-IGWo-fmuK-ayXDFL
        ├─rootvg-root  ext4                                     e28f0373-14d4-4279-b6b5-8f3f0a882918   /
        ├─rootvg-home  ext4                                     83f5c206-f346-4974-afde-e1356d3c7f10   /home
        ├─rootvg-media ext4                                     fcc9f95d-b7c4-406f-82d4-165027ad3349   /media
        └─rootvg-page  swap                                     1884ee77-d89d-4404-b1dd-eca6728e59dc   [SWAP]
    # fdisk -l
    Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 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: gpt
    Disk identifier: E57B9F6C-FC02-407A-AD30-5CD4BC6A666F
    
    Device       Start        End    Sectors  Size Type
    /dev/sda1     2048     526335     524288  256M Linux RAID
    /dev/sda2   526336    1050623     524288  256M Linux RAID
    /dev/sda3  1050624 7813726207 7812675584  3.7T Linux RAID
    
    
    Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 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: gpt
    Disk identifier: 9FC31E15-24C9-4AB8-A736-3145A408D800
    
    Device       Start        End    Sectors  Size Type
    /dev/sdb1     2048     526335     524288  256M Linux RAID
    /dev/sdb2   526336    1050623     524288  256M Linux RAID
    /dev/sdb3  1050624 7813726207 7812675584  3.7T Linux RAID
    
    
    Disk /dev/mapper/rootvg-root: 25 GiB, 26843545600 bytes, 52428800 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
    
    
    Disk /dev/mapper/rootvg-home: 256 MiB, 268435456 bytes, 524288 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
    
    
    Disk /dev/mapper/rootvg-media: 3.6 TiB, 3971901030400 bytes, 7757619200 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
    
    
    Disk /dev/md1: 255 MiB, 267386880 bytes, 522240 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
    
    
    Disk /dev/md0: 255 MiB, 267386880 bytes, 522240 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
    Disk identifier: 0x00000000
    
    
    Disk /dev/md2: 3.7 TiB, 3999954632704 bytes, 7812411392 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
    
    
    Disk /dev/mapper/rootvg-page: 896 MiB, 939524096 bytes, 1835008 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
    When I boot into recovery mode, mdadm only sees md2 (LVM). I have to run mdadm --assemble --scan for md0 and md1 to be discovered. Once that's done, cat /proc/mdstat shows all three arrays are healthy. I can mount everything up and do a chroot to access all of the data I expect to see. My attempts to fix the problem have taken me back to reinstalling grub2-efi-x64 and shim-x64. No dice.

    I've been able to run the bootinfoscript from https://sourceforge.net/projects/boo...foscript/0.61/ in recovery mode and posted the output to https://pastebin.com/7EpZgk5H Please note that in this case, sda and sdb are the 2x 4TB drives and sdc/sdd are USB drives that I had plugged into the system.

    Any suggestions on how to proceed? I want to get to a point where sda and sdb are completely mirrored (RAID1) and the system will be able to boot off either.

    Help!

    Thank you
    Gary

  2. #2
    Join Date
    Aug 2007
    Posts
    354
    Linux (Fedora) Firefox 61.0

    Re: F29 Cannot boot after configuring RAID1

    I do have some major questions. You have a newer EFI system using grub2-efi-x64 and shim-x64 while the tutorial is obviously for a legacy BIOS system as it instructs using grub-install to install grub to the drives MBR and doesn't mention an EFI system partition at all.

    If you are booting off of these drives where is your ESP ?

    I noticed you have two small 256 MiB partitions on each disk of type Linux RAID and have two small RAID1 arrays. Is one of these supposed to be your ESP and the other a too small /boot partition ? Fedora now recommends 1 GiB for /boot.

    ESP partitions need to be of type EF00 so they are recognized by the EFI firmware and all three partitions on both drives are of type fd for Linux RAID. I don't believe that the EFI system partition should be part of the Linux RAID at all. They need to preserve their partition type code of EF00. You can put the /boot and lvm partitions in RAID1 but the two ESPs should be outside. They can be synchronized with rsync whenever changes are made to the ESP which isn't often. They don't need to be part of a RAID.

    While its true that you can boot off of a RAID1 this is only for a legacy BIOS system as legacy BIOS is so primitive that it doesn't understand any type of partitioning and simply loads the second stage of grub through LBA commands.

    You claim the first reboot at step 13 worked fine. Were the ESP partitions part of a RAID then or just /boot ?

  3. #3
    Join Date
    Feb 2019
    Location
    Toronto, Ontario, Canada
    Posts
    2
    Windows NT 10.0 Firefox 65.0

    Re: F29 Cannot boot after configuring RAID1

    Hi amiga... thanks for the response... yes, my system is EFI and I had to venture off script a little when it came to updating grub. Perhaps this is part of the problem.

    First, though, I've made some progress... a very little bit of progress. You are correct that the 256 MiB partitions on each disk are indeed RAID1 partitions for /boot/efi and /boot (md0 and md1 respectively). After much Googling, I realized that the system was refusing to recognize md0 as a valid ESP because the superblock was at the beginning of the partition (1.2 format). I deleted and recreated md0 with a version 1.0 superblock at the end of the partition. The system now recognizes the ESP and will get me to a grub boot menu.

    Now the system boots to the grub menu but when I try to boot (from any kernel version) I get the same two errors:
    - error: ../../grub-core/loader/i386/efi/linux.c:211:/vmlinuz-4.19.13-300.fc29.x86_64 has invalid signature.
    - error: ../../grub-core/loader/i386/efi/linux.c:94: you need to load the kernel first.

    I've tried booting to a recovery prompt, mounting and chrooting and then attempting to run dracut.

    dracut -v -f vmlinuz-4.19.13-300.fc29.x86_64 4.19.13-300.fc29.x86_64

    dracut runs with some errors but a new vmlinuz file is created. I'm hoping this vmlinuz file is valid despite the errors.

    I can successfully reinstall grub2-efi-x64 and shim-x64 from the rpm files I brought over on a USB drive but grub2-mkconfig fails. I have a valid looking grub.cfg file but I'm not sure if the grub2-mkconfig is needed at this point. I say that it's valid looking because the UUIDs seem to correspond to valid/correct partitions.

    I can collect the exact error messages if you like. I'm frantically Googling around some more to get past this hurdle.

    Any thoughts?

    Thanks,
    Gary

  4. #4
    Join Date
    Aug 2007
    Posts
    354
    Linux (Fedora) Firefox 61.0

    Re: F29 Cannot boot after configuring RAID1

    After much Googling, I realized that the system was refusing to recognize md0 as a valid ESP because the superblock was at the beginning of the partition (1.2 format). I deleted and recreated md0 with a version 1.0 superblock at the end of the partition. The system now recognizes the ESP and will get me to a grub boot menu.
    Does this mean that the partition type code of EF00 has somehow been restored ? Please post the output of fdisk -l for sd[ab].

    Now the system boots to the grub menu but when I try to boot (from any kernel version) I get the same two errors:
    - error: ../../grub-core/loader/i386/efi/linux.c:211:/vmlinuz-4.19.13-300.fc29.x86_64 has invalid signature.
    - error: ../../grub-core/loader/i386/efi/linux.c:94: you need to load the kernel first.
    Do you have Secure Boot enabled ? These messages pop up if something hasn't been signed. However all vmlinuz kernels and modules that come from Fedora are signed with Fedora's key. If you managed to boot in EFI mode with your previous RAID configuration this means your previous vmlinuz kernels were all signed.

    I've tried booting to a recovery prompt, mounting and chrooting and then attempting to run dracut.
    dracut -v -f vmlinuz-4.19.13-300.fc29.x86_64 4.19.13-300.fc29.x86_64
    dracut runs with some errors but a new vmlinuz file is created. I'm hoping this vmlinuz file is valid despite the errors.
    These comments don't make sense. dracut generates the initramfs for a given kernel. It shouldn't create a new vmlinuz file.

    However if it is creating a new vmlinuz file that explains the problems you are having above. Any file you create won't be signed by Fedora which is why the kernel has an invalid signature. You would either need to create your own key to add to shim's keyring and sign all of your modules with it or simply turn secure boot off.

    Fedora along with Ubuntu is one of the few distros that support Secure Boot. The shim utility is signed with the UEFI third party key and the Fedora vmlinuz kernel and all of the modules are signed with Fedora's key. If you only use Fedora's kernel and its modules you don't have to sign anything and everything will work with Secure Boot. dracut should only generate a new initramfs data file. It shouldn't touch the vmlinuz file. You would need to find out what is happening and stop it or simply erase the 'new' vmlinuz file and use the vmlinuz file provided by Fedora.

    I can collect the exact error messages if you like.
    This would be helpful.
    Last edited by amiga; 11th February 2019 at 05:46 PM.

Similar Threads

  1. F16 boot partitions and RAID1 yet again
    By mikeyoleeno in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 29th January 2012, 08:24 PM
  2. F13 - boot problems with RAID1/LVM/dracut
    By Zerc in forum Using Fedora
    Replies: 1
    Last Post: 1st May 2011, 12:10 AM
  3. can't restore/boot from raid1 array
    By okcomputer44 in forum Using Fedora
    Replies: 1
    Last Post: 6th June 2008, 01:05 PM
  4. configuring RAID1 on FC4
    By Ganjah_Farmer in forum Servers & Networking
    Replies: 2
    Last Post: 23rd October 2006, 04:56 PM
  5. cannot boot raid1
    By BenCollver in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 28th September 2006, 02:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •