Crux 2.2 installation and bootloader Configuration

Source: Internet
Author: User

The installation of crux in the evening is always not installed. The main reason is that no bootloader is installed successfully or the configuration of bootloader is not successful. Refer to other articles on the Internet, I think it takes so much time to start crux installation and configuration by using Lilo.

1, because the use of the crux 2-2 version, refer to the official manual http://crux.nu/Main/Handbook2-2 (thanks to the link of Zhou vanadium brother I know this)

2. Use the fdisk command to partition and format the hard disk. My VMware hard disk is IDE, so the command is fdisk/dev/hda (SCSI is/dev/SDA ), my configuration of my hard disk is as follows:

 

 

/Dev/hda1 is used to mount/boot, that is, the kernel file, hda2 is used as the swap partition, hda3 is used as the/partition, and a command is used to set hda1 as the boot disk.

Remember to use the W command to save the settings.

After formatting,

Mkfs. ext3/dev/hda1

Mkfs. ext3/dev/hda3

Mkswap/dev/hda2

Swapon/dev/hda2

 

3. Mount hda3 to the/mnt directory, and hda1 to/mnt/boot.

Mount/dev/hda3/mnt

CD/mnt

Mkdir boot

Mount/dev/hda1/mnt/boot

4. After the configuration is complete, run the setup command to install crux. continue to the next step after the installation is completed. (If the mount is not selected in the third part, during setup, pay attention to re-selecting the mounted directory)

5. Mount related directories

$ Mount -- bind/dev/mnt/dev

$ Mount -- bind/tmp/mnt/tmp

$ Mount-T proc/mnt/proc

$ Mount-T sysfs NONE/mnt/sys

$ Chroot/mnt/bin/bash

 

6. Compile the kernel and install the kernel files and modules.

 

$ CD/usr/src/linux-2.6.15.6

$ Make menuconfig

Select the following two items for Device Driver/Network Device Support/

Save and exit



$ Make bzimage

$ Cp arch/i386/boot/bzimage/boot/vmlinuz

$ CP system. MAP/boot/system. Map

7. Modify fstab to enable the system to automatically mount the devices created by the system at startup, Mount/dev/hda1 to the/boot directory, and mount/dev/hda3 to the "/" directory, for example.


 

8. Configure bootloader

8.1 lilo Configuration

Modify the/etc/Lilo. conf file. Note that the boot here is the hard disk to be started, not the partition (this is where I have been engaged for N years)

 

After the configuration is complete, run the Lilo command to add the relevant startup items and reboot.

 

8.2 grub Configuration

CP/usr/share/GRUB/i386-pc/*/boot/GRUB/
Vim/boot/GRUB/menu. lst
After modifying the grub configuration file, install grub
Grub
Grub> root (hd0, 0) the HD here refers to the hard disk. It doesn't matter whether the SCSI or IDE hard disk is used. 0 refers to the first hard disk. The following 0 refers to the partition where the boot is located. The old grub version starts from 0, that is, 0 indicates the first partition, because my boot is on/dev/hda1, enter 0.
Grub> setup (hd0) install grub to the MBR (primary boot sector) of the first hard disk)
Grub> quit

 

8.2.1 menu. LST configuration. Here, we mainly modify the Linux Startup item and the kernel. Here (hd0, 0)/vmlinuz indicates that my kernel is placed in (hd0, 0) (that is,/dev/hda1) in the vmlinuz partition, root is used to specify the partition where the "/" directory is located. Here I am/dev/hda3, and then reboot restarts.

 

 

Now, the system has been installed successfully and you can enjoy other things!

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.