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 03-10-2009, 08:03 AM   #1
quinox10
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
initrd and rescue mode Centos


Hi there,

I have a problem booting my Centos installation for testing.
I've edit the grub.conf file and edit the line root=LABEL/ to root=/dev/sda4.
I also edit my fstab to point de / partition to /dev/sda4.
then I also renamed my initrd in /boot to initrd-<kernel-version>.img.org.

I would like to fix this problem, so i boot in rescue mode.
Linux cannot mount my image, so the only directories i have in /mnt/sysimage is boot, proc and sys.
I am able to modify the grub.conf, but not my fstab. Also I cannot make a new initrd with mkinitrd command (command not found).

How can i make a new initrd file again to be able to boot my pc?

thanks
 
Old 03-10-2009, 08:16 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Once you have booted the Live CD you should be able to chroot into your original / and 'mkinitrd' from there. However that requires access to your /, so
Quote:
Originally Posted by quinox10 View Post
Linux cannot mount my image
why won't it? What errors does it show? What HW setup do you run?
 
Old 03-11-2009, 03:22 AM   #3
quinox10
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
I found the solution.

fdisk -l (to check the partitions)
e2label (to find the / partition)

mkdir /rootdirectory (eg mnt)
mount /dev/hda2 /rootdirectory (eg mnt)

once the / partition is remounted you I could fix my /etc/fstab.

Then reboot again in rescue and do a mkinitrd to make a new initrd file.
 
  


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
CentOS Boot from RAID 1 + initrd+raid1 mitchell2345 Linux - Software 1 11-01-2008 11:18 PM
CentOS: how to launch it into rescue mode? concoran Linux - Newbie 1 05-23-2008 06:24 AM
Linux Rescue script question, in rescue mode vijay_aras Linux - General 1 01-09-2008 05:03 PM
centos 5 rescue CD -> shell, now what? jCash Linux - Newbie 1 11-21-2007 03:33 PM
Is there any way to run rescue mode in test mode. kadhiravan.r Linux - General 2 07-13-2006 08:11 AM

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

All times are GMT -5. The time now is 08:29 AM.

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