-2
  • In which platform/Environment/OS was grub bootloader programmed? Example the linux kernal was programmed on GCC compiler on MINIX OS, but how was grub made? Since grub is a bootloader (that loads the OS), how was it programmed without using an OS (Like we use IDE as a tool to make an application or any C program cannot execute without C compiler, similarly which tool was used to develop grub)

  • If I bought a new machine(64 bit intel system with UEFI) with no OS installed, is it possible for me to install grub bootloader (only the bootloader without any linux distro) in this machine.

  • If the above is possible then what are the steps to install grub directly without any os (Assume that I have an additional windows/Linux PC with me and I have the following src code of grub from here

  • https://git.savannah.gnu.org/git/grub.git/

  • https://ftp.gnu.org/gnu/grub/ )

With this how can I install the grub bootloader in a UEFI system without no os installed and no partition created (Imagine as if the PC is assembled and no OS is still installed but it has UEFI interface).

  1. If it is possible to install only the grub bootloader, then how can I install windows and any linux OS from the grub menu when I boot the system. (Assume that the PC that I am installing is a UEFI system and it has no OS installed on it)
torek
  • 448,244
  • 59
  • 642
  • 775
  • 1
    Grub *is* an OS. It is a stunted one, suitable only for booting a bigger / more-functional one, and it's therefore often just called a loader or bootstrap, but it has to provide all its own OS-like services. (Note that there's no reason to use the linux and git tags here.) – torek Oct 23 '20 at 02:54
  • GRUB was developed *after* the Linux kernel, the initial GRUB release was in 1995. Before GRUB, [LILO](https://en.wikipedia.org/wiki/LILO_(boot_loader)) was a common boot loader for Linux (at least on x86), the initial LILO release was in 1992. – rsc Nov 26 '20 at 02:35

2 Answers2

0

Now, I'm not an expert at the subject, but to my knowledge(never tried it) u might be able to do that, with something like arch linux. U can just install grub onto the drive but there wont be a place to store the config files if u dont have a proper installed OS. So I know this answer has been vague but in general, the answer is yes but a minimal OS is needed, i have seen with metasploitable, the OS is small, vulnerable and has the grub bootloader too maybe u could also install an OS and then change grub to not display any OS

also if I understand correctly, u do not need this, but just were wondering Or u plan on using it with windows, which to my knowledge, should work but with limited customizability(unless u install a linux distro with it) Thank You

Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
0

If you want try to customize grub2 from source code try Buildroot. You can configure grub2, see readme. grub2 source code is written in C and asm and use old-school GNU Automake build system, no cmake support.

DungeonLords
  • 107
  • 7