Securing and Optimizing Linux:RedHat Edition | All about OS

Making a new rescue floppy

Категория: Securing and Optimizing

After the reboot of your Linux server, you should have now a system with an upgraded kernel. Therefore, it’s time is to make a new rescue image with the new kernel in case of future emergencies. To do this, follow the simple step below:
• Login as root, and insert a new floppy, then execute the following command: [root@deep f\# mkbootdisk -device /dev/fdO 2.2.14
Insert a disk in /dev/fdO. Any information on the disk will be lost. Press <Enter> to continue or AC to abort:
Important note: The mkbootdisk program runs only on modularized kernel. So you can’t use it on a monolithic kernel; instead create an emergency boot floppy as shown below if you have a problem with your system in the future.
Making a emergency boot floppy disk
Because it is possible to create a rescue floppy only on modularized kernel, we must find another way to boot our Linux system if the Linux kernel on the hard disk is damaged. This is possible with a Linux emergency boot floppy disk. You should immediately create it after you successfully start your system and log in as root.
• To create the emergency boot floppy disk, follow these steps:
1. Insert a floppy disk and format it with the following command: [root@deep /]# fdformat /dev/fd0H1440 Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB. Formatting … done Verifying … done
2. Copy the file “vmlinuz” from the “/boot” directory to the floppy disk: [root@deep /]# cp /boot/vmlinuz /dev/fdO
cp: overwrite 7dev/fdO’? y
The “vmlinuz” file is a symbolic link that point to the real Linux kernel.
3. Determine the kernel’s root device with the following command: [root@deep /]# rdev /dev/sda12/
The kernel’s root device is the disk partition where the root file system is located. In this example, the root device is “dev/sda12″; the device name may be different on your system.
4. Set the kernel’s root device with the following command: [root@deep /]# rdev /dev/fdO /dev/sda12
To set the kernel’s root device, use the device reported by the “rdev” command utility in the previous step.
5. Mark the root device as read-only with the following command: [root@deep /]# rdev -R /dev/fdO 1
This causes Linux initially to mount the root file system as read-only. By setting the root device as read-only, you avoid several warning and error messages.
6. Now put the boot floppy in the drive A: and reboot your system with the following command: [root@deep /]# reboot

« Delete program, file and lines related to modules
Update your “/dev” entries »