Jump to content

Talk:GNU GRUB

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

GRUB 2 has no stages

[edit]

The chapter Version 2 (GRUB) claims that there are stage 1, stage 1.5, and stage 2 in GRUB2. However, according to a short list from the GRUB 2 manual that sums up the changes between grub legacy and grub 2, "The image files (see Images) that make up GRUB have been reorganised; Stage 1, Stage 1.5, and Stage 2 are no more". --195.37.142.74 (talk) 13:33, 12 January 2019 (UTC)[reply]

Grub2 has very similar stages as Grub v1. Some parts were moved around, but the assembler code of early stages is mostly the same. While Grub v1 had a documented process of Stage 1 -> Stage 1.5 sector 0 -> Stage 1.5 remaining sectors -> Stage 2 -> loading config, Grub2's process is not documented in such detail. Reading the code reveals the Grub v1 stages can be mapped roughly to: MBR (boot.img) -> core.img sector 0 -> core.img remaining sectors -> normal.mod -> loading config, additional modules

Grub v1 and 2 also has 4 stages, but named in a different way. The stages are different in the way they load the next stage. 1st stage looks for 2nd stage in *one* fixed LBA sector. 2nd stage loads 3rd from *more* fixed LBA sectors (called a blocklist in Grub documentation, or extents in recent filesystems). 3rd stage loads 4th, and the config from a file record identified by partition number and file name.

The 1st and 2nd stages are necessary because the Legacy BIOS boot process has too little space (one sector) for a filesystem driver written in C. Even the blocklist of the 3rd stage did not fit in the 1st stage, making 2nd stage necessary. These stages expect that the next stage is not moved on the disk. If it's relocated, then the boot will fail without error message printed. This is why Grub2 discourages the use of blocklists in partitions, where defragmenting can move blocks. 3rd stage has just enough space for the necessary filesystem driver(s) to load modules and the config. Note that 3rd stage can also fail if the partition's index containing the modules is changed. This happens unexpectedly if it's a logical partition and another logical partition before it is removed.

This process is much simpler and safer on UEFI systems: UEFI -> /EFI/<distro>/grubx64.efi (or similar, this matches core.img) -> config. No need for the crammed and fragile early stages.

Mongusius (talk) 14:32, 30 March 2019 (UTC)[reply]

GRUB BOOT made clearer

[edit]

GRUB version 1

The MBR on a hard drive is small (512 bytes) and contains enough machine code to can chain boot GRUB stage 1 from another boot sector such as a partition's volume boot record. Given the small size of a boot sector, Stage 1 can do little more than load the next stage of GRUB by loading a few disk sectors from a fixed location near the start of the disk (within 1024 cylinders). Bootloaders other than GRUB can be placed in the MBR, such as LILO,boot0,EFI.

Stage 1 can load Stage 2 directly, but it is normally set up to load Stage 1.5. GRUB Stage 1.5 is located in the first 30 kilobytes of hard disk immediately following the MBR and before the first partition. If this space is not available (Unusual partition table, special disk drivers, GPT or LVM disk) the install of Stage 1.5 will fail. The stage 1.5 image contains filesystem specific drivers. This enables stage 1.5 to directly load stage 2 from a known location in the filesystem, for example from /boot/grub. Stage 2 will then load the default configuration file and any other modules needed.

Chaney44145 (talk) 13:29, 25 July 2012 (UTC)[reply]

Category "Research project"??

[edit]

Is that adequate? —Preceding unsigned comment added by 87.174.124.55 (talk) 02:53, 31 May 2010 (UTC)[reply]

GRUB version 1

[edit]

It would be worth noting that usually stage 2 is located under /boot/grub, and simply named "stage2". We know where stage 1 is (MBR), we know stage 1.5 (within the first 63 sectors), but not stage 2. — Preceding unsigned comment added by Raghu Udiyar (talkcontribs) 09:51, 9 November 2011 (UTC)[reply]

GRUB vs. GRUB2

[edit]

The external link to the GRUB2 home page appears broken. From what I can see, the primary GRUB home page now refers to GRUB2. The older version is called "GRUB Legacy". I propose adjusting the external links, though this may imply more significant changes to the article as a whole. Eric Petrich (talk) 18:12, 11 June 2010 (UTC)[reply]

I suggest merging "Development" with "History" in some fashion. Also, for the section on "major distributions", Arch Linux has dropped Grub Legacy and made Grub2 officially supported, though it is only one option with Syslinux. Umma Kynes 08:08, 25 August 2012 (UTC)

GRUB kernel type

[edit]

I came here after microkernel article said Grub was a microkernel(???). Send me a note if there is any truth to that. I think they mistook Grub for Hurd which sound alike(?). GRUB is an IBM PC BIOS Interrupt 13 based bootloader, as described by the "bootsector" analogy. From late 1990's on Interrupt 19 service were expected to be supported for boot services. GRUB wiki complain that an EFI compatible Grub can't be created because of Microsoft FAT licensing. However EFI specs do not require FAT to install an OS, but Microsoft does require FAT EFI loader to load Windows/DOS. See http://www.intel.com/content/www/us/en/architecture-and-technology/unified-extensible-firmware-interface/efi-specifications-general-technology.html (from http://msdn.microsoft.com/en-us/library/windows/hardware/gg463075 ). Shjacks45 (talk) 21:50, 16 March 2012 (UTC)[reply]

Grub (v1 and 2 too) is more comparable to a Unikernel: it runs only in Ring 0, and there is no userspace implemented. It's also similar to Monolithic kernels: modules (hardware, network and filesystem drivers, the OS loaders and even the Grub menu) are loaded to the same address space as the kernel, like modules in the Linux Kernel. Note that Grub was not designed as an Operating system, but a bootloader, that needed a few operating system features to be able to accomplish its task, therefore it has no "official" categorization.

To distinguishing common kernel types:

Mongusius (talk) 13:43, 30 March 2019 (UTC)[reply]

Grub picture is obsolete?

[edit]

Newly installed modern grub shows some welcome text and then the prompt "grub>". So is this picture in the article showing the menu obsolete? Yurivict (talk) 07:12, 15 September 2012 (UTC)[reply]

You haven't defined a menu yet. If "grub.cfg" is present, and defines a boot menu, you get something similar to the screen shot. Imaginos1892 October 9 2012 — Preceding unsigned comment added by 72.37.244.20 (talk) 20:14, 9 October 2012 (UTC)[reply]

grub1 config location

[edit]

GRUB's config is menu.lst as is written in it's sources. grub.conf is often connected as a symlink to menu.lst, this causes some problems in situations when link breaks whuch may result in either broken grub config or with two config files without obvious specification which one is actually used. — Preceding unsigned comment added by 84.47.144.106 (talk) 06:38, 31 January 2013 (UTC)[reply]

Grub version used in Ubuntu 10.04?

[edit]
Grub version 1 is still fairly prevalent in older -- but still supported -- releases, e.g., Ubuntu 10.04, CentOS 5.

According to this page, Grub2 has been the default for Ubuntu since Karmic (9.10) - 173.180.59.229 (talk) 01:16, 4 March 2013 (UTC)[reply]

The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
The result of this discussion was not to merge. — Dsimic (talk | contribs) 20:15, 18 November 2014 (UTC)[reply]

I'm proposing that Boot Repair Disk be merged into this article. I don't think it warrants its own article, although it seems sufficiently notable to be mentioned alongside the mention of boot-repair (the package that's the entire purpose of the disk) in the "Other utilities" section of GNU GRUB. —me_and 11:07, 2 April 2013 (UTC)[reply]

Boot-repair-disk can also repair MsWindows-bootloading problems. It's not focused solely on grub and fits very well to be listed with other boot tools, such as on http://en.wikipedia.org/wiki/List_of_live_CDs . Grub is not a tool by design and wouldn't be able to be referenced as a fixable boot-tool. It would be awkward to list this tool from a grub sub-section via list_of_live_cds. I believe it can be mentioned of from the grub wikipage because there's a strong correlation, but the boot-repair-disk can also fix non-grub problems. Swestlake (talk) 06:45, 3 April 2013 (UTC)[reply]
Agreed, it wouldn't be that great to merge Boot Repair Disk into the GNU GRUB § Other utilities section. — Dsimic (talk | contribs) 20:11, 18 November 2014 (UTC)[reply]
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
[edit]

Hello fellow Wikipedians,

I have just modified 3 external links on GNU GRUB. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 21:12, 14 September 2017 (UTC)[reply]

[edit]

Hello fellow Wikipedians,

I have just modified 3 external links on GNU GRUB. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 16:23, 9 October 2017 (UTC)[reply]

[edit]

Hello fellow Wikipedians,

I have just modified one external link on GNU GRUB. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 13:25, 9 December 2017 (UTC)[reply]

Bloat in booting section?

[edit]

There's a lot of info in the section about booting that feels like it should really be linked to the original pages, instead of placed on this page. What do my fellow wikipedians think? 180.66.165.245 (talk) 14:59, 21 July 2018 (UTC)[reply]

Indeed it's out-of-place here. Imo Grub needs its own wiki, where all this information can be shared, but the homepage is not equipped for this purpose. The only alternative, distribution wikis have a lot of information, but mostly practical (command lines) and geared towards the distro, while the information on this page is analytical. I haven't found a better, established alternative. Anyway, I've added direct links to 4 distro wiki pages with the most useful information to section "How-Tos and troubleshooting". — Mongusius (talk) 18:57, 30 March 2019 (UTC)[reply]

Version zero vs version one

[edit]

Either this article is incorrect, or there should be some clarification whether Grub Legacy is known as both "version zero" and "version one".

"Two major versions of GRUB are in common use: GRUB version 1, called GRUB legacy, ..."

Two sentences later...

Section: "Version 0 (GRUB Legacy)"

...later in the article...

"GRUB version 1 (also known as "GRUB Legacy") is no longer under development and is being phased out" Gwideman (talk) 07:19, 4 August 2019 (UTC)[reply]

talk about grub crypto module, coreboot payload, etc

[edit]

grub can do a lot more than most people think, it has lots of filesystem drivers and can run on bare metal as a coreboot payload in some cases.

also things like built-in crypto: LUKSv1 and v2(newer key deriv not supported at present), GPG signature verification(to an extent) etc.

For example Debian has this guide: https://cryptsetup-team.pages.debian.net/cryptsetup/encrypted-boot.html

Might be useful as a stub within the article, perhaps referencing the coreboot article. Libreleah (talk) 04:58, 23 June 2023 (UTC)[reply]

Moved "GNU operating system" to talk

[edit]

I moved this sentence to talk: "The GNU operating system uses GNU GRUB as its boot loader, as do most Linux distributions and the Solaris operating system on x86 systems, starting with the Solaris 10 1/06 release." 1) GNU is a set of packages, not an operating system. 2) The prior sentence is sufficient. The prior sentence says, "It is predominantly used for Unix-like systems." Timhowardriley (talk) 05:09, 18 July 2023 (UTC)[reply]