Solved

how to copy linux rescue kernel to disk?

Posted on 2004-03-26
9
331 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

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…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…

840 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