LinuxQuestions.org
Review your favorite Linux distribution.
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 03-03-2003, 11:14 PM   #1
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Rep: Reputation: 30
I killed Linux :(




I was trying to update the kernel on one of my dev boxes from 2.4.18 to 2.4.20. Not for a reason really, just to see if I could do it. So I recompiled the kernel, moved over the bzImage to the /boot directory, edited my lilo.conf file, and reloaded lilo.conf (/sbin/lilo). After the reboot, it didn't load the kernel. Heh, I feel like I've gone through my rite of passage or something. On to the next attempt.

Here is what I had before that final reboot. I didn't have a 2.4.20 version of this file "initrd-2.4.18-14.img" to use. So I changed it to the bzImage file. I assume that's where I messed up. During the compile, I figured I would have gotten a new version of the initrd file. Any ideas?

Quote:
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinux
label=linux
initrd=/boot/initrd-2.4.18-14.img
read-only
append="hdd=ide-scsi root=LABEL=/"

Last edited by AMDPwred; 03-03-2003 at 11:15 PM.
 
Old 03-03-2003, 11:33 PM   #2
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
You need to make an new initrd image for each specific kernel.

See the man page for mkinitrd.

Also you dont need to replace your old kernel, just add an entry for the new one to your lilo.conf and keep the old one around for emergencies.

When you copy the new kernel to /boot also copy the System.map file in /usr/src/linux (or whereever you compiled it) name the System.map file for the kernel version, ex for kernel 2.4.20 you would name the System.map file "System.map-2.4.20" and copy it to /boot and name the new bzImage
vmlinuz-2.4.20 and copy that to boot. Then make the appropriate lilo.conf entries and run /sbin/lilo.
You can have as many kernels as you want. Collect 'em, trade 'em, name 'em after your pets
 
Old 03-03-2003, 11:35 PM   #3
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Original Poster
Rep: Reputation: 30
:rofl: Thanks for the post!

Could you give me an example of your lilo.conf file?
 
Old 03-03-2003, 11:39 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
There is an example of a lilo.conf in this thread.
 
Old 03-03-2003, 11:43 PM   #5
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
This is a new mandrake install so I dont have alot on boot as far as custom kernels. The willcustom entry is just the default kernel recompiled to eliminate some junk and get the right chip arch.



boot=/dev/hde
map=/boot/map
vga=normal
default=linux
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
ignore-table
disk=/dev/hde bios=0x80
disk=/dev/hdg bios=0x81
image=/boot/vmlinuz
label=linux
root=/dev/hde7
initrd=/boot/initrd.img
append="hdc=ide-scsi devfs=mount"
read-only
image=/boot/vmlinuz-2.4.19-17willcustom
label=willc
root=/dev/hde7
initrd=/boot/initrd-2.4.19-17willcustom
append="devfs=mount hdc=ide-scsi"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hde7
initrd=/boot/initrd.img
append="failsafe devfs=nomount"
read-only
other=/dev/hde1
label=windows
table=/dev/hde
other=/dev/fd0
label=floppy
unsafe
 
Old 03-04-2003, 12:06 AM   #6
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Original Poster
Rep: Reputation: 30
Ok, after a reinstall of RH and some compiling of the 2.4.20 kernel, I tried everything again. I took the System.map file and renamed it to show which kernel version it is, along with the vmlinux file. I moved them both over to /boot/ and my lilo.conf file looks like this:

Code:
prompt
timeout=50
default=2.4.20
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.18-14
label=2.4.18-14
initrd=/boot/initrd-2.4.18-14.img
read-only
append="hdd=ide-scsi root=LABEL=/"

image=/boot/vmlinux-2.4.20
label=2.4.20
initrd=/boot/System.map-2.4.20
read-only
append="hdd=ide-scsi root=LABEL=/"
When I run the /sbin/lilo command, I get:

Code:
Added 2.4.18-14
Fatal: Kernel doesn't support initial RAM disks
When I rebooted, I booted into the 2.4.18 kernel. Any idea what I'm doing wrong?
 
Old 03-04-2003, 12:53 AM   #7
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
For one thing this line:
initrd=/boot/System.map-2.4.20

Should have a initrd image on the right of the equals sign. Just put the
System.map-2.4.20 in boot, its sort of a reference file for the kernel and shouldnt be listed in lilo.conf.

While your booted to 2.4.18 make an initrd for the new kernel and list the initrd image under the new kernels lilo entry.

Like so:

image=/boot/vmlinuz-2.4.18-14
label=2.4.18-14
initrd=/boot/initrd-2.4.18-14.img
read-only
append="hdd=ide-scsi root=LABEL=/"
 
Old 03-04-2003, 08:57 AM   #8
arnold
Member
 
Registered: Dec 2002
Posts: 226

Rep: Reputation: 30
I do not use initrd - and always boot from a diskette - also keep my lilo.conf on diskette:

timeout=100
message=/mnt/fd0/boot/message
map=/mnt/fd0/boot/lilo_map
backup=/mnt/fd0/boot/boot_sector
install=/mnt/fd0/boot/boot.b
default=windows
prompt
lba32
compact
read-only
vga=ext
change-rules
reset

other=/dev/hda1
table=/dev/hda
label=windows
alias=win
loader=/mnt/fd0/boot/chain.b

image=/vmlinuz ###Mandrake
label=LnxHdd3_2.4.18
root=/dev/hdd3

image=/mnt/hda5/boot/vmlinuz ##RH
label=RedHat_7.3HD
root=/dev/hda5

image=/mnt/fd0/vmlinuz ### LInux on diskette
label=LnxFlp_2.4.18
root=/dev/hdd3

image=/vmlinuz.PREV ## Previous
label=LnxHdd3_2.4.18P
root=/dev/hdd3

image=/mnt/hda1/vmlinux.2.4
label=LnxHDa1_2.4
root=/dev/hdd1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
someone please help! iv kinda killed linux! roddyguk Linux - Software 9 10-14-2005 01:18 PM
Well I Killed My Linux adambeazley Linux - Newbie 3 04-28-2004 01:19 AM
Ahhh...I killed Linux...help! cmackay Linux - Newbie 3 01-10-2004 07:39 AM
linux killed my pc f0rmat Linux - Newbie 4 01-10-2002 01:13 PM
Linux killed my hd?!! Jeffrey Linux - Software 8 02-22-2001 09:15 AM


All times are GMT -5. The time now is 11:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration