SW RAID-1 grub-install












0














I just changed /sda system disk in SW RAID using following steps, simply put:



sfdisk -d /dev/sdb | sfdisk /dev/sda
mdadm --manage /dev/md0 --add /dev/sda2


Now disk is initializing chcked by:



cat /proc/mdstat 


All looks fine



md0 : active raid1 sda2[2] sdb2[1]
244056192 blocks super 1.2 [2/2] [UU]
bitmap: 2/2 pages [8KB], 65536KB chunk


lsblk



sda                        8:0    0 232.9G  0 disk  
|-sda1 8:1 0 9M 0 part
`-sda2 8:2 0 232.9G 0 part
`-md0 9:0 0 232.8G 0 raid1
|-vg.system-lv.root 253:0 0 40G 0 lvm /
`-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache
sdb 8:16 0 232.9G 0 disk
|-sdb1 8:17 0 9M 0 part
`-sdb2 8:18 0 232.9G 0 part
`-md0 9:0 0 232.8G 0 raid1
|-vg.system-lv.root 253:0 0 40G 0 lvm /
`-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache


What iam worried about is:
Is there GRUB installed on sda1? I checked cfdisk /dev/sda and sda1 is set as type BIOS boot.
When i try to do



grub-install /dev/sda1 


i get error



grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.


Iam not really sure that way i am doing it is the right path, but iam sure that i need to make sure the server boots in case any of the 2 disks fails, it boots. So what would be the correct way to check/install grub on the new disk? I just updated initramfs, but i dont think thats all i need to do. The topic around grub is bit convoluted and all over the place and i cant pinpoint the "sure" way, as iam not facing any bug or unforeseen issue, just lack of exact knowledge.










share|improve this question



























    0














    I just changed /sda system disk in SW RAID using following steps, simply put:



    sfdisk -d /dev/sdb | sfdisk /dev/sda
    mdadm --manage /dev/md0 --add /dev/sda2


    Now disk is initializing chcked by:



    cat /proc/mdstat 


    All looks fine



    md0 : active raid1 sda2[2] sdb2[1]
    244056192 blocks super 1.2 [2/2] [UU]
    bitmap: 2/2 pages [8KB], 65536KB chunk


    lsblk



    sda                        8:0    0 232.9G  0 disk  
    |-sda1 8:1 0 9M 0 part
    `-sda2 8:2 0 232.9G 0 part
    `-md0 9:0 0 232.8G 0 raid1
    |-vg.system-lv.root 253:0 0 40G 0 lvm /
    `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache
    sdb 8:16 0 232.9G 0 disk
    |-sdb1 8:17 0 9M 0 part
    `-sdb2 8:18 0 232.9G 0 part
    `-md0 9:0 0 232.8G 0 raid1
    |-vg.system-lv.root 253:0 0 40G 0 lvm /
    `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache


    What iam worried about is:
    Is there GRUB installed on sda1? I checked cfdisk /dev/sda and sda1 is set as type BIOS boot.
    When i try to do



    grub-install /dev/sda1 


    i get error



    grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.


    Iam not really sure that way i am doing it is the right path, but iam sure that i need to make sure the server boots in case any of the 2 disks fails, it boots. So what would be the correct way to check/install grub on the new disk? I just updated initramfs, but i dont think thats all i need to do. The topic around grub is bit convoluted and all over the place and i cant pinpoint the "sure" way, as iam not facing any bug or unforeseen issue, just lack of exact knowledge.










    share|improve this question

























      0












      0








      0







      I just changed /sda system disk in SW RAID using following steps, simply put:



      sfdisk -d /dev/sdb | sfdisk /dev/sda
      mdadm --manage /dev/md0 --add /dev/sda2


      Now disk is initializing chcked by:



      cat /proc/mdstat 


      All looks fine



      md0 : active raid1 sda2[2] sdb2[1]
      244056192 blocks super 1.2 [2/2] [UU]
      bitmap: 2/2 pages [8KB], 65536KB chunk


      lsblk



      sda                        8:0    0 232.9G  0 disk  
      |-sda1 8:1 0 9M 0 part
      `-sda2 8:2 0 232.9G 0 part
      `-md0 9:0 0 232.8G 0 raid1
      |-vg.system-lv.root 253:0 0 40G 0 lvm /
      `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache
      sdb 8:16 0 232.9G 0 disk
      |-sdb1 8:17 0 9M 0 part
      `-sdb2 8:18 0 232.9G 0 part
      `-md0 9:0 0 232.8G 0 raid1
      |-vg.system-lv.root 253:0 0 40G 0 lvm /
      `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache


      What iam worried about is:
      Is there GRUB installed on sda1? I checked cfdisk /dev/sda and sda1 is set as type BIOS boot.
      When i try to do



      grub-install /dev/sda1 


      i get error



      grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.


      Iam not really sure that way i am doing it is the right path, but iam sure that i need to make sure the server boots in case any of the 2 disks fails, it boots. So what would be the correct way to check/install grub on the new disk? I just updated initramfs, but i dont think thats all i need to do. The topic around grub is bit convoluted and all over the place and i cant pinpoint the "sure" way, as iam not facing any bug or unforeseen issue, just lack of exact knowledge.










      share|improve this question













      I just changed /sda system disk in SW RAID using following steps, simply put:



      sfdisk -d /dev/sdb | sfdisk /dev/sda
      mdadm --manage /dev/md0 --add /dev/sda2


      Now disk is initializing chcked by:



      cat /proc/mdstat 


      All looks fine



      md0 : active raid1 sda2[2] sdb2[1]
      244056192 blocks super 1.2 [2/2] [UU]
      bitmap: 2/2 pages [8KB], 65536KB chunk


      lsblk



      sda                        8:0    0 232.9G  0 disk  
      |-sda1 8:1 0 9M 0 part
      `-sda2 8:2 0 232.9G 0 part
      `-md0 9:0 0 232.8G 0 raid1
      |-vg.system-lv.root 253:0 0 40G 0 lvm /
      `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache
      sdb 8:16 0 232.9G 0 disk
      |-sdb1 8:17 0 9M 0 part
      `-sdb2 8:18 0 232.9G 0 part
      `-md0 9:0 0 232.8G 0 raid1
      |-vg.system-lv.root 253:0 0 40G 0 lvm /
      `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache


      What iam worried about is:
      Is there GRUB installed on sda1? I checked cfdisk /dev/sda and sda1 is set as type BIOS boot.
      When i try to do



      grub-install /dev/sda1 


      i get error



      grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.


      Iam not really sure that way i am doing it is the right path, but iam sure that i need to make sure the server boots in case any of the 2 disks fails, it boots. So what would be the correct way to check/install grub on the new disk? I just updated initramfs, but i dont think thats all i need to do. The topic around grub is bit convoluted and all over the place and i cant pinpoint the "sure" way, as iam not facing any bug or unforeseen issue, just lack of exact knowledge.







      grub raid mdadm initramfs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 8 hours ago









      J B

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Install GRUB as MBR-"wide" boot loader so just /dev/sda, not its partition.






          share|improve this answer





















          • Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
            – J B
            7 hours ago










          • It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
            – poige
            7 hours ago










          • @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
            – fra-san
            6 hours ago













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492267%2fsw-raid-1-grub-install%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Install GRUB as MBR-"wide" boot loader so just /dev/sda, not its partition.






          share|improve this answer





















          • Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
            – J B
            7 hours ago










          • It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
            – poige
            7 hours ago










          • @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
            – fra-san
            6 hours ago


















          0














          Install GRUB as MBR-"wide" boot loader so just /dev/sda, not its partition.






          share|improve this answer





















          • Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
            – J B
            7 hours ago










          • It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
            – poige
            7 hours ago










          • @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
            – fra-san
            6 hours ago
















          0












          0








          0






          Install GRUB as MBR-"wide" boot loader so just /dev/sda, not its partition.






          share|improve this answer












          Install GRUB as MBR-"wide" boot loader so just /dev/sda, not its partition.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 7 hours ago









          poige

          3,9911542




          3,9911542












          • Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
            – J B
            7 hours ago










          • It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
            – poige
            7 hours ago










          • @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
            – fra-san
            6 hours ago




















          • Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
            – J B
            7 hours ago










          • It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
            – poige
            7 hours ago










          • @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
            – fra-san
            6 hours ago


















          Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
          – J B
          7 hours ago




          Thank you now i see Installing for i386-pc platform. Installation finished. No error reported. So this is all, i was worried to install it on the disk as whole, the GRUB is anyway in the 9M part? it autodetcts where it should be stored?
          – J B
          7 hours ago












          It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
          – poige
          7 hours ago




          It has some default settings described in its manual, but it's possible to customise (some of?) them as well. If you'd use GPT instead grub would require special boot partition with type 0xEF02.
          – poige
          7 hours ago












          @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
          – fra-san
          6 hours ago






          @JB On a BIOS system, GRUB is installed along with the partition table at the very beginning of the whole disk. If you try to install GRUB on a disk that has no partition table, or an empty one, it fails the way you have experienced. Same thing if you install to a partition (I'm assuming your /dev/sda1 doesn't host a PT). However, the whole GRUB cannot fit into the small dedicated space in the PT, so a substantial part of the boot loader is installed after it, if MBR is used, or in a dedicated "BIOS boot" partition, if GPT is used. And yes, grub-install auto-detect this.
          – fra-san
          6 hours ago




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492267%2fsw-raid-1-grub-install%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          濃尾地震

          How to rewrite equation of hyperbola in standard form

          No ethernet ip address in my vocore2