Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

how to copy linux rescue kernel to disk?

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
doubledrat
Asked:
doubledrat
  • 3
  • 3
  • 2
  • +1
1 Solution
 
Alf666Commented:
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
 
owensleftfootCommented:
Your problem isnt your kernel, its the initial ramdisk which contains modules for your mylex controller.
0
 
doubledratAuthor Commented:
owensleftfoot: ok, so what's my solution? ;-)
Alf666: I'm using grub, booting rh9 from cd.  does that make a vast difference?
0
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
owensleftfootCommented:
Backup your data and re-install rh9 would be the easiest way - redhat will create its own initrd.
0
 
doubledratAuthor Commented:
owensleftfoot: I've spent hours customising this installation, so that's not really an option for me.
0
 
owensleftfootCommented:
0
 
jlevieCommented:
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
 
doubledratAuthor Commented:
of course!  put both cards in!  duh.

I created the new initrd before the swap and it worked a treat ta.
0
 
jlevieCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now