China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-24 08:31
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » [Recommended] About making Linux system boot disks View 711 Replies 0
Original Poster Posted 2004-04-14 00:00 ·  中国 广西 南宁 电信
初级用户
Credits 190
Posts 24
Joined 2004-03-21 00:00
22-year member
UID 20723
Gender Male
Status Offline
Linux boot floppies are divided into boot disks and boot/root disks. A so-called boot disk can only be used to boot a Linux system already installed on the hard drive, while a boot/root disk is itself a mini Linux system. Linux boot floppies are essential tools for system repair, so it is very useful to know how to make them. Below I will introduce four different ways to make a boot disk:

  1. Use the mkbootdisk tool to make a boot disk for the current system

  mkbootdisk --device /dev/fd0 `uname -r`

  Parameter explanation: --device /dev/fd0 means to create the boot floppy on /dev/fd0, and this is also the default option, so it may be omitted; the next parameter is the kernel version number, such as 2.2.16, and here the `uname -r` command is used to obtain the system's kernel version number. For more parameters, please refer to the manual page yourself: man mkbootdisk。

  This method will make a boot floppy for the current system, so Linux must already be running, and the mkbootdisk package must be installed on the system (if not, please install that package). The boot disk made this way is the same as the boot floppy you are prompted to make during the Linux installation process.

  2. Install lilo into the boot sector of the floppy

  lilo -b /dev/fd0

  Parameter explanation: -b /dev/fd0 means to install lilo onto the floppy, because by default it is installed onto the hard drive, so this cannot be omitted; the -C config_file parameter lets you use a configuration file other than /etc/lilo.conf. For more parameters, please refer to the manual page yourself: man lilo。

  This method also makes a boot disk for the current system.


  3. Find a bootable kernel, point its root device to the correct root partition, then “burn” it onto the floppy
  rdev vmlinuz /dev/hda﹖
  dd if=vmlinuz of=/dev/fd0

  Explanation: use the rdev command to point the root device in the bootable kernel vmlinuz to /dev/hda﹖; please replace hda﹖ with your own root partition, then use the dd command to write that kernel onto the floppy.

  This method can use any bootable kernel to make the disk, so it can be done with the help of another Linux system, which is especially useful when you can no longer enter your Linux system by booting from the hard drive. But note that if you use a kernel different from your system's own, some functions may be lost after booting, for example some modules may not load, Chinese characters may not display correctly (when using a foreign-language kernel to boot Chinese Linux), etc. If you still want to make a dedicated boot disk for your system, you can use method 1 or 2 after booting is complete.

  4. Use the loader on the floppy together with a bootable kernel to boot the system

  First make a DOS boot disk (format a/s), copy the loader loadlin.exe and the bootable kernel vmlinuz onto the floppy, then create the automatic batch file autoexec.bat, with the following contents:

  loadlin vmlinuz root=/dev/hda﹖ ro

  This method is very simple, because loadlin.exe and some bootable kernel vmlinuz can be found on Linux installation CDs of various versions, and can easily be copied out under DOS or Windows 9x. Its characteristics are the same as method 3: you can use any bootable kernel to boot the system 努
林林
Forum Jump: