How to install win download from two. The GRUB bootloader is a complete guide.

Installing the bootloader To boot your Red Hat Enterprise Linux AS system without a special boot disk, you need to install the bootloader. You can choose between GRUB (installed by default) and LILO. GRUB is a bootloader that can load Red Hat Enterprise Linux AS on your computer. It can also load other operating systems, such as Windows 9 x. On this screen, you determine how to configure (if you install) the bootloader and which one (GRUB or LILO). Select the bootloader that you will install. If you decide to use LILO, make sure it is selected, not GRUB.

Let me give you another example of exactly how such a “trivial” operation should be performed as partitioning on the hard disk. The number of cylinders for this disk is set equal. As you can see on the last line, there is a “hint”.

Let's say you don’t have free space  on your hard drive and you want to delete the second partition. In addition, after partitioning, you need to do boot partition  bootable. Attention! It is important to remember that you only have to split the free space into two parts, and formatting will continue. The preinstallation step is to mount formatted partitions.



Figure 3-9. Bootloader installation

If you decide to install the bootloader (GRUB or LILO), you must determine where it will be installed. You can install the bootloader in one of two locations:

home boot record  (The master boot record (MBR)) This is the recommended location for the bootloader, unless another bootloader is already installed in the MBR operating systems, for example, System Commander or OS / 2 "s Boot Manager. MBR is a special area on the disk that automatically loads the BIOS of your computer, and first of all transfers control of the boot process to it. When installing the bootloader in MBR, immediately after turning on the computer, GRUB ( or LILO) prompts you to boot, then you can boot Red Hat Enterprise Linux AS or any other operating system configured in the bootloader. The first sector of your root partition (root) Recommended if you are already using a different bootloader (for example, OS / 2 "s Boot Manager). In this case, first this bootloader will get control. You can then configure your bootloader to run GRUB (or LILO), which in turn will boot Red Hat Enterprise Linux AS.

This is done using a series of commands. File extraction is performed using the following sequence of commands. If you did not notice anything wrong with the console headers, you should have done everything right and printed everything where you needed to. People who install with installation disk, well fix the date and time of the system.

When you run only the “date”, you will be returned in response to the current time and date of your computer. This is done using the following command. This is done using the following two commands. If you install "clean" and you have a boot partition, you must also install it.

Select the bootloader: GRUB or LILO, which will be installed on your system. If you will use only Red Hat Enterprise Linux AS, install the bootloader in the MBR. If you want to add default parameters to the GRUB or LILO boot command, enter them in the field Kernel parameters. All specified parameters  will be passed to the Linux kernel at every boot. - This option allows you to overcome the limitation of 1024 cylinders for the / boot partition. If your system supports the LBA32 extension, which allows you to boot the system beyond 1024 cylinders, you can move the / boot partition beyond this boundary. If the installation program at this stage does not determine the support for this extension in the BIOS, set the parameter   Force use of LBA32 (not normally required) (Force use of LBA32 (usually not required))The table lists all partitions, including partitions of other operating systems. The section containing the root file system of Red Hat Enterprise Linux AS in the field Boot label designated as Red Hat Linux. Other sections may also have tags. If you decide to add labels for other sections (or modify an existing one), click on the section to highlight. Having selected a section, you can change the label by editing the name in the field Boot label.

Thus, we refuse to reload from the synchronization server necessary information, and we only make a pointer to the porting of the files that we unpacked at the beginning. This is a way to get the compiler to check which optimization flags are allowed by the compiled code.

The most important thing to remember here is that excessive use of flags in this section is not a good idea, and when the flag is in front, it is forbidden to support it, and when it is without it. If you know, you can specify it. A link is necessary because when you want to install a driver or something else you need to use the kernel source information that you are currently using to always search for this information in one place. If the process is complete and you have something like this. Configuring these two files is necessary if you want to rename your computer to your long-term network, it is present with some other name, and not with a "trivial" local host.

  Recovery mode

If you need to use recovery mode, you can do this in the following ways: After booting from the CD, type linux rescue at the boot: prompt. After booting from the network-compatible boot disk you created, enter linux rescue at the boot: prompt. You will then be prompted to download the recovery disk image from the network. After booting from the boot disk you created, enter linux rescue at the boot: prompt. Then you can choose the installation method and the correct path to download the installation. Behind additional information  about recovery mode, refer to   The Official Red Hat Linux Customization Guide.

  Alternative boot loaders

If you do not want to use GRUB or LILO to boot your Red Hat Enterprise Linux AS system, you can choose the following options:

Boot disk You can use the disk created by the installer for you (if that was done). LOADLINYou can boot Linux from MS-DOS. Unfortunately, this requires a copy of the Linux kernel (and the original RAM disk if you are using a SCSI adapter) to be on the MS-DOS partition. There is only one way to do this: boot your Red Hat Enterprise Linux AS system differently (for example, using LILO or a floppy disk), then copy the kernel to the MS-DOS partition. LOADLIN can be obtained at ftp://metalab.unc.edu/pub/Linux/system/boot/dualboot/ or on the corresponding mirrors. SYSLINUXSYSLINUX is a program for MS-DOS, very similar to LOADLIN. It can be obtained at ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/ and on the corresponding mirrors. Some commercial bootloaders You can boot Linux using commercial bootloaders for operating systems. For example, System Commander and Partition Magic are able to boot Linux (it is necessary for GRUB or LILO to be installed in the Linux root partition).

In fact, there is another reason - if you have a domain in your local area network, and there is another computer with the same name as your computer, you may have unpleasant problems with Internet access. It is also good to know that if you do not edit this file when you start your Internet device, it will be configured to automatically receive all the settings. Different utilities are installed for different file systems. Installing such programs is mandatory if you need to configure your Internet access in a way other than that described in paragraph 2, and if you need to automatically receive Internet access settings.

  Multiprocessor platforms, GRUB and LILO

This section applies only to SMP (multiprocessor) platforms. If the installer detects a multiprocessor platform on your system, it will create two entries in /boot/grub/grub.conf or /etc/lilo.conf (depending on the boot loader selected), instead of one. The entries in the grub.conf file will appear: Red Hat Linux (kernel version) and Red Hat Linux (kernel version -smp). By default, Red Hat Linux will boot (kernel version -smp). However, if you experience problems loading the kernel that supports multiprocessing, you can download the Red Hat Linux version (kernel version). The system will retain the previous functionality, but will work with only one processor. The linil and linux-up entries will appear in the lilo.conf file. Selected by default linux download  . However, if you experience problems loading a kernel that supports multiprocessing, you can download the linux-up option. The system will retain the previous functionality, but will work with only one processor.

It is produced from a “live” system (for example, in Knoppix), since without a working bootloader it is impossible to run the Linux distribution installed on the hard drive of your computer.

With it, you can add, remove, and simply view which programs and services to run. You can also simply see which programs fit into the program level. If you want to access the Internet automatically, you need to configure it first and then add it to the default value. This is the same way you add programs and services.

This is the safest case if you do not risk being left without your old OS. Let me show you an example of this file. As you can see from the first line - “default 0” instead of 1, the first operating system is implied here. The fifth line is used to describe which kernel corresponds to the OS whose name is given in the third line, and to put various options in this kernel. Then these lines will look like this.

Basic boot sector information

Before I tell you how the installation is actually performed, you need to look briefly inside the BIOS and MS DOS. Interpretation of (one or more) boot sectors occurs according to the principle that appeared more than a dozen years ago. It is further assumed that you are aware of the existence of several types of partitions.

it boot sector hard driveon which the boot manager of the OS used is installed. Must be added to this file following lines. If you carefully read paragraph 1, you should not have a problem indicating the sections. The boot sector itself is retrieved by commands.

Then add the highlighted lines to the file using a text editor to look like this. Finally, you return the file attributes as they were. The difference is that you only need to add the last four lines in the example from paragraph 1. After starting, you must enter the password that you selected for the administrator twice. When you enter the password, you will not see anything like the characters, so be careful.

Disk Master Record (MBR). This is the first sector of the hard drive. It occupies 512 bytes and usually contains a tiny program (no more than 446 bytes). The following is a disk partition table for four primary partitions (64 bytes) and a digital signature (2 bytes).

Partition boot sector.

Such a sector exists not only in the MBR, but also in each section, and in reality it can occupy up to 16 hard sectors  disk (8192 bytes). In most file systems, the boot sector of a partition is not used, that is, the data itself begins only with subsequent sectors. But there are exceptions. For example, the XFS file system uses all sectors. If the information of the boot sector of the XFS partition is erased, the file system will be destroyed!

Computer start up.

At startup, the BIOS reads the MBR record of the first hard drive, loads it into random access memory  and checks to see if the last two bytes contain the 55 AA hexadecimal codes. These codes are used to identify bootable media. If the codes match, then the miniprogram from the boot sector is executed. On a computer where MS DOS or Windows (not Linux) is installed, such a program will “know” which of the system partitions are marked as active (usually this is the first partition). Then this program loads another program - from the boot sector of the active partition - and executes it. And already this program is responsible for windows launch  or MS DOS.

If there are several hard drives, can be configured in the BIOS in which order will be requested hard disks  while loading. Thus, in modern computers, the system can boot from external drive  or a USB stick. The BIOS can also be configured to boot from a CD or DVD.

It is advisable that the administrator password be long enough and with different letters, numbers and symbols. All this is done by entering the following commands in the following order. This article has been updated, mainly updating links to new versions of the necessary installation files  and removing some things that are no longer relevant.

At the beginning of today's work, we will briefly return to the end of the previous one, in particular, to the last images with the terminal of the installation system. By the way, we managed to capture the issue new version installation media. The following figure. Of course, you can use any version of the installation media, but for the "older" you need to count more and the number of updates. This may lead to a breakdown in the discussion of installation media and proceed to install the operating system.

There are several strategies to ensure the peaceful coexistence of Windows and Linux.

The most common way is to install linux bootloader  in the MBR and choose which system to run - Windows or Linux.

If your computer is already installed modern windows version  (newer 9x / ME), can be customized windows bootloader  so that it runs. The advantage is that the MBR does not even need to be touched. The disadvantage is that the installation process is relatively complicated. Except with WUBI, I am not aware of any Linux distribution that could perform such an operation. It is always required to work manually.

As can be seen from the previous figure, we only have a terminal and there is no installer or application. This is how it works in the Ark, and we will try to deal with it. The first step in the installation is to split the disks. Of course, there is more, but we will focus on these two.

Of course, anyone who wants to can use any of these tools to separate the disks. To get a concrete overview of what is available in our system, we will use one of these tools and enter a command. The following figure shows that the indicated drives are indeed accessible and that both hard drives are not yet divided \u003d they do not have partitions.

The third option is to install the main partition in the boot sector and mark this partition as active. When using this option, there is the same significant advantage as in the previous case: you do not need to touch the MBR. The disadvantage is that the method works only with the main partitions (but not with logical partitions) and only with those file systems that do not concern the boot sector of your partition. Since these restrictions exist, we will not consider this option further.

The result is shown in the following figure. As you can see from the figure, there is a table with four label options, which we will return to. Then a blue warning appears that the device does not contain any spreadsheets and brief instructions  about how to act. We will follow this guide and choose the type of label. For us, only two are interesting, the other two are for special cases, and we will not deal with them. This type of label is recommended for newer types of computers and hard drives.

On the page above, people can learn more, including comparing the advantages and disadvantages of this system compared to the one we use. In the figure we see that we have hDD  with some parameters, only free space and 5 teams are available. This will start the creation of the first section, and we will be asked to adjust its size.

Backing up MBR

Root # cp / usr / lib / grub

Then run and run the following setup command in it. Instead of (hdl, 12) you need to specify the device name of the partition of your hard disk where the / boot directory is located. Please note - often the / boot directory is in its own partition, and not in the system! The variable (hdO) indicates the place where it should be installed
  If it starts indirectly, through the Windows bootloader.
  If it starts indirectly, through the Linux bootloader (for example,), which is already in the MBR, and you do not want to touch it. This option is possible primarily in cases where you intend to use multiple instances of Linux in parallel.
  is installed in the boot sector of the main partition, and you mark this partition as “active” with the fdisk command (key A, toggle a bootable flag command). In this case, the program located in the MBR takes into account the boot sector of the active partition. This method  does not work for logical partitions, as well as in cases where GRUB or another bootloader is already installed in the MBR.

As shown in the following image, we offer a full disk size and a quick reference on how to enter size units. We have two options: primary and advanced, including a brief overview of how many sections have already been created and how much is available. The current image shows the following image. Since we will create only three sections and will not add more, we will create all sections as primary. In addition to the newly created section, we see information about its type at the bottom, and we can also notice two new commands.

More can be seen from the following picture. This section will be used to save startup files, so we must set the appropriate download flag. We set the required size and basic type of section, we do not need to set an additional flag. In the same way we will create the third section. Here again, you need to make another change by setting the type of partition. We stated in the table above that this section will serve as a swap, so we need to set the appropriate type of section.

Typically, a Linux system partition is used for such an installation. In other words, if you installed Linux in the / dev / sda7 partition and want to install GRUB in the boot sector of the same partition, run the commands below. The only difference compared to installing in the MBR is that in the setup you do not specify (hdO), but the desired partition.

root # grub grub\u003e root (hd1,12) grub\u003e setup (hd0,6) (Install in the boot sector / dev / sda7) grub\u003e quit

A table with the types of sections and the final division result can be seen in the following two figures. Created sections, types and symptoms. We already have all the planned sections, but we have not finished yet. It is important to note here that this operation irrevocably deletes all the data that was previously on the disk, and therefore it is necessary to think over everything.

The recording and output dialog can be seen in the following two figures. Exit split operation system disk. Upon returning to the terminal, we will see if the section went the way we wanted, and then run the command again. The following image clearly shows that everything is in order, and we can begin to share the data disk.

ATTENTION

  On some file systems, the boot sector of a partition cannot be used with the bootloader or other programs. These systems include XFS. If you install GRUB in the boot sector of the XFS partition, the file system will be destroyed! For this reason, in such systems, installation in the boot sector is not used.

USB installation

The BIOS of modern computers usually provides the ability to boot the system from a USB-drive. In principle, you can install GRUB

Browse disc after the first division. When using this application, you can use the option to run individual terminal commands or the so-called interactive mode. We will do our simple demonstration using the second option. To do this, we again offer two options that lead to the same result.

Or we can use one command, which puts us in the appropriate mode and installs the necessary disk. Or use two consecutive commands. The first takes us to the appropriate application mode and installs the first disk in the system, and the other installs the necessary disk.

In the boot sector, flash drives and boot from it using windows, Linux, etc. Everything is theoretically simple, but in practice problems often arise. There are two main causes of problems.

The motherboard must correctly recognize the USB-drive already at boot time and work with it as a boot tool. Pay attention to the fact that a flash drive can be formatted in two ways: as a “super disk” (superfloppy) or as a hard disk. Which option will be used depends on the BIOS.

Before we start splitting the drive, giving help with help using the help option, as shown in the following figure. You can use the print command to display information about the current disk, as shown in the following figure. Since the disk does not contain any partitions, it is probably not surprising that the available information is not enough.

We complete the full partitioning of the data disk using three consecutive steps. For the first step we use one command. And immediately check the result with the print command. You can follow these two steps with one command, which will look like this in a particular case.

Keep in mind that you need to activate USB support in the BIOS (usually a special BIOS parameter is used for this). Unlike Linux, GRUB can only access USB media through the BIOS! If the BIOS recognizes the USB media as boot disk, at the same time (at least in some BIOS versions) the order in which GRUB will “see” data carriers will change. Now the USB drive will be considered the first drive (hdO), the built-in hard drives will be requested via (hdl), (hd2), etc. If necessary, change / boot / grub / devices.map accordingly before installing GRUB.

Then check the result in the next shot. Type, size and file system of partitions. There is no need to enter any command to write the section. In this figure, we also see that there is no visible data with the file system type and symptoms, although they were seen in a previous statement.

But leave it aside and cut the section. The next step we need to do is create file systems for each partition. To do this, we will use the system commands available in the installation system and enter. The next five digits show the results of these commands and the final breakdown of the section.

The optimal strategy is to first try installing GRUB on a USB flash drive. When Linux is running, GRUB recognizes a flash drive called (hdn + 1), where n is the last internal hard  disk. If your Linux system, as in the previous examples, is located in the / dev / sdb13 section and there are two internal disk, the flash drive will be called (hd2). In order to install GRUB in an MBR flash drive, use the following commands:

root # grub grub\u003e root (hd1,12) grub\u003e setup (hd2) (Installing USB media in MBR) grub\u003e quit
  In the ideal case, after restarting, the computer will detect GRUB in the MBR on the USB flash drive and, as expected, will load the operating systems specified in menu.l st. If you encounter any difficulties when starting operating systems, go from the GRUB menu to interactive mode by pressing the C key, and then using the cat command and the tab key, find out under what GRUB names “sees” the hard drives. Pressing Esc takes you back to the menu, where you can use the E key to change the boot commands and try them again.

Install Linux on hard drivesconnected via USB. Until now, it was assumed that the USB stick would only be used to start the download. But the situation is complicated if Linux itself is located on a large flash drive or on an external hard drive connected via USB. In most distributions, you can easily install a USB drive, but problems may occur during startup. You will have to overcome three main obstacles. GRUB - as mentioned above, installing GRUB on a USB stick may cause problems. You can try to see if such an installation works. If necessary, experiment with the BIOS settings and drive designations and try to manually configure these properties in the menu.lst file.

USB-modules for the kernel - the kernel at the time of launch should be able to access the USB-drive. For this to happen, the Initrd file must contain all the necessary USB modules. Basic information on how Initrd files are built and how they are created is provided in the next section.

Device names — depending on how the computer boots up — with or without external hard drives (USB) connected — the names of the hard drives can change (/ dev / sda to / dev / sdb). Therefore, it is advisable to use in the / etc / fstab file and when setting the root parameters in the kernel line in menu.lst not the names of devices, the anomer UUID. If you work with, then in menu.lst using uuid you can also select the section in which the kernel and the Initrd file will be located.

When working with modern motherboardsAs a rule, you can easily use Linux installed directly on a USB stick. However, to make it work, sometimes you have to work hard and spend time. If you are just starting out with Linux, I do not recommend using this option.
Read also: