1 a GRUB configuration file partition based on the example as follows: hda15G hda18G/REDHATLINUX8.0 hda57G/ome hdc20G hdc16.4GWinXP hdc56.4G hdc66.4G hdc76.4G # fdisk-l # Disk/dev/hdc: 255heads, 63sectors, 2434cylinders Units = cylindersof16065 * 512bytes DeviceBootStartEndBlocksIdSystem/dev/hdc1 * 18947181023 + bWin95FAT32/dev/hdc2895243412370050fWin95Extd (LBA)/dev/hdc589517877172991bWin95FAT32/dev/hdc6178824345196996bWin95FAT32 Disk/dev/hda: 255heads, 63sectors, 1867cylinders Units = cylindersof16065 * 512bytes DeviceBootStartEndBlocksIdSystem/dev/hda1 * 110208193118 + 83Linux/dev/hda210211802628141583Linux/dev/hda318031867522112 + 82Linuxswap grub.conf, this file is located;/boot/grub/grub.con # grub.confgeneratedbyanaconda ## Notethatyoudonothavetorerungrubaftermakingchangestothisile # NOTICE: Youdonothavea/bootpartition.Thismeanstat # allkernelandinitrdpathsarerelativeto/, eg.
# Root (hd0, 0) # kernel/boot/initrd/dev/da1 # vmlinuz-versionroroot =/boot/boot =/dev/da initrd-version.img # default = 0 timeout = 3 splashimage = (hd0, 0)/boot/grub/splash.xpm.gz titleRedHatLinux (2.4.18-14) root (hd0, 0) kernel/boot/vmlinuz-2.4.18-14roroot = LABEL =/boot/initrd/initrd-2.4.18-14.img titleMicrosoftWindowsXP map (hd0) (d1) map (hd1) (d0) root (hd1, 0) chainloader (hd1, 0) + 1 makeactive boot 2 interpretation grub.conf file we will look at the grub.conf file statement, (Note: ...) What is in our interpretation of the content. #grub.confgeneratedbyanaconda # #Notethatyoudonothavetorerungrubaftermakingchangestothisile #NOTICE:Youdonothavea/bootpartition.Thismeanstat #allkernelandinitrdpathsarerelativeto/,eg. # Root (hd0, 0) # kernel/boot/initrd/dev/da1 # vmlinuz-versionroroot =/boot/boot =/dev/hda initrd-version.img # (Note: the above symbols wells "#" at the beginning of the row that is commented out, nothing) default = 0 (Note: the default operating system that is controlled by default. After adding a default number n, indicates that the first n + 1. Note that GRUB, count is zero-based, the first hard disk is hd0, the first floppy drive is fd0, etc. Therefore, default0 represents the default operating system here is RedHatLinux (2.4.18-14) If you modify a 1 is WinXP) timeout = 3 (Note: timeout represents the default wait time, here is 3 seconds. More than 3 seconds, the user has not made any choice, the system will automatically select the default operating system; of course you can change to any of you happy time) splashimage = (hd0, 0)/boot/grub/splash.xpm.gz (Note: specify a splash screen file splash.xpm.gz location, or you can splash/boot/logO/800x600x8.img) titleRedHatLinux (2.4.18-14) (Note: the menu items representing RedHatLinux) root (hd0, 0) (Note: for the first partition of a hard disk, here's root and root within the system is not a thing! details as below description) kernel/boot/vmlinuz-2.4.18-14roroot = LABEL =/(Note: specify the location of the kernel, the detailed instructions below) initrd/boot/initrd-2.4.18-14.img (Note: Initialize) titleMicrosoftWindowsXP (Note: the menu items representing MicrosoftWindowsXP) map (hd0) (hd1) (Note: a detailed map is the command, as follows) map (hd1) (d0) root (hd1, 0) (Note: this is the second hard disk (hard drive) on the first partition) chainloader (hd1, 0) + 1 (Note: chain-type loaders, mount a slice of the data and then put the boot to it. Detailed instructions follow) makeactive boot (Note: on Linux, when it comes to the "root" file system, generally refers to the main Linux partition. However, GRUB has its own root partition definition. Grub root partition is the partition that holds the Linux kernel. This may be your official root file system, or may not be. We discuss is GRUB grub, you need to specify the root partition. Enter the root partition, GRUB will put this partition installed to read-only, so you can mount the partition from the Linux kernel. Grub is a very "cool" features is that it can read native FFS, FAT, minix, and ext2 or ReiserFS partition. to date, you might feel a little confused, because GRUB uses a partition of the hard drive/Naming Convention Linux use naming conventions are different. In Linux, the first hard drive of a fifth partition called "hda5. Which GRUB to this partition is called "(hd0, 4). GRUB on your hard disk and partition numbering starts from 0. In addition, hard drives and partitions are separated by commas, the entire expression enclosed in parentheses. Now, if you want to boot Linux hard disk hda5, you would enter "root (hd0, 4). Know where the kernel, but also to specifically point out which file is the core file, this is the kernel. Kernel/boot/vmlinuz-2.4.18-14roroot = LABEL =/description/boot/vmlinuz-2.4.18-14 is to load the kernel. Following are the parameters to pass to the kernel. Root = LABEL =/is the linux hard drive partition notation, ro is readonly. Initrd used to initial linuximage, and set the appropriate parameters. The command map: when you have two hard drives, one from the second hard boot of the operating system, such as the Windowsxp, you can use the map command can you hd0 hd1, will be mapped to a mapped as hd0 hd1. In other words, you can exchange two virtual hard disks and boot the operating system. Order form: grub > map (hd0) (d1) grub > map (hd1) (d0) GRUB uses a "chain-loader" (chainloader). Chain-type loaders from partition (hd1, 0) boot record load winxp own boot loader, and then boot it. This is the technique is called chain mounted reasons--it creates a class that derives from the boot loader to another chain. This chain-mount technology can be used to boot any version of DOS or Windows. GRUB configuration files to simple as simple, if you want a more personalized, try the "colorlight-gray/blue" and the default statement following the next time you start GRUB, take a look at what has changed, and then try the "colorlight-blue/red", surprise? fun!) 3 configure grub grub startup in the search for a name/boot/grub/as menu.lst configuration file, if you do not find this file, you do not enter menu mode and go directly to the command line mode. Now, let's look at how to boot into a wide variety of operating systems, how to establish menu.conf file. We start from the GRUB support process begins. There are two ways to complete the boot process: · A. start by calling the kernel local · B. continuous boot or transfers control to another boot loader A mode boot process 1. configuration with device or to tell GRUB is your root file system. 2. tell the GRUB kernel images of your location, and then pass parameters to the kernel. 3. reboot, and try it out. In order to boot Linux, the kernel to the file name in the bzImage/boot/directory, followed by the file system is/dev/hda1 or GRUB in (hd0, 0). Start the process as follows: 1.root (hd0, 0) [Thissetstherootpartition] 2.kernel/boot/bzImageroot =/dev/hda1 [Thissetsthekernel] B mode boot process (this model assumes that the current partition installed another boot manager, such as LILO or NTLDR): 1 setReset root partition but don't install it 2. activate the partition 3. Configuring the partitions, you need to start the first sector 4. restart, take a look at the results. We try to start the installation in/dev/hdc1 or (hd1, 0) for windows. The process of starting windows are as follows: 1.rootnoverify (hd1, 0) 2.makeactive 3.chainloader + 1 [+ 1setsthefirstsectorofthecurrentroot partition] 4.boot [transfersthecontrolandquitsGRUB] menu.conf files: it is used to create Start menu with multiple operating systems. It's not hard to establish menu.conf. It uses simple English, just like you see in this section. All menu items are not a comma at the beginning of the "titleTITLENAME". You can set the TITLENAME. Set the Linux boot menu as follows: 1. set the heading 2. set the root partition 3. set the kernel's corresponding parameter 4. start a menu examples: titleRedHatLinux (2.4.18-14) root (hd0, 0) kernel/boot/vmlinuz-2.4.18-14roroot = LABEL =/boot/initrd/initrd-2.4.18-14.img preceded by # of line is a comment. Establishing start Windows or DOS menu: titleWindoze rootnoverify (hd0, 0) makeactive chainloader + 1 boot #--or: titleMicrosoftWindowsXP map (hd0) (d1) map (hd1) (d0) root (hd1, 0) chainloader (hd1, 0) + 1 makeactive boot----Note: root and rootnoverify are the same, the rootnoverify into root. However after practice. Sometimes boot win, the system is installed, the rootnoverify (hdX.Y) this form, it would appear to windows, what windows what files are damaged. At this point, we need in grub, the boot windows in root root rootnoverify into English means the root of the mean, here is to let linux know their bit
No comments:
Post a Comment