LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-18-2003, 07:56 PM   #1
sb73542
Member
 
Registered: Jul 2003
Distribution: Ubuntu, SUSE
Posts: 79

Rep: Reputation: 15
Kernel recompile- boot floppy?


Hi am going to recompile my kernel. I am following the following partial instructions about updating the boot loader:

Quote:
On an Intel-based system the kernel is installed to the right place in /boot with the command cp /usr/Linux/src/arch/i386/boot/zImage /boot/newkernel then make modules_install This will install the modules in /lib/modules. Next, edit /etc/lilo.conf to add a section like this image = /boot/newkernel label = new read-only At the next reboot, select the kernel 'new' in lilo, and it will load the new kernel. If it works fine, move it to the first position in the lilo.conf so it will boot every time by default.
The only problem is that I boot into Linux from a floppy, I have no boot partition. So what do I do? Thanks!!
 
Old 08-18-2003, 10:31 PM   #2
harrygraham
Member
 
Registered: Apr 2001
Location: Ottawa, Canada
Posts: 157

Rep: Reputation: 18
Why exactly do you want to boot from a floppy? I think most of the newer kernels will not fit on a floppy. Maybe you should try to boot from the hard disk, if at all possible. If you are afraid to set up a dual boot system because you don't want to mess up your Windows, take heart! You can restore straight booting to Windows by putting in the Windows boot disk and typing

fdisk /mbr

This will wipe out your Lilo boot menu.

You can also boot Linux from your Windows partition and not touch your Windows setup - which is still a safe choice and better than using a floppy disk.

Good luck!

Last edited by harrygraham; 08-18-2003 at 10:32 PM.
 
Old 08-19-2003, 02:55 PM   #3
sb73542
Member
 
Registered: Jul 2003
Distribution: Ubuntu, SUSE
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks for the tips. I don't want the whole kernel to compile onto the floppy; I just need the boot disk to point the BIOS to the linux kernel, which is on the harddrive. For example, I use RH9. When I installed it, I used the option "Do not install a bootloader", and then when asked if I wanted to create a boot floppy, I said yes, and that's the one I use to boot Redhat. When it boots, it loads vmlinuz and initrd, whatever they are. I just need to make another boot floppy that will boot the new kernel. How? If I like the modifications I'm attempting, then I promise I'll try a real bootloader! Thanks!
 
Old 08-19-2003, 03:40 PM   #4
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
the thing is that, when you make a boot disk, what boots your Linux is the kernel that you have placed inside the floppy.

It didn't use to be a problem before, because the kernel wouldn't be bigger than 1.4 megs....but now it can easily pass that size, and most of the time it does.

Why do you not want to boot from the boot loader?

I strongly suggest, like harrygraham did, to boot from the bootloader.
 
Old 08-19-2003, 04:42 PM   #5
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
if you dont want to install a boot loader on the harddisk then put a copy of grub(way better than lilo) on a floppy, and then point it to where ever you want to keep your kernels on the harddisk.

about kernel size, i dont know anything about precompiled kernels because ive always compiled my own but after just checking, i have various 2.4 kernels compiled for different machines and they vary between 703k and 952k, nothing anywhere near 1.4MB
 
Old 08-19-2003, 06:52 PM   #6
harrygraham
Member
 
Registered: Apr 2001
Location: Ottawa, Canada
Posts: 157

Rep: Reputation: 18
Lightbulb

So in your present arrangement you are booting from a floppy, but the kernel is on the hard disk, correct? And you have already made the new kernel but do not know if it will work yet. I see a few problems with this way of doing it, but here's what I would try:

You should make your new kernel over again properly, and name it properly by editing the Makefile to something different than the original kernel.

Then to prevent any overwriting the old kernel you must rename the kernel when you copy it to the /boot directory like this:

cp bzImage /boot/linuz-2.4.8-36

if that's what you have named it in the makefile. You also need to copy the new system map to the /boot directory or it won't find the new modules you have made.

Then when it comes to rebooting, you can use the same boot disk , or rescue disk to boot to either one of the kernels.

As I have never done it this way, I'm not 100% sure it is correct, but at least it gives you some ideas to start with.

Harry
 
Old 08-19-2003, 08:31 PM   #7
sb73542
Member
 
Registered: Jul 2003
Distribution: Ubuntu, SUSE
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks again for the help. I should probably explain my partitioning scheme. I have a 13 GB drive,
7.75 GB FAT32 (Win 98 SE)
2 GB ReiserFS (RH9)
256 MB Linux Swap (common)
3 GB XFS (MDK 9)

Wouldn't I run into the 1024 cylinder error? RH just boots a linux kernel from /dev/hda2 when I use the boot floppy. Vmlinuz is the biggest file on the floppy. The second largest is initrd.img.

I could shrink my XFS partition to make room for /boot, if that would work. Keep in mind, I have no /boot partition on the drive. What's the best way to install Grub without re-installing my OS's? If I installed Grub on a floppy, would I tell it to boot /dev/hda2/mykernel, or what?

FYI, I'm having trouble with the kernel recompile. It seems to be trying to compile it onto a /boot partition which I don't have...more on this later once I fire up Linux again to post the error message.
 
Old 08-19-2003, 11:01 PM   #8
harrygraham
Member
 
Registered: Apr 2001
Location: Ottawa, Canada
Posts: 157

Rep: Reputation: 18
Question Try this

That Vmlinuz file on the floppy is a kernel, so I am unclear about what is being booted when you put your disk in.

I wouldn't add a boot partition. I don't trust the resizing tools, especially if the data is very important. Just add a /boot directory to the ( / ) without changing the partitions and it should work fine. Try this:
(as root)

cd /
mkdir /boot


I get the 1024 error message as well and it seems to make no difference.

To compile the kernel, here are the steps I follow:
start the X desktop as root user
start xterm as root
change to the /usr/src/linux directory
make mrproper
make oldconfig
edit the top 4 lines in you Makefile
make xconfig
custom tailor your kernel and save it
make dep
make clean
make bzImage
make modules
make modules_install
make install *


* The make install command will put everything into the /boot directory and wipe out your previous MBR, but it works for me. This means that it will not boot into Windows anymore, but frankly, that can be easily added later by editing the lilo.conf file and then running the lilo command.

Hope this helps,

Harry

Last edited by harrygraham; 08-19-2003 at 11:11 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel compile while using floppy to boot? detpenguin Slackware 6 06-22-2004 07:08 PM
boot new kernel from floppy nirva Slackware 3 03-20-2004 10:46 AM
Boot floppy problems with kernel 2.6.2 Groucho Slackware 1 02-05-2004 01:56 PM
Kernel won't boot from floppy tmorton Slackware 2 08-25-2003 09:57 AM
kernel recompiled - but i boot from floppy? gui10 Slackware 8 05-08-2002 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration