Solved

how to copy linux rescue kernel to disk?

Posted on 2004-03-26
9
318 Views
Last Modified: 2013-12-16
Yes I'm back!

I have just replaced the adaptec raid Controller in my machine with a mylex one.

Of course, I can't boot. I can boot from linux rescue, so how do I copy the kernel that linux rescue has created (and all required files) to my hard disk, so that I can boot my system and rebuild my other kernels?
0
Comment
Question by:doubledrat
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
Theoritically, you should :
- boot rescue
- mount read-write your HD (like mount /dev/hda1 /tmp)
- dd if=/dev/floppy (or whatever device it's on) of=/boot/rescueKernel
Then edit your lilo.conf adding :

image = /boot/rescueKernel
label = rescue
root = /dev/hda1

Run :

lilo -r /dev/hda1

Of course, replace hda1 with your actual root device.

And then, select rescue as the boot option. You can also add the followin line to your lilo.conf :

default = rescue

So that you don't have to select it at boot. Don't forget to change it afterwhile.
0
 
LVL 17

Expert Comment

by:owensleftfoot
Comment Utility
Your problem isnt your kernel, its the initial ramdisk which contains modules for your mylex controller.
0
 

Author Comment

by:doubledrat
Comment Utility
owensleftfoot: ok, so what's my solution? ;-)
Alf666: I'm using grub, booting rh9 from cd.  does that make a vast difference?
0
 
LVL 17

Expert Comment

by:owensleftfoot
Comment Utility
Backup your data and re-install rh9 would be the easiest way - redhat will create its own initrd.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:doubledrat
Comment Utility
owensleftfoot: I've spent hours customising this installation, so that's not really an option for me.
0
 
LVL 17

Expert Comment

by:owensleftfoot
Comment Utility
0
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
Comment Utility
In the general case replacing one RAID controller with a different make or model will result in the RAID array being inaccessible. Sometimes it is possible move a RAID 0 or RAID 1 array from one controller to another, but even that can yield failures later. Some RAID controllers store their config in NVRAM, so swapping out with the same make/model looses the RAID array.

The only completely safe method of changing RAID controllers is to do a full system backup with cpio or dump while running the old controller, swap controllers and build new RAID arrays, boot into rescue mode and create partitions, file systems and swap, and then restore from backup.

You have to have an initrd image that includes the driver for the replacement controller and that can be done before the swap or after from the rescue boot. Doing it before the controller swap is the easiest. Simply plugging the controller into the system, allowing kudzu to find it and then making a new initrd  will work. Otherwise you need to find out what driver the new controller uses and use "--with=driver-module" when running mkinitrd.
0
 

Author Comment

by:doubledrat
Comment Utility
of course!  put both cards in!  duh.

I created the new initrd before the swap and it worked a treat ta.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Yes, having both cards in the machine when you execute mkinitrd will work because the module for that card will be loaded. Knowing the module name you could have used the "--with=driver-module" option to mkinitrd even with the card not in the system.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now