LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-06-2012, 10:56 AM   #1
sjreilly
Member
 
Registered: Oct 2007
Location: Edinburgh, Scotland
Distribution: Debian, CentOS, RHEL, Mint, Ubuntu
Posts: 79

Rep: Reputation: 15
Is mkinitrd distro specific?


Hi,

I'm trying to build a new workstation using a Mondo-created CentOS 5.8 image.
The reinstall worked but it fails to boot (the usual kernel panic messages).
If I boot from the CentOS 5.8 DVD linux rescue it fails to detect the OS, so I can't fix it using mkinitrd.
Is it possible to use, say, an Ubuntu Live CD to boot the workstation, chroot the new disk then run mkinitrd?

I tried it on a Virtual System but it failed to produce a bootable initrd.img.

As root I created mount points for the new drive, which has /boot and / partitions;

mkdir /mnt/sda1 /mnt/sda2
mount /dev/sda1 /mnt/sda1
mount /dev/sda2 /mnt/sda2
mount --bind /proc /mnt/sda2/proc
mount --bind /sys /mnt/sda2/sys
mount --bind /dev /mnt/sda2/dev
chroot /mnt/sda2
mount /dev/sda1 /boot
cd /boot
mkinitrd -v -f initrd-2.6.18-308.16.1.el5.img 2.6.18-308.16.1.el5

This all ran OK but it didn't boot, got kernel panic error.

TIA,

Steve
 
Old 11-07-2012, 03:33 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by sjreilly View Post
... but it fails to boot (the usual kernel panic messages).
Not very informative.

As a general statement, if you have chroot'd successfully, you should be fine using the installed system. So, yes, mkinitrd tends to be specific to the environment, but you should be in your environment, so it shouldn't matter.
The rescue boot environments tend to be pretty lame - they generally only check the first disk, and usually only the first system on that disk. You should be able to chroot from the CentOS disk though, similar to what you did with the Ubuntu liveCD.
 
Old 11-07-2012, 03:49 AM   #3
sjreilly
Member
 
Registered: Oct 2007
Location: Edinburgh, Scotland
Distribution: Debian, CentOS, RHEL, Mint, Ubuntu
Posts: 79

Original Poster
Rep: Reputation: 15
syg00

The kernel panic message I'm talking about is;

"switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!"

during boot, but usually only when I've tried to clone a system to a new drive (and only with CentOS, and not always)

Anyway, the system I'm having issues with is a new Dell and the CentOS 5.8 x86_64 disk fails to find the OS on the only disk in the machine in Rescue mode. Which is why I was trying to use an Ubuntu CD.
 
Old 11-07-2012, 04:50 AM   #4
sjreilly
Member
 
Registered: Oct 2007
Location: Edinburgh, Scotland
Distribution: Debian, CentOS, RHEL, Mint, Ubuntu
Posts: 79

Original Poster
Rep: Reputation: 15
[SOLVED] Is mkinitrd distro specific?

Actually, this may all be moot points.

Being new to Mondo Rescue and Mindi I'm only just realising its full potential.
I have only just discovered that during the rescue process Mindi will drop you to the command line with all the mount points of your rescued system in place and then you can run mkinitrd to ensure the system boots - NICE!

Thanks,

Steve
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo mkinitrd -o /boot/initrd.img-2.6.32.9 2.6.32.9 sudo: mkinitrd: command not foun vishwas181 Linux - Newbie 1 02-27-2010 01:16 AM
Where are the distro sources? [Non-specific] EmrldDrgn Linux - Distributions 4 07-24-2009 05:44 PM
What Distro Should I Use (Specific) hydnwtkns Linux - Newbie 2 02-18-2009 09:36 PM
replace distro-specific forums with distro thread tags kittehz LQ Suggestions & Feedback 1 02-01-2009 11:04 PM
Looking for specific distro... please help zaoka Linux - Distributions 4 05-23-2007 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration