LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   does 2.6 require a boot loader? (https://www.linuxquestions.org/questions/linux-general-1/does-2-6-require-a-boot-loader-275318/)

MaulingMonkey 01-08-2005 07:20 AM

does 2.6 require a boot loader?
 
Attempting to upgrade my kernel to 2.6 from 2.2 (yuck) on my debian system - I get a warning that I need to configure my boot loader to use an initrd image - thing is, I don't even use a boot loader on my server. Do I need to?

Code:

You are attempting to install an initrd kernel image (version 2.6.8-1-386)
This will not work unless you have configured your boot loader to use
initrd. (An initrd image is a kernel image that expects to use an INITial
Ram Disk to mount a minimal root file system into RAM and use that for
booting).

  As a reminder, in order to configure LILO, you need
  to add an 'initrd=/initrd.img' to the image=/vmlinuz
  stanza of your /etc/lilo.conf

I repeat, You need to configure your boot loader -- please read your
bootloader documentation for details on how to add initrd images.

If you have already done so, and you wish to get rid of this message,
please put
  "do_initrd = Yes"
in /etc/kernel-img.conf. Note that this is optional, but if you do not,
you will continue to see this message whenever you install a kernel
image using initrd.


musicman_ace 01-08-2005 07:24 AM

After you've done:

make bzImage
make modules
make modules_install
cp bzImage /boot/bzImage

do this

mkinitrd -k bzImage -i initrd2.6

and you do use a boot loader. Everyone does. Most likely it is LILO, however I don't use debian so it could be GRUB.

MaulingMonkey 01-08-2005 07:30 AM

After playing the gambling game, I've rendered my system unbootable :P. I'm off to make a rescue floppy (since the installed CD drive is toasted...)

In any case, apparently debian does use LILO - was there a time when a boot loader wasn't required? (because I could swear I remember a "none" option on RH9, and I remember LILO wouldn't work on that box, and I'm pretty sure I didn't install GRUB...)

Further reading shos that it should have my image all ready for me (<3 atp) - it's just that it's having an issue finding it's root partition. Prehaps a mismade image file, I'll look into it.

Thanks for the help though :-)

After playing the gambling game, I've rendered my system unbootable :P. I'm off to make a rescue floppy (since the installed CD drive is toasted...)

In any case, apparently debian does use LILO - was there a time when a boot loader wasn't required? (because I could swear I remember a "none" option on RH9, and I remember LILO wouldn't work on that box, and I'm pretty sure I didn't install GRUB...)

Further reading shos that it should have my image all ready for me (<3 atp) - it's just that it's having an issue finding it's root partition. Prehaps a mismade image file, I'll look into it.

Thanks for the help though :-)

edit: trying to find a decent floppy image, neither of the two I've tried so far have worked ^_^;;. Pretty sure this one will. I'll post a link and mini walkthrough once I've fixed my system :-).
edit #2: Now I'm thinking It's my floppy drive (tried 3 floppies, 3 images, same results). Attempting to continue with the original debian one, entered kernel.bin for the kernel... it's loading as I add this edit <_<;;
edit #3: After major hardware issues (series of failed bits which affected both the cd drive, floppy, and etc...) I've finally got the mini howto:

1) Grab a rescue disk. Anything that'll give you a shell will do.

1.5 a) Assuming you're on a floppy you may want to remount onto your old root if things are fubared:
1.5 b) mount /dev/hd__ /mnt/linux (you may need to create /mnt/linux first)
1.5 c) cd /mnt/linux
1.5 d) chroot .

You'll still need to mount /dev/hd__ if you're using a CD, but the chroot will be un-necessary and probably in the way ("ls -l" segfaulted due to the differing kernels of the floppy and the root system for which the stdlib that ls used was installed for)

2) Find the appropriate entry in /etc/lilo.conf - there should be a few image= lines. Try searching for "Linux" as that will probably be the menu label, even if you never see a menu.
3) Assuming you've had a symlink to initrd made (on my system it was made as /initrd.img) change your config from something like:

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

to:

image=/vmlinuz
label=Linux
read-only
initrd=/initrd.img
# restricted
# alias=1

3a) If you're new to command line editing, here's what you want to do:

either:
# vi /mnt/linux/etc/lilo.conf
or:
# vi /etc/lilo.conf
depending on wheither you chrooted or not

3b) Press the up/down arrows until you get to just above where you want to insert the initrd line
3b) Hit the O key to open a new line down there
3c) Hit TAB, then enter "initrd=/initrd.img" without the quotes.
3d) Hit ESCAPE to stop editing the line
3e) Hit COLON (:) then enter "wq" and hit ENTER to save your changes and exit.

4) run /sbin/lilo as root to update your MBR
5) reboot, I was fixed at this point.


All times are GMT -5. The time now is 05:17 AM.