Detailed steps for creating a boot disk in LINUX

Source: Internet
Author: User
Article Title: detailed steps for creating a boot disk in a LINUX environment. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux boot floppy disks include boot disks and boot/root disks. The so-called boot disks can only be used to start Linux systems installed on hard disks, the boot/root disk itself is a mini Linux system. Linux boot floppy disk is an essential tool for system restoration. Therefore, it is very useful to master how to create a boot floppy disk. Below I will introduce four different boot disk creation methods:
  
   1. Use the mkbootdisk tool to create a boot disk for the current system
Mkbootdisk -- device/dev/fd0 invalid uname-r encrypted
  
Parameter description: -- device/dev/fd0 is used to create a boot floppy disk, which is also the default option. Therefore, you can omit it. The following parameter is the kernel version number, such as 2.2.16, here we use the unzip uname-r kernel command to obtain the kernel version number of the system. For more parameters, see man mkbootdisk.
  
This method creates a boot floppy disk for the current system. Therefore, you must have run the Linux system and install the mkbootdisk package in the system (if not, install the package ). The created boot disk is the same as the boot floppy disk prompted during Linux installation.
  
   2. Install lilo in the boot sector of the floppy disk.
Lilo-B/dev/fd0
  
Parameter description:-B/dev/fd0 installs lilo on a floppy disk, because lilo is installed on the hard disk by default, so it cannot be omitted; the-C config_file parameter allows you to use/etc/lilo. configuration file other than conf. For more parameters, see man lilo.
  
This method also creates a boot disk for the current system.
  
   3. Find a bootable kernel, point its root device to the correct root partition, and then "instantly" it into the floppy disk.
Rdev vmlinuz/dev/hda?
Dd if = vmlinuz of =/dev/fd0
  
Note: The rdev command directs the root device in the kernel vmlinuz to/dev/hda ?, Please put hda? Replace it with your own root partition, and then use the dd command to write the kernel into a floppy disk.
  
This method can be created using any bootable kernel, so it can be completed using other Linux systems, which is particularly useful when you cannot start your Linux system through a hard disk. However, if you use a different kernel than your system, some functions may be lost after startup, for example, some modules cannot be loaded, chinese characters cannot be correctly displayed (when the foreign language kernel is used to guide Chinese Linux). If you want to create a dedicated boot disk for your system, you can use method 1 or method 2 after startup.
  
   4. Use the loader on a floppy disk and a bootable kernel to start the system.
First, create a DOS boot disk (format? /S), copy the loader loadlin.exe and the boot kernel vmlinuz to a floppy disk, and then create an automatic batch processing file autoexec. bat. The content is as follows:
  
Loadlin vmlinuz root =/dev/hda? Ro
  
This method is very simple, because loadlin.exe and a bootable kernel vmlinuz can be found on the Linux installation optical disks of each region, and can be easily copied in DOS or Windows 9x. Similar to method 3, you can use any bootable kernel to guide the system.
  
The above four methods have been verified in the release kits including RedHat, blue dot, Xteam Linux, Turbo Linux, and Hongqi.
  
In addition to the above several methods, you can also use sxslinux to create a Linux boot disk. Since various Linux release kits do not contain it, I will not talk about it here.
Related Article

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.