Kernel management overview

Source: Internet
Author: User
Kernel management overview-Linux general technology-Linux programming and kernel information. The following is a detailed description. Abstract: This article describes the basic knowledge related to kernel operations, such as compiling the kernel, loading and removing kernel modules, and viewing module information; related Commands include modprobe, insmod, depmod, rmmod, and modinfo.

1. What is the kernel;


Official kernel: http://www.kernel.org
Kernel foreign uses kernel. I just flipped through the dictionary. The Chinese meaning of kernel is kernel, core, center, and essence. It is also the meaning of nuts and fruits. Literally speaking, kernel is the center of a thing, and the fruit of a plant is also the kernel and kernel. :) From this we can infer that the kernel is the center of the operating system.

We know that Linus Torvalds has developed Linux. In fact, it is developed by Linux. According to the official kernel homepage, this kernel is Linux. Other extensions and applications are developed around the kernel. All Linux applications will have direct or indirect contact with the kernel. For example, hardware requires Kernel support and network communication requires Kernel support. file systems require Kernel support more ......

Bluntly, my capabilities are not good. If you want to understand and learn about the operating system, the tutorials I wrote are only basic applications. The theoretical things are not clear in a single word, it is not clear to the application.


Ii. Why should we compile and manage the kernel?


Hardware requires Kernel support. Some hardware support is not compiled into the kernel, which also requires us to re-compile the kernel. The kernel includes not only the driver of the device, but also other content, for example, support for network protocols and firewall ...... for example, the implementation of iptables requires Kernel support for some functions. If the kernel content related to iptables is not compiled, iptables-related functions cannot be implemented;


Iii. kernel Compilation Method


For details, refer to compile the kernel operation process-as a beginner's guide.


4. Manage commands of the kernel module



1. Kernel Modules mounted in the lsmod column;


Lsmod lists the names and sizes of loaded modules in the current system. You can also view/proc/modules. We can also know the loaded modules of the system;


[Root @ localhost beinan] # lsmod


2. modinfo: View module information;



Modinfo can view the module information and determine the purpose of the module by viewing the module information;


[Root @ localhost beinan] # moinfo Module name

Example:


[Root @ localhost beinan] # modinfo ne2k-pci
Filename:/lib/modules/2.6.11-1.1369 _ FC4/kernel/drivers/net/ne2k-pci.ko
Author: Donald Becker/Paul Gortmaker
Description: PCI NE2000 clone driver
License: GPL
Parmtype: debug: int
Parmtype: options: array of int
Parmtype: full_duplex: array of int
Parm: debug level (1-2)
Parm: options: Bit 5: full duplex
Parm: full_duplex: full duplex setting (s) (1)
Vermagic: 2.6.11-1.1369 _ FC4 686 REGPARM 4 KSTACKS gcc-4.0
Depends: 8390
Alias: pci: v201710ecd1168029sv * sd * bc * SC * I *
Alias: pci: vda-1050d00000940sv * sd * bc * SC * I *
Alias: pci: v201711f6d20171401sv * sd * bc * SC * I *
Alias: pci: vda-8e2ed1_3000sv * sd * bc * SC * I *
Alias: pci: vda-4a14dda-5000sv * sd * bc * SC * I *
Alias: pci: v20171106d00000926sv * sd * bc * SC * I *
Alias: pci: vda-10bdd00000e34sv * sd * bc * SC * I *
Alias: pci: v20171050d20175a5asv * sd * bc * SC * I *
Alias: pci: v201712c3d00000058sv * sd * bc * SC * I *
Alias: pci: v201712c3d20175598sv * sd * bc * SC * I *
Alias: pci: v20178c4ad20171980sv * sd * bc * SC * I *
Srcversion: 6ACE95F441CD26DF9DC31C2

The above example is we view the information of this module ne2k-pci, through view, we know that the ne2k-pci module is 8029 NIC (PCI NE2000 clone driver) driver; the module is located in the/lib/modules/2.6.11-1.1369 _ FC4/kernel/drivers/net/ne2k-pci.ko


