Skip to main content

How locate in which disk bootloader is installed

Comments

7 comments

  • cPRex Jurassic Moderator
    Hey there! This isn't really a cPanel issue, but we'll likely still have some ideas for you. From the output you've sent, I'm only seeing one disk there, but it's spread across two drives with the RAID configuration. In RAID level 1, the data is mirrored, so you'd have the same data on both drives. So, I think the answer to your question, is they both have the same data and would both include the bootloader. This is something you should confirm with your hosting provider or datacenter, though, before performing any destructive work.
    0
  • sparek-3
    Are they BIOS boot or UEFI? If they are BIOS boot then: [font="courier new">grub2-install /dev/sda grub2-install /dev/sdb Should ensure that grub is installed in the MBR for both disks. Best advice. Pull one disk, keep it around until you're sure that the server will boot with the other disk. If it doesn't then putting the pulled disk back in should boot the system like it normally does.
    0
  • cPRex Jurassic Moderator
    Yes, in theory, with this RAID configuration, you can pull either disk and things will work.
    0
  • srkn61
    My provider says it is your problem to find out in which device bootloader is installed, we can give you no information. But the OS Image was configured by Hetzner, so they should know it but they are not motivated to give the answer...
    0
  • ffeingol
    fdisk list (-l) on the devices "should" show you if there is a partition marked for boot. Software raid "normally" only puts the boot partition on the first drive in the pair and you have to take extra steps to actually put a boot partition on the 2nd drive. YMMV :-)
    0
  • sparek-3
    Ultimately you just really need to know how the server and drives are set up. Is it legacy BIOS boot with MBR? Legacy BIOS boot with GPT? Or is UEFI? If you have partitions larger than 2GB (? I think?) then it's GPT and not MBR. If the partition table is GPT, then it's either Legacy BIOS boot with a BIOS Boot partition or UEFI with an EFI partition. [font="courier new">fdisk -l /dev/sda fdisk -l /dev/sdb will tell you if the Disk Label Type is [font="courier new">gpt or or [font="courier new">dos (which is MBR) If it's [font="courier new">dos (MBR), then [font="courier new">grub2-install /dev/sda grub2-install /dev/sdb should install grub2 on each individual disk's MBR which would lead to the mirrored copy of /boot on each disk for loading the kernel. If it's [font="courier new">gpt then you have to figure out if it's BIOS boot or UEFI. Each disk (/dev/sda and /dev/sdb) should have a partition with type [font="courier new">BIOS boot if it's BIOS boot. They would each have a partition with type [font="courier new">EFI System if they are UEFI. If only one disk has a [font="courier new">BIOS boot or [font="courier new">EFI System then... you may be SOL. That's the only disk that will boot. That's a flawed RAID setup, because if that disk dies the server won't boot regardless of the state of the second disk. If both disks have a [font="courier new">BIOS boot partition, then I believe [font="courier new">grub2-install /dev/sda grub2-install /dev/sdb will still install the necessary loading instructions into that BIOS Boot partition to lead grub to /boot on each disk to load the kernel. If they are [font="courier new">EFI System then it gets a bit more complex. If they are [font="courier new">EFI System you would need to make sure the EFI partition on each drive is mounted individually. One of them will be mounted on [font="courier new">/boot/efi the other one would need to be mounted elsewhere ([font="courier new">/boot/efi2 is common) and the contents of [font="courier new">/boot/efi would need to be copied to that other EFI partition. You would then need to use [font="courier new">efibootmgr to setup that second disk to be bootable. It gets really, really complex - I'm just going to stop here because there's just a lot of variable that go into it.
    0
  • srkn61
    Hello the staff of Hetzner helped me, after replacing the sdb server is now booting without problem, thanks for all answers...
    0

Please sign in to leave a comment.