On Wed, 2002-05-01 at 15:29, Russell L. Harris wrote:
> Greetings, Karl.
> 
>          You recall that, upon discovering that the network was down after 
> I upgraded from kernel 2.2.20 to 2.4.18-586tsc, I rebooted from floppy and 
> installed kernel 2.4.16-586tsc (the only other suitable alternative in 
> TESTING).
> 
>          Today, when I try to upgrade back to kernel 2.4.18-586tsc, apt-get 
> returns the message:
> 
>      Sorry, kernel-image-2.4.18-586tsc is already the newest version.
> 
>          However, uname tells me that the kernel is 2.4.16.  I rebooted and 
> tried again to install 2.4.18, but received the same error message from 
> apt-get.  Must I be content to run 2.4.16 forever?

You have both kernels installed right now.  Are you using Lilo to boot,
or Grub?  I assume Lilo, since you installed using the standard CD...

If you look in your /etc/lilo.conf, you'll see that there are two images
available for booting.  Look in / or in /boot for the symlinks
referenced by the lilo.conf.  You can reverse them if you like:

# mv vmlinuz.old vmlinuz.new
# mv vmlinuz vmlinuz.old
# mv vmlinuz.new vmlinuz

Do the same thing for the "initrd.img" links if they exist, and then run
"lilo" before you reboot.

Another option, really a better one, IMO, is to "apt-get install grub
grub-doc".  (leave lilo installed for now; and please read this to the
end before you proceed, at your own risk, NO WARRANTY and all that...)

Have you ever forgotten to run "lilo" after changing something, and
wound up with an unbootable machine?  Grub fixes that problem, by giving
you a boot loader shell from which you can choose, by hand if necessary,
which kernel to boot and what command line to give it.  You can also, of
course, set that all up in advance, in the "menu.lst" file... (see below
and RTFM)  Grub is filesystem aware.  Make sure that your "/boot" drive
has a supported filesystem type on it.  Run "ls /usr/lib/grub/i386-pc/"
to see which ones it supports.

I don't think that Grub, yet, can deal with EVMS or LVM volumes.  It
could not do so last time I tried it, so your "/boot" directory must
reside on a PC BIOS compatible volume. (a normal partition)

# cd /boot
# mkdir grub
# ln -s . boot
# cd grub
# cp -a /usr/lib/grub/i386-pc/* .

# grub

At this point, you are inside the grub shell.  You are about to replace
the master boot record with Grub!

How is your drive partitioned?  What partition is "/boot" on?

In Grub, (hd0) means the same as Linux /dev/hda, and (hd1) is /dev/hdb.
(hd0,0) is /dev/hda1, and (hd0,1) is /dev/hda2.  It's simple enough...

So, say your "/boot" directory resides on "/dev/hda1".  It probably
does, but perhaps is not... find out by typing "df /boot" and seeing
what device it prints out.

If you are using "devfs" and a 2.4 kernel, it might print something like
the following, rather than something like "/dev/hda1":

/dev/ide/host0/bus0/target0/lun0/part1

... for the device name.  If so, you must translate that into a grub
device name...  "ls -l /dev/discs/" (note the trailing "/"!) will show
you the table.  (hd0) == disc0, (hd1) == disc1, and so forth.

Now that you know what disk device "/boot" resides on, you can use the
grub shell's "setup" command to install Grub.  There's an "info"
document for Grub, so you can read that with "info grub" to get the
details.  The grub shell has a "help" command also.  Here's the quick
recipe... remember to replace the drive and boot partition in my example
with the right devices for your own machine!

grub> setup (hd0) (hd0,0)

If that worked, then proceed to the next step.  Otherwise, RTFM and ask
someone what do next if you can't figure it out...

!!! Don't forget to run "lilo" if grub DID NOT install, since the failed
grub install probably left your computer unbootable...  If you are not
using Lilo in the MBR (look in lilo.conf and see if "boot" and "root"
are the same, or if "boot" is the device without the partition
number...  If the latter, that is, boot is the device and not a
partition of it, then just running "lilo" will restore your old MBR,
otherwise, you probably need to reinstall "mbr" or a (gasp) DOS MBR.  I
imagine that most people with a Linux only system (no dual boot) will
have Lilo in the MBR...  Remember the question regarding this that it
asked during install from the boot-floppies or CD?)

Type "Ctrl-D" to exit the grub shell, and then use your editor to change
"/etc/kernel-img.conf" (make a backup of the current one if you like) to
read:

8<-------------------------------------------------------->8
do_symlinks=no
image_in_boot=yes
do_initrd=yes
do_bootfloppy=no
do_bootloader=no
postinst_hook=update-grub
postrm_hook=update-grub
8<-------------------------------------------------------->8

Now run "update-grub", and let it create a default "/boot/grub/menu.lst"
for you.  Edit that (it is mostly self-documented), then run
"update-grub" again.  The hooks in the kernel-img.conf will ensure that
the file is updated automaticly when you install a new kernel-image
package.  "update-grub" adds the new kernel to the boot menu.

If all goes well, you should see a nice grub menu screen when you
reboot.  Please have a boot floppy ready in case this did not work
right!

If it reboots fine, then type "apt-get remove lilo" and be sure not to
let lilo install a boot block for as long as you are using Grub.

-- 
As any limb well and duly exercised, grows stronger,
the nerves of the body are corroborated thereby. --I. Watts.
 We are deB.ORG; You will be freed.
 <URL:http://www.debian.org/social_contract>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to