Does Grub have an OS or drivers of its own?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I've been reading the Grub intro from Dedoimedo and despite being an excellent guide it raised some more questions:



Does Grub rely on any OS in its implementation? I know it's possible to configure it to load Windows, Linux, FreeBSD, etc. So I'm guessing it doesn't rely on any kernel (even a special-made minimal Linux kernel) right? In that case, how can it show a graphical interface, access whatever media to load the kernel, etc. all in "20-30 KB of binary"?



Update: one follow up question: what are all those vmlinuz files in the /boot dir? Are those in any way related to Grub?










share|improve this question



























    up vote
    0
    down vote

    favorite












    I've been reading the Grub intro from Dedoimedo and despite being an excellent guide it raised some more questions:



    Does Grub rely on any OS in its implementation? I know it's possible to configure it to load Windows, Linux, FreeBSD, etc. So I'm guessing it doesn't rely on any kernel (even a special-made minimal Linux kernel) right? In that case, how can it show a graphical interface, access whatever media to load the kernel, etc. all in "20-30 KB of binary"?



    Update: one follow up question: what are all those vmlinuz files in the /boot dir? Are those in any way related to Grub?










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I've been reading the Grub intro from Dedoimedo and despite being an excellent guide it raised some more questions:



      Does Grub rely on any OS in its implementation? I know it's possible to configure it to load Windows, Linux, FreeBSD, etc. So I'm guessing it doesn't rely on any kernel (even a special-made minimal Linux kernel) right? In that case, how can it show a graphical interface, access whatever media to load the kernel, etc. all in "20-30 KB of binary"?



      Update: one follow up question: what are all those vmlinuz files in the /boot dir? Are those in any way related to Grub?










      share|improve this question















      I've been reading the Grub intro from Dedoimedo and despite being an excellent guide it raised some more questions:



      Does Grub rely on any OS in its implementation? I know it's possible to configure it to load Windows, Linux, FreeBSD, etc. So I'm guessing it doesn't rely on any kernel (even a special-made minimal Linux kernel) right? In that case, how can it show a graphical interface, access whatever media to load the kernel, etc. all in "20-30 KB of binary"?



      Update: one follow up question: what are all those vmlinuz files in the /boot dir? Are those in any way related to Grub?







      grub






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 min ago









      Rui F Ribeiro

      37.3k1374118




      37.3k1374118










      asked Mar 31 '17 at 8:14









      AlexStack

      3562510




      3562510




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Right, Grub is standalone and implements all its own drivers. It does take rather more than “20-30 KB of binary” to do this though; my /boot/grub/i386-pc directory contains 2.4 MiB’s worth of modules (which is where all the Grub features are implemented).



          The vmlinuz files in /boot are the various Linux kernels you have installed. Grub doesn’t need them, they’re what Grub loads to boot Linux (along with an initramfs).






          share|improve this answer






















          • Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
            – AlexStack
            Mar 31 '17 at 9:31











          • Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
            – Philippos
            Mar 31 '17 at 11:54










          • I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
            – Stephen Kitt
            Mar 31 '17 at 11:59










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f355004%2fdoes-grub-have-an-os-or-drivers-of-its-own%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Right, Grub is standalone and implements all its own drivers. It does take rather more than “20-30 KB of binary” to do this though; my /boot/grub/i386-pc directory contains 2.4 MiB’s worth of modules (which is where all the Grub features are implemented).



          The vmlinuz files in /boot are the various Linux kernels you have installed. Grub doesn’t need them, they’re what Grub loads to boot Linux (along with an initramfs).






          share|improve this answer






















          • Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
            – AlexStack
            Mar 31 '17 at 9:31











          • Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
            – Philippos
            Mar 31 '17 at 11:54










          • I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
            – Stephen Kitt
            Mar 31 '17 at 11:59














          up vote
          2
          down vote



          accepted










          Right, Grub is standalone and implements all its own drivers. It does take rather more than “20-30 KB of binary” to do this though; my /boot/grub/i386-pc directory contains 2.4 MiB’s worth of modules (which is where all the Grub features are implemented).



          The vmlinuz files in /boot are the various Linux kernels you have installed. Grub doesn’t need them, they’re what Grub loads to boot Linux (along with an initramfs).






          share|improve this answer






















          • Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
            – AlexStack
            Mar 31 '17 at 9:31











          • Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
            – Philippos
            Mar 31 '17 at 11:54










          • I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
            – Stephen Kitt
            Mar 31 '17 at 11:59












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Right, Grub is standalone and implements all its own drivers. It does take rather more than “20-30 KB of binary” to do this though; my /boot/grub/i386-pc directory contains 2.4 MiB’s worth of modules (which is where all the Grub features are implemented).



          The vmlinuz files in /boot are the various Linux kernels you have installed. Grub doesn’t need them, they’re what Grub loads to boot Linux (along with an initramfs).






          share|improve this answer














          Right, Grub is standalone and implements all its own drivers. It does take rather more than “20-30 KB of binary” to do this though; my /boot/grub/i386-pc directory contains 2.4 MiB’s worth of modules (which is where all the Grub features are implemented).



          The vmlinuz files in /boot are the various Linux kernels you have installed. Grub doesn’t need them, they’re what Grub loads to boot Linux (along with an initramfs).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 31 '17 at 9:47

























          answered Mar 31 '17 at 8:18









          Stephen Kitt

          152k23338406




          152k23338406











          • Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
            – AlexStack
            Mar 31 '17 at 9:31











          • Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
            – Philippos
            Mar 31 '17 at 11:54










          • I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
            – Stephen Kitt
            Mar 31 '17 at 11:59
















          • Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
            – AlexStack
            Mar 31 '17 at 9:31











          • Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
            – Philippos
            Mar 31 '17 at 11:54










          • I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
            – Stephen Kitt
            Mar 31 '17 at 11:59















          Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
          – AlexStack
          Mar 31 '17 at 9:31





          Good to know. I'm curious what are the vmlinuz images in /boot? Added it as an "Update" question to the original question so feel free to edit the answer if you see fit :)
          – AlexStack
          Mar 31 '17 at 9:31













          Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
          – Philippos
          Mar 31 '17 at 11:54




          Really all drivers? I don't know much about Grub, but I've been writing a bootloader for an embedded device as fast and compact uboot replacement. Of course I had to write some drivers, but not all, as there was some bootROM code executed by the CPU first, doing things like initializing the memory where my bootloader lives. I can imagine that Grub also relies on those lowest-level drivers, implemented in the BIOS or UEFI or whatever may be up to date in today's PCs.
          – Philippos
          Mar 31 '17 at 11:54












          I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
          – Stephen Kitt
          Mar 31 '17 at 11:59




          I meant in opposition to using Linux drivers (or something else). The Grub drivers do use the BIOS in some cases; for example biosdisk.c uses the BIOS to access disks, but there’s also pata.c to directly access PATA disks (allowing Grub to access drives which the BIOS can’t — which was useful on many older systems).
          – Stephen Kitt
          Mar 31 '17 at 11:59

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f355004%2fdoes-grub-have-an-os-or-drivers-of-its-own%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Christian Cage

          How to properly install USB display driver for Fresco Logic FL2000DX on Ubuntu?