LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2011, 05:34 PM   #1
evsam
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Rep: Reputation: Disabled
How to identify Red Hat version?


Hello All,
I have a Red Hat Linux system that does not boot. The boot partition is damaged and files cannot be recovered.

I would like to know how to find out which version of Red Hat was installed from the program/data partition which is undamaged and accessible from Fedora Live CD. I assume this is available in a configuration file somewhere.

I plan to download the appropriate version and re-install.

Thanks
Evsam
 
Old 07-18-2011, 06:10 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Boot the Fedora Live CD, mount the Red Hat file system, eg:
Code:
mkdir temp
mount /dev/sda2 temp
cd temp
cat etc/redhat-release
Please note that sda2 is just an example. Make sure you mount the filesystem containing Red Hat's /etc directory.
 
Old 07-18-2011, 06:18 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,227

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
as long as the /boot is separate from the rest of the system than booting to a live cd and reading /etc/issue
or /etc/redhat-release should tell you

however if you /boot partition is really separate, you shouldn't have to re-install your whole system to fix this

what you would do is boot from a live/rescue cd

create a mount point (directory) for the / partition for my example i will use /repair

mount the / partition
Code:
mount /dev/sda3 /repair
re-format the /boot partition
Code:
mkfs -t ext(2,3, or 4) /dev/sda1
mount the /boot partition on /repair/boot
Code:
mount /dev/sda1 /repair/boot
then bind the /dev, /proc, and /sys directories of the live cd into their respective directories on /repair

Code:
$ su -c 'mount ‐‐bind /dev /repair/dev'
$ su -c 'mount ‐‐bind /proc /repair/proc'
$ su -c 'mount ‐‐bind /sys /repair/sys'
then chroot into the system
Code:
$ su -c 'chroot /repair'
if you are already running as root on the live cd than you can issue the commands without the su -c

once you have that done, you can simply use yum (or up2date if you are using Red hat enterprise linux) to re-install the packages (the kernel packages) from the repositories (assuming your live/repari cd provides internet access), or from locally downloaded copies if you don't and reinstall grub to generate a new grub configuration file
Code:
# grub-install /dev/sda
once you have this done you should have a functioning system

note, /dev/sda, /dev/sda1 and /dev/sda3 are merely examples, you should figure out which ones are correct for your system.

Last edited by frieza; 07-18-2011 at 06:24 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to identify Red Hat Server 'type' in rel 5? gdkenoyer Linux - General 6 09-04-2008 01:23 PM
Which Red hat version best for using GSX / Best Red Hat distro? Rustylinux Linux - Software 2 03-27-2006 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration