‪‪LINUX‬,‪ GNU GRUB‬‬‬‬‬‬‬‬‬‬‬‬

  • GNU GRUB is an intense open source, working framework free, boot loader for Intel building design PCs. It can be incorporated on, introduced on, and boot FreeBSD, Linux and OpenBSD, and additionally numerous other working frameworks. It can boot frameworks from any hard circle or floppy plate in the framework. In the event that the BIOS and working framework don't anticipate it, it can boot frameworks from any hard plate segment including past 1024 barrels and including any FreeBSD's disklabel parcel or Linux's developed allotment. (NOTE: If utilized with OpenBSD, make sure to utilize the OpenBSD related summons introduced beneath; the official GRUB documentation is just about three years obsolete as respects OpenBSD and the case charges are off by a long shot to what works.)
  • An especially helpful element for testing double and multi boot introduces is that it can without much of a stretch be introduced on a bootable floppy which can be utilized to test the charge linguistic structure important to stack every framework. This should be possible without submitting any progressions to plate, particularly not overwriting the hard circle's MBR. Once the fundamental summons are resolved with utilization of the floppy, they can be spared in an arrangement document on any of the frameworks to be booted and the MBR redesigned with a duplicate of GRUB that knows where to discover the design record and different pieces it needs.
  • Boot Grouping The primary segment of the first hard circle in a framework has, notwithstanding the allotment table, executable code that is the first phase of the boot process or the IPL (starting system load) code. The standard code is what's made when the DOS "fdisk/mbr" order is executed. At the point when the BIOS settings are such that the hard circle is set to boot (or the hard plate comes after the floppy however no floppy plate is in the drive), the BIOS passes control to the IPL or first stage code. The standard code loads, figures out which is the dynamic parcel and passes control to executable code in or close to the first area of the dynamic segment. What happens next will rely on upon the working framework.
  • With the more established DOSs the genuine executable center of the OS was situated at the absolute starting point of the circle and stacked specifically from the first stage loader. All the more regularly a second stage boot system will stack that thus knows where to discover the part or center segments of the OS and afterward begin them. Whenever GRUB or another boot loader is introduced, the boot loader's code will supplant the standard IPL code. It needs to fit into the same 512 bytes imparted to the parcel table. The principle distinction between the boot loader and the standard IPL code is the place control goes next. On account of GRUB, control is gone to GRUB's stage1_5 loader. At the point when a hard plate or floppy is introduced with GRUB as a boot loader, the fitting stage1_5 document, which is record framework particular and between 8 - 11K, is put on the first track of the circle gadget, beginning at area 2.
  • Stage1_5 is likely altered by the setup procedure to incorporate the GRUB root gadget that will be talked about next in the GRUB Introduce area. Stage1_5 then loads stage2 from GRUB's root gadget. The stage2 loader is 120K and too extensive to fit in the first track of a circle. The grub.conf arrangement document is additionally put away on the GRUB root gadget. At the point when the stage2 runs, it peruses the grub.conf record and sets up the menu with the frameworks characterized in the grub.conf document. On the off chance that no grub.conf record can be found, the stage2 loader goes specifically into charge brief mode, which can likewise be gotten to from the GRUB menu by squeezing 'c'.
  • Expecting the grub.conf document has the suitable orders to begin the introduced frameworks, GRUB will sit tight for a measure of time determined in grub.conf, begin the client chose framework when the client makes a choice, or if no determination is made, begin the default framework when an ideal opportunity to hold up lapses. How GRUB begins a framework relies on upon the framework. With a few frameworks like Linux, it specifically stacks the bit or stacks a standard boot loader as it accomplishes for FreeBSD. With most frameworks it chain stacks the framework, which means it does what the standard IPL loader excepts that it gives different options before doing this. At the point when the framework to be booted must be chain stacked, GRUB ordinarily denote that framework's parcel dynamic.
  • Where the standard loader can just work with the allotment that is as of now set as dynamic, GRUB permits this to be controlled. It then passes control to a project at a known area on the boot segment, ordinarily at +1 segments or the second division. This is OS particular code that finishes the boot, in the ordinary way for the chose OS.
  • Grub Plate Terminology GRUB recognizes hard plates by "hd" and floppy circles as "fd" trailed by a number beginning from 0. In summons, the plate references are constantly encased in enclosures, hence the first hard circle would be referenced as (hd0). Plate segments are isolated from the hard circle by a comma and distinguished as 0 - 3 for the essential allotments and 4 and up for parcels inside a broadened segment. FreeBSD numbers its cuts from 1 to 4, and Linux its segments from 1 to 16, instead of beginning at 0, so you'll have to diminish a FreeBSD cut or Linux parcel number by one to get the right plate segment number.
  • On the off chance that the segment is a BSD disklabel "subpartition" in GRUBs wording, these are isolated by a comma and begin from 'a'. In this manner (hd0,2,a) would indicate FreeBSD's/dev/ad0s3a or the "an" allotment of the third cut on the first hard circle.
  • GRUB utilizes these gadget specifiers for two purposes: first to recognize the area of its arrangement records and after that to distinguish the framework to be booted. The default area for GRUB's setup document is in/boot/grub/grub.conf on the segment characterized as GRUBs root (see beneath). The default design record can be introduced on either Linux or FreeBSD frameworks however an alternate area is required on OpenBSD frameworks on the grounds that the default area clashes with the OpenBSD standard "/boot" document. GRUB has sentence structure for determining documents by name or square arrangements of physical divisions where the record lives.
  • This is a bit much for our reasons. In the event that you require more data use "$info GRUB" on a framework GRUB is now introduced on, for example, Red Cap Linux 7.2, or see the online documentation atWhen this URL was redesigned (Oct. 2004) the Grub talked about here has been renamed by GNU.org to Grub Legacy, and another item Grub 2 is being worked on. There is no documentation yet for the new item. The normal landing page for both items.
  • Booting Different Plates With GRUB, you may say you should do nothing more than change any (hd0) reference to (hd1) and every one of the summons that work on the first plate will chip away at the second. This genuine. With FreeBSD and OpenBSD, it is valid to the extent GRUB goes. The GRUB orders for these frameworks have no different references to the hard circle being utilized. The orders to begin Linux however incorporate a charge line contention for the part which tells the piece the gadget it's booting from, normally utilizing Linux's gadget sentence structure and not GRUB's. This should be balanced and in addition would whatever other plate references for other working frameworks.
  • This prompts another issue. While working frameworks are introduced they commonly contain various references in their framework documents, indicating the areas of different framework components. For whatever length of time that FreeBSD, Linux and OpenBSD are introduced in the area that they are being booted from that point ought to be no huge issues (however I've just introduced one OpenBSD framework on a second hard plate to test this; on a migrated circle, each began to boot yet fizzled amid the boot process). It's a completely distinctive matter to move a framework introduced at one area to another. Regularly you can move a circle and mount its document frameworks from good working frameworks for perusing and composing, however not booting, as all the interior references to gadgets aren't right at the changed area. It might be conceivable to discover and modify every single such reference (while booted from another framework) yet it's presumably snappier to introduce a framework without any preparation at another area than to move it.
  • In the event that you plan to boot from the hard plate, then the executable duplicate of GRUB still should be introduced onto the hard circle that the BIOS will pass control to at boot time which is almost constantly whatever circle is perceived as the first circle (or the one you presently boot from). Another probability is to roll out no improvements at all to the first hard circle, and to make a GRUB boot floppy with a menu for booting any frameworks that may be introduced on the second or extra hard plates. This is more handy than it sounds. GRUB and its menu load from a floppy much speedier than FreeBSD, Linux, or OpenBSD, boot from floppy.
  • In the end, the GRUB floppy ought to contain a passage and charges to boot any framework introduced on the first hard circle. Regardless of the possibility that you begin from a floppy, if your setup is sensibly consistent, you'll need to introduce it to hard circle sooner or later and before you do this, the charges to boot any framework on the first plate ought to be tried. When you do introduce GRUB to the first hard plate, you can utilize any framework to store GRUB's records on. In the event that you store them on the second circle and later evacuate this plate, GRUB won't complete the process of stacking on the grounds that it can't get to its stage2 document.
  • Before introducing GRUB, make certain you know how to restore the first circle to a bootable state and archive this in the event that you ever evacuate the second hard plate (or it has an equipment disappointment). In the event that you made a GRUB boot floppy that booted frameworks on the first circle this will in any case work. You ought to most likely restore the first framework to its earlier bootable state, before evacuating the second plate, if that is the place you put the GRUB index. For a solitary boot DOS or Windows framework, restoring a bootable state might require close to "fdisk/mbr". For a multi boot framework, you'll presumably reinstall any past boot loader. You could stay with GRUB, however in the event that you were going to do this, it would bode well to introduce GRUB's stage2 and configure.