Solved

how to copy linux rescue kernel to disk?

Posted on 2004-03-26
9
325 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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
 

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

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.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

803 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