Solved

how to copy linux rescue kernel to disk?

Posted on 2004-03-26
9
321 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
ID: 10686277
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
ID: 10687130
Your problem isnt your kernel, its the initial ramdisk which contains modules for your mylex controller.
0
 

Author Comment

by:doubledrat
ID: 10688282
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
ID: 10688320
Backup your data and re-install rh9 would be the easiest way - redhat will create its own initrd.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

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

Expert Comment

by:owensleftfoot
ID: 10688751
0
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
ID: 10689899
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
ID: 10758274
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
ID: 10759097
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

920 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

15 Experts available now in Live!

Get 1:1 Help Now