linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:38:33 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info

How do I create a boot disk in Linux?

Written By: Tcrompton
Like everything in Linux, there's more then one way to do it. I'll describe the two more popular ways.

First locate the kernel image you are currently using. If you use LILO, have a look at the /etc/lilo.conf file. Here's an example lilo.conf file:

 boot=/dev/hda1
 map=/boot/map
 install=/boot/boot.b
 prompt
 timeout=0
 image=/boot/vmlinuz
        label=linux
        root=/dev/hda7
        read-only

The "image=" option indicates which kernel image you're using.

Sometimes "image=" points to a symlink (a shortcut file for you Windows users). You'll need to know the actual file that the symlink points to:
Eg.
[you@localhost you]$ ls -al /boot/vmlinuz lrwxrwxrwx 1 root root 20 Feb 19 18:32 /boot/vmlinuz -> vmlinuz-2.2.14-15mdk

Here "vmlinuz" points to "vmlinuz-2.2.14-15mdk".

Method #1, the "dd" command

Now we'll use the "dd" command to copy the kernel image to a floppy disk. Insert the floppy disk prior to entering the "dd" command, but don't mount it. "dd" needs to write raw data to the disk, which is not possible if you mount the drive. Now type the following as root:

dd if=/boot/vmlinuz of=/dev/fd0 bs=8192

This is ok because "dd" follows the symlink to the right file ("vmlinuz-2.2.14-15mdk"). You could have also used the complete file name. Eg.
dd if=/boot/vmlinuz-2.2.14-15mdk of=/dev/fd0 bs=8192

Method #2, the "mkbootdisk" command

"mkbootdisk" needs to know the version of your kernel. In this example, the version is "2.2.14-15mdk", which is just the last part of "vmlinuz-2.2.14-15mdk". If your kernel doesn't have any version information in the filename, pick the latest kernel version from the "/lib/modules" directory.

Eg. [you@localhost you]$ ls /lib/modules
2.2.13-22mdk 2.2.14-15mdk

Now type the following as root:
mkbootdisk --verbose --device /dev/fd0 2.2.14-15mdk

With the method, we have the option of using a "rescue disk", along with our boot disk at boot time. A rescue disk contains various utilities to fix problems in Linux.

Now that you have created a boot disk using Method #1 or #2, test the boot disk out by rebooting the computer with the disk still in the drive. This is an important step, otherwise you won't know whether it will work when you need it.

If you're locked out of Linux, and require a boot disk to get back in or the boot disk you have doesn't work, this page contains links to pre-made boot disks: http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO/premade.html

If you have access to a DOS machine, I recommend the Small Floppy Rescue System:
http://www.ibiblio.org/pub/Linux/system/recovery/ramf-90.exe

For more information on Linux boot disk or creating your own rescue disk, consult the Linux Bootdisk HOWTO at:
http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO/index.html

[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif