Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!!
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.
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!
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.
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
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.