Red Hat Linux 6.2: The Official Red Hat Linux Getting Started Guide | ||
---|---|---|
Prev | Chapter 12. Shell Prompt Basics | Next |
When you're logged in as root, you might want to take a few minutes to create a fresh boot disk or copy the boot disk you already have.
There are a number of reasons you should make a boot disk: it can help you recover from a system failure, it can help you test a new kernel you've downloaded and compiled and it can help you share your computer with more than one operating system.
You were given the opportunity to make a boot disk when you installed Red Hat Linux. If you chose not to make a boot disk at installation, here's your chance to start from scratch.
Open an Xterm and make sure you're logged in as root. At the shell prompt, if you see something like [newuser@localhost newuser]$, for example, type:
[newuser@localhost newuser]$su - Password: yourrootpassword [root@localhost newuser]# |
A "super" command | |
---|---|
The command su means substitute users, which lets you temporarily log in as another user. When you type su all by itself and press Enter, you become root, or "superuser" while still inside your login shell. Typing su - makes you become root with root's login shell -- that is, it's as if you had logged in as root. What's the difference? There are some commands which can be performed only if you've logged in as root; so typing su - allows you to perform these commands without logging out and logging back in. |
Briefly, you'll find the Linux kernel version; then, you'll use the mkbootdisk command to make a bootable floppy from the kernel.
Put a standard diskette in the floppy drive.
Naming the floppy drive | |
---|---|
In Linux, the floppy drive is referred to as /dev/fd0. |
If you have previously used the diskette, remember: You will lose anything that had been on that diskette!
Now, at the prompt, type:
cd /lib/modules |
Now, type:
ls |
Here, you can find the kernel version of your Red Hat Linux system. The kernel is the heart of any Linux system. Your kernel version will be something similar to:
2.2.x-yy |
Now that you've found the kernel version, you can tell the mkbootdisk command which kernel to copy to your floppy. (If you don't tell mkbootdisk where to copy the kernel, it will default to copying to the floppy in /dev/fd0.)
Just type:
mkbootdisk --device /dev/fd0 2.2.x-yy |
Then press Enter.
Clearing things up | |
---|---|
If your screen becomes a little crowded with commands and command not founds, you can always start with a clean slate by typing clear at the prompt. |
You're done.
Summary | |
---|---|
As root, in a terminal window, cd /lib/modules; choose kernel number; then type mkbootdisk --device /dev/fd0 kernel.number. To clean the display, type clear. |