76 lines
3.0 KiB
HTML
76 lines
3.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<!-- saved from url=(0079)http://www.ic.unicamp.br/~paulo/software/pc/linux/kernels/old-docs/BOOTDISK.FAQ -->
|
|
<HTML><HEAD>
|
|
<META http-equiv=Content-Type content="text/html; charset=gb2312">
|
|
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
|
|
<BODY><PRE>There's only one question that's *really* frequently asked, and that's
|
|
"How do I make a bootdisk with drivers for XXX?"
|
|
|
|
Well..... here goes. :^)
|
|
|
|
First, you need to make a new kernel with the drivers you want. You'll have
|
|
to apply a small patch first, to make the kernel wait for you to switch in
|
|
the rootdisk before attempting to load it into the ramdisk. This patch can be
|
|
found on ftp.cdrom.com: /pub/linux/slackware_source/bootdisk/ramdisk.c.
|
|
Replace /usr/src/linux/drivers/block/ramdisk.c with this new version. Then,
|
|
'make config' and select the drivers you want. Once you've got that figured
|
|
out, do 'make dep ; make clean ; make zImage' to build the new kernel.
|
|
|
|
Modify the bootflags on the kernel, so that it will load a ramdisk:
|
|
rdev -R zImage 0
|
|
rdev -r zImage 1440 (use 1200 if you're using a 5.25" floppy drive)
|
|
rdev -v zImage -1
|
|
rdev zImage /dev/fd0
|
|
|
|
OK, now we are ready to put this kernel on a disk. Make a copy of a bootkernel
|
|
disk as a starting point, and then mount it with a command like this:
|
|
|
|
mount /dev/fd0 /mnt
|
|
|
|
Put the new kernel in place like this:
|
|
cat zImage > /mnt/vmlinuz
|
|
|
|
And unmount the disk:
|
|
umount /dev/fd0
|
|
|
|
Now the disk must be activated with LILO in order to make it self-booting.
|
|
You'll need to use another copy of the kernel to do this. Put a different
|
|
formatted (and expendable) disk into /dev/fd0, and do this:
|
|
|
|
rdev -r zImage 0 (this tells it NOT to use a ramdisk for this)
|
|
cat zImage > /dev/fd0
|
|
|
|
At this point, reboot your machine, leaving the disk in the drive. Your
|
|
machine will load the new disk, and it will ask you to insert a disk to
|
|
be mounted as root and hit ENTER. At this point, take the disk out and
|
|
replace it with the new bootkernel disk and hit ENTER.
|
|
|
|
You'll see some error messages on your way to the login prompt. You can
|
|
ignore them. When you get a login prompt, log in as root.
|
|
|
|
Now for the magic words:
|
|
|
|
lilo
|
|
sync
|
|
|
|
After typing 'lilo', you should see 'Added ramdisk' and 'Added mount' appear
|
|
at the bottom of the screen. When you get another prompt, you type 'sync'.
|
|
As soon as the disk stops spinning and the drive light goes out, take the disk
|
|
out of the drive.
|
|
|
|
That should do it! This new disk should work as a bootkernel disk.
|
|
|
|
Also - if you already have a kernel image that you want to use, you can use
|
|
an image without the ramdisk patch. You still have to do all the 'rdev's to
|
|
it. If you do use an unpatched kernel, the bootkernel disk you create will not
|
|
prompt for you to insert the rootdisk, but should still work fine. You'll just
|
|
have to swap the rootdisk in once you see the 'Uncompressing Linux' message.
|
|
|
|
Good luck!!! :^)
|
|
|
|
---
|
|
Patrick Volkerding
|
|
volkerdi@mhd1.moorhead.msus.edu
|
|
volkerdi@ftp.cdrom.com
|
|
</PRE></BODY></HTML>
|