Boot disks in Linux generally have two types:
One is the system boot disk or the installation disk. Procedure:Create a boot disk in DOS or Windows Enter the DOS environment, insert the first Linux installation disc into the optical drive (assuming the optical drive is set to E: disk), then insert the formatted floppy disk, and execute the following command: C:> E: E:> Cd dosutils E: dosutils> rawrite Enter disk image source file name: e: imagesoot. img Enter Target diskette drive:: Please insert a formatted diskette into drive a: And press -- enter --: E: dosutils> The other is the boot disk of grub. To create a boot disk, perform some simple steps. First, create an ext2 File System on the new floppy disk. Then, install it, copy some grub files to the file system, and finally run the "Grub" program, which will be responsible for setting the Boot Sector of the floppy disk. Are you ready? Create boot disk, part 2 OK. insert an empty disk into the 1.44 MB drive. Enter: # Mke2fs/dev/fd0 After creating an ext2 file system, you must install the file system: # Mount/dev/fd0/mnt/floppy Now, you need to create some directories and copy some key files (these files have been installed before grub was installed) to the floppy disk: # Mkdir/mnt/floppy/boot # Mkdir/mnt/floppy/boot/GRUB # Cp/usr/share/GRUB/i386-pc/stage1/mnt/floppy/boot/GRUB # Cp/usr/share/GRUB/i386-pc/stage2/mnt/floppy/boot/GRUB You only need to perform another step to obtain the available boot disk. Make boot disk, Part 3 When decompressing, compiling, and installing the grub source tar package, grub is stored in/usr/sbin. This program is very interesting and worth noting because it is actually a semi-functional version of the grub boot loader. Yes, although Linux has been started and is running, you can still run grub and execute some tasks, in addition, the interface is exactly the same as that seen when GRUB boot disk is used or grub is installed to the hard disk MBR. This is an interesting design policy. Now we need to use grub of the resident version to set the Boot Sector of the boot disk. Enter "Grub" as the root user ". The grub console will be started, as shown below: Grub version 0.5.96.1 (640 K lower/3072 K upper memory) [Minimal bash-like line editing is supported. For the first word, Tab Lists possible command completions. Anywhere else tab lists the possible Completions of a device/filename.] Grub> Welcome to the grub console. Now, study commands. Make boot disk, Part 4 At the grub> prompt, enter: Grub> root (fd0) Grub> setup (fd0) Grub> quit Now, the boot disk is complete. Before proceeding to the next step, let's take a look at the command you just entered. The first "root" Command tells grub where to find the secondary files stage1 and stage2. By default, grub searches in the specified partition or the/boot/GRUB directory on the disk. These files were copied to the correct location a few minutes ago when the boot disk was installed. Then, enter the setup command, which tells grub to install the boot loader to the Boot Record of the floppy disk. We will discuss this process in detail later. Then exit. Now that you have created a boot disk, you can start using grub. Or you can use a simpler method to create a boot disk for grub. A simple 12-step process is enough. (1) mkfs. ext2/dev/fd0 (2) dd If =/boot/GRUB/stage1 of =/dev/fd0 BS = 512 COUNT = 1 (3) dd If =/boot/GRUB/stage2 of =/dev/fd0 BS = 512 seek = 1 (4) mkfs. ext2/dev/fd0 (5) Mount/dev/fd0/mnt/floppy (6) mkdir/mnt/floppy/boot/grub-P (7) CP/boot/GRUB/stage1/boot/GRUB/stage2/mnt/floppy/boot/GRUB (8) umount/mnt/floppy (9) grub) (10) Root (fd0) (11) setup (fd0) (12) quit Another method is the Lilo boot disk. The following is the procedure: Mount/dev/fd0/mnt If not, add-T ext2 (for Redhat)-T minix (for slackware ?? Not so Sure). In short, mount the file. Copy the core of your compilation to the floppy disk, CP/usr/src/Linux/ARCH/i386/boot/zimage/mnt/vmlinuz ^ Path of the compiled kernel the path of the startup core of your boot disk Then specify the device to be started, Rdev/mnt/vmlinuz/dev/fd0 ^ Start from a soft drive Next, modify Lilo. conf on your floppy disk to suit your requirements. VI/mnt/etc/Lilo. conf Finally, run lilo Lilo-r/mnt Detach a floppy disk. You can start Linux from this floppy disk next time. Umount/dev/fd0 If your Linux version is old, you need to run it after running redv/mnt/vmlinuz/dev/fd0. Rdev/mnt/vmlinuz/dev/fd0h1440 Rdev-r/mnt/vmlinuz 1440 |