We also use 8139 of commonly used NICs, and 8139 of NICs use 8139too drivers?


[Root @ localhost beinan] # modinfo 8139too

Check the vfat and ntfs module information;


[Root @ localhost beinan] # modinfo vfat
[Root @ localhost beinan] # modinfo ntfs

Try it yourself;

Note: The Module name cannot contain a suffix. The modules we see through modprobe-l are all with. ko or. o suffixes;


3. Mount the new module and the module on which the new module depends.


Modprobe our common function is to mount a module. When a kernel module is mounted, the modules on which this module depends are also mounted. Of course, modprobe also lists all kernel modules, there is also the function of removing modules. Next we will give an example to illustrate our common functions and parameters;


Modprobe [-v] [-V] [-C config-file] [-n] [-I] [-q] [-o ] [Parameters...]
Modprobe-r [-n] [-I] [-v] ...
Modprobe-l-t [- ...]

The above is the usage of modprobe. For more detailed help, we can view man modprobe;


[Root @ localhost beinan] # modprobe-c

Modprobe-c can view the modules configuration file, such as the module alias;


[Root @ localhost beinan] # modprobe-l

Modprobe-l is used to list all modules in the kernel, including mounted and unmounted modules. Through modprobe-l, we can view the modules we need and mount them according to our needs; in fact, the list of modules read by modprobe-l is located in the/lib/modules/'uname-R' directory, where uname-r is the kernel version;


[Root @ localhost beinan] # uname-r
2.6.11-1.1369 _ FC4
[Root @ localhost beinan] # ls/lib/modules/2.6.11-1.1369 _ FC4/

Through the above command, try it yourself?


[Root @ localhost beinan] # modprobe Module name Note: mount a module;

Example:


[Root @ localhost beinan] # modprobe ne2k-pci Note: mount the ne2k-pci module;
[Root @ localhost beinan] # modprobe vfat Note: mount the vfat Module
[Root @ localhost beinan] # modprobe ntfs Note: mount the ntfs Module
[Root @ localhost beinan] # lsmod Note: List mounted modules, we will see the ne2k-pci, vfat, ntfs modules;

Note: The Module name cannot contain a suffix. The modules we see through modprobe-l are all with. ko or. o suffixes;


[Root @ localhost beinan] # modprobe-r module name Note: remove the loaded module, which has the same function as rmmod;

Note: The Module name cannot contain a suffix. The modules we see through modprobe-l are all with. ko or. o suffixes;


[Root @ localhost beinan] # modprobe-r module name

Example:


[Root @ localhost beinan] # modprobe-r ne2k-pci

Let's talk about this. For more details, use man modprobe to view and try it;


4. rmmod removed the mounted modules;


Command Format:


Rmmod Module name

Note: The Module name cannot contain a suffix. The modules we see through modprobe-l are all with. ko or. o suffixes;

Example:


[Root @ localhost beinan] # rmmod vfat Note: remove the mounted module vfat


5. depmod: List of module dependencies created


This module management tool is used to create a list of module dependencies. Just pay attention to a few parameters. Currently, the Linux release uses the kernel version 2.6x to automatically resolve dependencies, this command is fine. The module also has dependencies before. For example, if we want to drive a USB mobile hard disk, there are currently two types of drivers: udev, which are available in the kernel, however, it is not stable at present. Another method is to use the usb-storage driver, while the usb-storage depends on the scsi module. Therefore, we need to use the usb-storage module, you also need to compile and install scsi;

Another example is the sata hard disk. in Linux, the device represents/dev/sd *, for example,/dev/sda,/dev/sdb... to drive a sata hard disk, You need to select sata in the kernel, compile it into a module, or build it into the kernel. At the same time, you need to select the ide in the kernel, scsi support;
Depmod-program to generate modules. dep and map files. (create dependency for modules. dep file or ing file)


[Root @ localhost beinan] # depmod-a NOTE: For all columns in/etc/modprobe. conf or/etc/modules. create dependencies between all modules in conf and write them to modules. dep file;
[Root @ localhost beinan] # depmod-e Note: Lists mounted but unavailable modules;
[Root @ localhost beinan] # depmod-n Note: lists the dependencies of all modules, but only outputs (Write the dependency file on stdout only)

Note: modules. dep is located in the/lib/modules/kernel version directory.

For example, in Fedora Core 4.0, the default system kernel:


[Root @ localhost beinan] # ls/lib/modules/2.6.11-1.1369 _ FC4/modules. dep
/Lib/modules/2.6.11-1.1369 _ FC4/modules. dep


6. insmod mounting module;


The insmod tool is a bit similar to modprobe, but it does not have a strong modprobe function. In the Mount module, modprobe does not need to specify the path of the module file or the suffix of the file. o or. ko; what insmod needs is the absolute path of the directory where the module is located, and must contain the module File name suffix (modulefile. o or modulesfile. ko );

For this tool, we will only introduce it and it is not recommended. Because the module has dependency, you may not know which module the module depends on;

Example:


[Root @ localhost beinan] # insmod/lib/modules/2.6.11-1.1369 _ FC4/kernel/drivers/net/tg3.ko

We need to find the corresponding module in the Command output/lib/modules/kernel version uname-r/kernel/drivers. There must be an absolute path, the full name of the file name must be used, and the suffix of the file name cannot be omitted;


5. configuration files related to kernel module Loading;



1. module configuration file modules. conf or modprobe. conf


The automatic mounting module of the kernel module is usually located in a configuration file. The common Linux releases all have/etc/modules. conf or/etc/modprobe. conf. For example, the file automatically loaded by the Fedora Core 4.0 kernel module upon startup is/etc/modprobe. conf; in this file, it is generally written to the module's load command or module alias definition. For example, in modules. A similar line may be released in conf;


Alias eth0 8139too

And 8029 of NICs should be


Alias eth0 ne2k-pci

In this way, the system will first modprobe 8139too, and then specify the alias for 8139too as eth0. Then, when we log on, we will use ifconfig to view the nic ip address and other conditions, of course, you must set an IP address for the NIC;

In general, modproe. conf or modules. the conf file is generated using the corresponding hardware configuration tool. If your hardware driver is not supported by the kernel, you can download it from the hardware vendor. In general, there are installation and help files. When their driver is configured, it will write hardware support to the modules. conf or modprobe. conf file.

For example, our sound card is in modules. conf or modprobe. conf also contains the relevant content, which is generated by the alsaconf Configuration tool. See it. Similarly, the NIC is in modprobe. conf or modules. the content in conf is also from the NIC Configuration tool.

Some hardware is driven by kernel modules. Once loaded, modules can be used, and there are no configuration tools, such as vfat and ntfs support; if the hardware driver is not supported by modules, but directly compiled into the kernel, it will not be used in modprobe. conf or modules. what content is added to the conf file;

If some of your modules cannot be loaded upon startup, you can directly write The modprobe module into the configuration file if you want some modules to be loaded automatically by adding machines;


2. Other configuration files of the kernel module


You need to know about other configuration files of the kernel module, such as the files in the/lib/modules/kernel version directory. Just take a look. For example:


[Root @ localhost beinan] # uname-r
2.6.11-1.1369 _ FC4
[Root @ localhost beinan] # ls/lib/modules/2.6.11-1.1369 _ FC4/
Build misc modules. ccwmap modules. ieee1394map modules. isapnpmap modules. symbols source
Kernel modules. alias modules. dep modules. inputmap modules. pcimap modules. usbmap


6. Directory of the hardware driver in the system;



Directory supported by modules in the kernel of the hardware driver;


