Tech

Guides
 

Create a Linux boot disk with mkbootdisk

By Mary Ann Richardson, Special to ZDNet Asia
Thursday, August 15, 2002 12:00 PM
One of the questions I had when I first started working with Linux was how to create a boot disk as I had done for my Windows machines. While I did learn how to make such a disk during the Red Hat Install process, I still wanted to create an additional boot disk in case something happened to the original. I found that I could do this with the mkbootdisk command. In this article, I will present a step-by-step guide to using mkbootdisk  to create a boot disk for a Linux machine.

Preparing to use mkbootdisk
Since the mkbootdisk command can only be executed from a command prompt, you must be working in a Linux terminal. If you are working from a graphic desktop, such as GNOME or KDE, you will need to open a Terminal Emulation Window. In GNOME, you do this simply by clicking the Terminal Emulation button on the Panel at the bottom of the screen.

You will need to find the kernel number for the version of Linux running on the machine. This number is a required argument for the mkbootdisk command. To find the number, follow these steps:

1. Type cd /lib/modules at the command prompt.
2. Press [Enter].
3. Type ls at the second prompt.
4. Press [Enter].



You will then see the following displayed in the terminal window:

[UserOne@localhost UserOne]$ cd /lib/modules
[UserOne@localhost UserOne]$ ls
2.2.12-20

After you enter the ls command, the Linux kernel version number is displayed; in this example, the number is 2.2.12-20. This is the number you will use for the mkbootdisk command.

Log on as root
If you're not already logged on as root, switch to root user with the following commands (you'll need to enter the root password when prompted):

[UserOne@localhost UserOne]$ su root
Password:
[root@localhost UserOne]#

The terminal window will display the root command prompt. Make sure that /dev/fd0 is unmounted by entering the mount command with no arguments. If /dev/fd0 is listed as mounted, use the umount command to unmount it like this:

[root@localhost UserOne]# umount /dev/fd0

Create the boot disk
You're now ready to make the boot disk. Label a floppy disk Linux Boot Disk and place it in the drive. (Since mkbootdisk will erase and replace all information on the disk, you don't need to be concerned about the disk format. For this example, I inserted a 1.44-MB IBM PC formatted disk.)

At the root command prompt, enter the mkbootdisk command using the kernel number you obtained above, like so:

[root@localhost UserOne]# /sbin/mkbootdisk 2.2.12-20

(Note that I used the full pathname for the command. Without the full pathname, I received a Command Not Found message.) After pressing [Enter], the following message is displayed: Insert a disk in /dev/fd0. Any information on the disk will be lost.

Press to continue or ^C to abort:

At this point, press [Enter] to confirm. After mkbootdisk copies the kernel and all other necessary programs to the disk, the command prompt will return.

Don’t forget to test your boot disk
The final step to this process is to test the boot disk by rebooting the computer with the disk in the drive. It’s also a good idea to check your boot disks periodically. However, if for some reason you find that you can’t reboot and your boot disk doesn’t work, you may still be able to get your system running using one of the ready-made boot disks found on the Linux Bootdisk HOWTO page.



WORTHWHILE?

0

0 votes
Blog

Talkback 2 comments

The information was very useful,I would also like to know the method to make a boot disk for linux ia64.Can u please let me know.
Posted by K Vasanta Lakshmi on Thursday, November 14 2002 05:00 PM

Excellent post. I have to configure fedora 5 to boot from a floppy, usb, or cd-rom. will the process you listed work for the fedora core?
Posted by Ken Dupree on Tuesday, June 12 2007 06:32 AM


Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Whitepapers/Case Studies

Downloads

Network Administration News

 
Technology and growth at mid-sized companies
Learn how you can make intelligent use of ICTs to gain a competitive advantage in your industry.


» Download the EIU report now



Manage you IT infrastructure with greater ease
Consolidate IT resources into a single environment.
» Ultimate virtualization blade
» Scalable SAN solution
» Accelerate service delivery


Tech Jobs Now!

Tags

  1. analysis
  2. bootexecute
  3. check box
  4. check disk
  5. data backup disaster recovery
  6. dialog box
  7. disk
  8. dos
  9. greg shultz
  10. microsoft windows
  11. microsoft windows vista
  12. registry
  13. registry editor
  14. start - up
  15. tool