The hardware driver must be supported by the kernel, whether we install the driver ourselves or the driver that comes with the kernel. If the hardware driver is supported by the kernel module, the driver directory is located in/lib/modules/kernel version/kernel/directory or/lib/modules/kernel version/kernel/drivers directory;


[Root @ localhost beinan] # uname-r
2.6.11-1.1369 _ FC4
[Root @ localhost beinan] # ls/lib/modules/2.6.11-1.1369 _ FC4/kernel
Arch crypto drivers fs lib net sound

Note: The driver is located in the/lib/modules/directory only when the driver is supported by the module in the kernel. If the driver is directly placed in the kernel, it will not appear in the directory related to the/lib/modules driver;


7. Compile the driver by yourself;


If the driver is provided by a hardware vendor or open-source community (not integrated in the kernel source code), the compilation driver process is generally. /configure; make install, sometimes the program does not provide. /configure, we can make or make install, or execute make; make install; if you cannot make install, We need to copy it by ourselves. o or. go to the/lib/modules/kernel version/kernel/directory or the corresponding driver directory in the/lib/modules/kernel version/kernel/drivers directory;

I 'd like to try it myself. I can't say it clearly. I will know how to solve the problem. The driver's REAME and INSTALL will prevail;

At present, most drivers automatically copy the. o or. ko files to the kernel module directory during compilation and installation. Most of them do not need to be copied by ourselves. If you try to compile and install the audio card driver alsa-drivers, you will understand what I mean;


If we re-compile the kernel to solve the driver problem, you can view the Documentation REAME in the kernel source code directory in the/usr/src/directory; all the help files are there;


Loading...


2006-4-9
Procedure for compiling the kernel-a beginner's Guide


1. Why should we compile the kernel;


Sometimes we need Kernel support for some features, such as iptables firewalls, and hardware support. At this time, we need to re-compile the kernel;


2. Selection of the kernel source code version;


If the release version provides the kernel source code, it is best to use the release version. For example, Fedora 4.0 provides many versions of the kernel source code. After installation, the built-in configuration file can meet our needs. For Beginners, the configuration file is based on the built-in kernel. config, we can also learn how to configure the kernel. There is no difficulty, and practice makes perfect;

You can also download the latest stable kernel version from kernel.org;


3. install or decompress the kernel source code;


For Fedora Core 4.0, the kernel source code is stored in the/usr/src/kernels directory. If the kernel is upgraded online, it is also stored in this directory; if no content exists in/usr/src/kernels/in your system, the kernel source code package kernel-devel is not installed;

You can use the Package Manager to complete the installation. See Fedora/Redhat package management guide.

If you use Fedora Core 4.0, we recommend that you download the latest kernel kerenl-devel and the corresponding kernel version online or from kernel.org on the basis of keeping the old kernel, sometimes the new kerenl may have solved your problems, so there is no need to compile the kernel;

If you install the kernel source code package online, such as through apt + synaptic or yum, the kernel source code will be placed in the directory under/usr/src/kernel, you need to enter the corresponding directory for compilation;

For online update software packages, see Fedora/Redhat software package management guide. apt + synaptic tools are recommended;

If you are downloading the rpm package of kernel and kernel-devel, you can install it through;


[Root @ localhost beinan] # rpm-ivh kernel *. rpm

If you are downloading a linux-2.6.13.tar.bz2 or linux-2.6.13.tar.gz similar to kernel.org, move the downloaded file to the/usr/src directory to decompress it; then go to the decompressed directory for configuration and compilation;


[Root @ localhost beinan] # Music linux-2.6.13.tar.bz2
[Root @ localhost beinan] # cd/usr/src/
[Root @ localhost src] # tar jxvf linux-2.6.12.3.tar.bz2

Tip: This article takes the linux-2.6.12.3 as an example, in fact, through the release version of the upgraded version of the kernel-devel and download from kernel.org is almost the same; the difference is that the kernel source code package in rpm format is upgraded online with configuration files. config can be referenced. The installation destination is/usr/src/kernel for FC 4.0. If you want to compile and configure the kernel,


4. Kernel configuration;



1. Run make mrproper in the directory. For the source code package in tar. bz format downloaded from kernel.org;



[Root @ localhost src] # linux-2.6.12.3/cd/
[Root @ localhost linux-2.6.12.3] #
[Root @ localhost src] # linux-2.6.12.3/cd/
[Root @ localhost linux-2.6.12.3] # make mrproper
[Root @ localhost linux-2.6.12.3] # make menuconfig

For Fedora Core 4.0, if you are using a new version of the kernel and kernel-devel installed online, such as 2.6.12-1.1398 _ FC4-i686, you can directly execute make menuconfig in the/usr/src/kernel/directory. config. Do not make mrproper; otherwise,. config will no longer exist. This is why the kernel source code upgrade package provided by the release version is used;

Other configurations are similar to those for installation. You can imitate them;


2. Briefly configure the kernel;


After entering the Kernel configuration mode, we may not know anything about it. See the following;

There are two Kernel configuration methods: one is to directly put the kernel *; the other is to compile the module M; the two methods have their own advantages; directly compiled into the kernel, such as the startup of the device, the process of Loading modules is no longer required. Compiling modules requires Loading modules supported by the kernel of the device. However, it is not feasible to directly compile everything into the kernel, the kernel size will increase, and the system load will also be too heavy. When compiling the kernel, it is best to include the most important data into the kernel. If you do not understand anything else, you 'd better use the default value.


1) Move the left and right keys on the keyboard and press Enter to Enter a directory. Move the pointer to Exit and Exit the current directory to the parent directory;

2) Modify existing problems on your machine, such as support for large memory;

Select the CPU of your machine;

Move the keyboard to Processor type and features ---> and press ENTER;
Find Processor family (Pentium-Pro) ---> press ENTER to ENTER;

After entering, we found that there are a lot of CPU models available; in general, according
Bash-3.00 # select the output information of cat/proc/cpuinfo. For example, if we are from the celon (P4) generation, we should select the following, of course, the default 486 version can also run normally. Since we re-compile the kernel, We have to select the corresponding model, which may improve the performance;


Processor family (Pentium-4/celon (P4-based)/Pentium-4 M/Xeon)

Supports large memory. If the memory is 1 GB or above, but less than 4 GB, 4 GB is required. If the memory exceeds 4 GB, 64 GB is required;



High Memory Support (4 GB) --->
(X) 4 GB
() 64 GB

There are also hardware such as sound cards that need to be viewed step by step. If there is something unknown, we need to press [shift] +? To view the description. In general, the 2.6.x kernel will automatically generate a file based on the machine's situation. You just need to check the file and change the important part;

Another example: for example, if I use intel ac97 sound card, how should I configure it?

First, you need to know the chipset of your sound card. We need to check it through lspci-v;


[Root @ localhost beinan] # lspci-v

To view only the sound card, use the following method:


[Root @ localhost beinan] # lspci-v | grep audio
00: 1f. 5 Multimedia audio controller: Intel Corp. 82801DB (ICH4) ac'97 Audio Controller (rev 03)

Through the above output, we know that this machine uses the intel AC97 sound card, so we should pay special attention to the AC97 configuration;


Find Device Drivers ---> Sound --->
Sound card support. This must be selected;
Advanced Linux Sound Architecture supports the ALSA driver supported by the Sound card;
The following is an OSS driver. If you want to use a more comprehensive OSS driver, you can buy it. For other options, see the following;
Sequencer support
Sequencer dummy client
OSS Mixer API
Oss pcm (digital audio) API
  • OSS Sequencer API
    RTC Timer support
  • Verbose printk
    [] Debug

    Most of them are default values. If you do not know what to use or how to use them;

    Then let's look down at


    Generic devices ---> enter
    Dummy (/dev/null) soundcard
    Virtual MIDI soundcard
    MOTU MidiTimePiece AV multiport MIDI
    UART16550 serial MIDI driver
    Generic MPU-401 UART driver
    ISA devices ---> select this option if you use the ISA sound card;
    PCI devices ---> if you use the PCI sound card, select it here, and the integrated sound card is also here;
    USB devices ---> This is an option supported by the USB sound card kernel. I have such a sound card, but I have not tried it;
    PCMCIA devices ---> This is the option of PCMCIA sound card. I have not seen such a sound card yet. If you have one, click here.

    Because I use an Intel integrated sound card, we can see two INTEL-related sound cards in PCI;


    Intel/SiS/nVidia/AMD/ALi AC97 Controller. This is the Intel AC97 sound card;
    <> Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL) is an INTEL cat buzzer integrated with machines;

    I found that two conflicts may occur if the driver of the buzzer of the cat is selected. So you can only select the one above;


    Let's go back to Open Sound System ---> and see if it is related to my Sound card?


    Open Sound System (DEPRECATED)
    Intel ICH (i8xx) audio support
    OSS sound modules
    Loopback MIDI device support
    Microsoft Sound System support

    We can also see that there are also a lot of Sound card drivers in the Open Sound System. Let's choose based on the previous lspci-v.



    3) support for the file system used by the operating system should be compiled into the kernel. It is best not to compile the file system into modules. (important)


    For example, my Fedora core 4.0 file system uses ext3, so I want to compile it directly into the kernel. The advantage is that the system cannot be started without the loss or damage of modules; sometimes, when you compile the file system used by the system into a module, a VFS error occurs, it may be because you have not added ext3 to the configuration file of the corresponding loading module. Therefore, to reduce the trouble and minimize the risk, you must directly place it in the internal model;


    File systems --->
    <*> Ext3 journalling file system support
  • Ext3 extended attributes
  • Ext3 POSIX Access Control Lists
  • Ext3 Security Labels

    If you have other hard disk partitions to read, such as reiserfs, ext2, fat, fat32, and ntfs, such partitions can be compiled into modules;


    Another example: If your operating system uses the reiserfs file system, of course, you must directly compile the reiserfs file system into the kernel. Other files can be compiled into modules for support;


    4) hard disk and RAID support should be directly compiled into the kernel;

    For example, ATA, SATA, SCSI, and RAID support are directly supported by the kernel. Sometimes, after the kernel is compiled, the hard disk and RAID cannot be identified during startup. Most of the work is here; slackware has module support in this aspect. We can change it from module M to kernel * for support. If you do not understand it, use the default mode; apart from selecting SATA support and IDE support, you must also select SCSI support;

    5) for devices we don't have, we can leave them out of the kernel, which makes perfect;

    For example, if I do not have an ISDN device, I will remove the ISDN device;


    ISDN subsystem --->
    <> Linux telephony support

    If you do not have a 1394 device, you can also remove the 1394 support and so on .......

    If you have a USB device, take a good look at the USB, such as mobile hard disks, USB cats, and scanners;

    There are so many kernel configurations, too many. I cannot tell them clearly, and the level is limited;

    Save the Configuration

    Save Configuration to an Alternate File

    One

    Enter a filename to which this configuration, shocould be saved as an alternate. Leave blank to abort.
    . Config

    Press enter to save it;

    Then Exit, and save will also appear;

    If you want to save. config, you can copy it to a safe directory for later use;

    5. Compile the kernel;



    [Root @ localhost linux-2.6.12.3] # make
    [Root @ localhost linux-2.6.12.3] # make modules_install

    In this way, the compilation is completed, and the module is also installed in the/lib/modules directory. Please refer:


    [Root @ localhost linux-2.6.12.3] # ls/lib/modules/
    2.6.11-1.1369 _ FC4 2.6.12.3


    6. Install the kernel and configure grub or lilo;


    1. Copy bzImage and Other Related Files and create the initrd file;



    [Root @ localhost linux-2.6.12.3] # cp arch/i386/boot/bzImage/boot/vmlinuz-2.6.12.3
    [Root @ localhost linux-2.6.12.3] # cp System. map/boot/System. map-2.6.12.3
    [Root @ localhost linux-2.6.12.3] # cd/boot
    [Root @ localhost linux-2.6.12.3] #/sbin/mkinitrd initrd-2.6.12.3.img 2.6.12.3

    We copy the compiled bzImage into the/boot directory to the vmlinuz-2.6.12.3;
    And use mkinitrd to create a imitrd-xxx.img file, where xxx is the kernel version number, is to view the/lib/modules to the corresponding version, we compile is 2.6.12.3, so run the above command to create, create a initrd-2.6.12.3.img; do not create this file, sometimes cannot start up, such as the prompt VFS error;


    2. view the configuration file of grub or lilo in the System Boot manager.


    If you want the new inner nuclear energy to be visible on the grub and lilo menus of the System Boot manager, you must change grub. conf or lilo. conf, but we must keep the boot menu of the old kernel in grub and lilo. After all, we cannot make the kernel a hundred percent success, right ?? Security first;

    I only talk about grub. I don't have lilo, and I won't use it. So let's continue with GRUB. The FC 4 System Boot manager is GRUB, so let's talk about GRUB settings;

    View/etc/grub. conf;

    For example, the content of my grub. conf is like this;


    # Grub. conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a/boot partition. This means that
    # All kernel and initrd paths are relative to/, eg.
    # Root (hd0, 7)
    # Kernel/boot/vmlinuz-version ro root =/dev/hda8
    # Initrd/boot/initrd-version.img
    # Boot =/dev/hda
    Default = 0
    Timeout = 5
    # Splashimage = (hd0, 7)/boot/grub/splash.xpm.gz
    # Hiddenmenu
    Title Fedora Core (2.6.11-1.1369_FC4)
    Root (hd0, 7)
    Kernel/boot/vmlinuz-2.6.11-1.1369_FC4 ro root = LABEL =/rhgb quiet
    Initrd/boot/initrd-2.6.11-1.1369_FC4.img
    Title WinXP
    Rootnoverify (hd0, 0)
    Chainloader + 1

    We need to keep the startup of the old kernel to prevent unexpected events. We only need to add the startup of the new kernel, so I will add such a paragraph;


    Title Fedora Core (2.6.12.3)
    Root (hd0, 7)
    Kernel/boot/vmlinuz-2.6.12.3 ro root = LABEL =/rhgb quiet
    Initrd/boot/initrd-2.6.12.3.img

    Let's take a look at the modified configuration file;


    # Grub. conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a/boot partition. This means that
    # All kernel and initrd paths are relative to/, eg.
    # Root (hd0, 7)
    # Kernel/boot/vmlinuz-version ro root =/dev/hda8
    # Initrd/boot/initrd-version.img
    # Boot =/dev/hda
    Default = 0
    Timeout = 5
    # Splashimage = (hd0, 7)/boot/grub/splash.xpm.gz
    # Hiddenmenu
    Title Fedora Core (2.6.12.3)
    Root (hd0, 7)
    Kernel/boot/vmlinuz-2.6.12.3 ro root = LABEL =/rhgb quiet
    Initrd/boot/initrd-2.6.12.3.img
    Title Fedora Core (2.6.11-1.1369_FC4)
    Root (hd0, 7)
    Kernel/boot/vmlinuz-2.6.11-1.1369_FC4 ro root = LABEL =/rhgb quiet
    Initrd/boot/initrd-2.6.11-1.1369_FC4.img
    Title WinXP
    Rootnoverify (hd0, 0)
    Chainloader + 1

    Then restart the machine. If a VFS error occurs, it may be that an error occurs in the important part of my writing;

    Note: If the kernel is re-enabled, the previously installed display card drivers, such as NVIDIA and ATI drivers, must be re-installed;
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.