LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-07-2014, 02:16 PM   #1
Westmoreland
LQ Newbie
 
Registered: Oct 2012
Location: Groves, Texas
Distribution: RHEL
Posts: 13

Rep: Reputation: Disabled
Need help recovering /boot on a RHEL 5 server


I have RHEL 5 server that I add a new SAN LUN to. I'm also using EMC's powerpath to manage multipathing. The new disk showed up after re-scanning the SCSI bus then running the 'powermt config' command. I was trying to configure the new storage for an LVM but on device /dev/emcpowerai but I inadvertantly ran fdisk against /dev/emcpowera1, the partition that houses /boot. So now if I fdisk -l to list the partitions on the disk for /emc/emcpowera I get:

Quote:
[root@ods2prdr5p ~]# fdisk -l /dev/emcpowera

Disk /dev/emcpowera: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/emcpowera1 * 1 13 104391 83 Linux
/dev/emcpowera2 14 32635 262036215 8e Linux LVM
And if I run fdisk -l against /dev/emcpowera1 I get this:

Quote:
Disk /dev/emcpowera1: 106 MB, 106896384 bytes
255 heads, 63 sectors/track, 12 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/emcpowera1p1 1 12 96358+ 8e Linux LVM
So it looks like I've created a "sub" partition on /dev/emcpowera1.

Obviously, I'm scared to death that I've screwed up my boot partition. I have not yet rebooted and I'm hoping someone can help me back out of the mess I've gotten into. Any suggestions?
 
Old 10-07-2014, 03:58 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
First, see if you have overwritten the superblock:

Code:
dumpe2fs /dev/emcpowera1 | grep superblock
If it says you have a primary at block 1, then you did not. In that case you can umount and run the appropriate type of fsck for your filesystem: ext2, ext3 or ext4. If you have some other FS, then ignore me, since I'm less familiar with those.

Once fsck passes, you can remount and make sure your boot files are still there.
 
Old 10-07-2014, 04:12 PM   #3
Westmoreland
LQ Newbie
 
Registered: Oct 2012
Location: Groves, Texas
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thank you, looks like things may not be as bad as I feared:

Quote:
[root@ods2prdr5p ~]# dumpe2fs /dev/emcpowera1 | grep superblock
dumpe2fs 1.39 (29-May-2006)
Primary superblock at 1, Group descriptors at 2-2
Backup superblock at 8193, Group descriptors at 8194-8194
Backup superblock at 24577, Group descriptors at 24578-24578
Backup superblock at 40961, Group descriptors at 40962-40962
Backup superblock at 57345, Group descriptors at 57346-57346
Backup superblock at 73729, Group descriptors at 73730-73730
The primary superblock is at 1. I also have a test system that I used to perform the same steps on, recreating my predicament. I created another partition on the boot partition. But before rebooting I went back into fdisk and deleted the partition. I then rebooted the box and it came up fine. But the box I'm concerned about is a production system, so I'm waiting for input from Redhat as well as this forum. But I'm thinking I may be okay just deleting the partition.
 
Old 10-07-2014, 04:16 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
You should be OK. Creating a partition table affected only the first 512-byte block in the partition. The primary ext2/3/4 superblock is the 2nd 1K block, so you never touched it.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL 6.4 kernel hangs on server boot hagcomcol Linux - Server 0 02-25-2013 12:44 PM
Newbie Troubles: Can't get RHEL-5 Server to Dual Boot with Win 7 Valerius Linux - Newbie 4 03-15-2010 01:40 PM
Recovering the OS from software RAID HDD crash with rPath (or RHEL/CentOS/Fedora)? pwjohnston Linux - Server 0 08-21-2009 08:01 PM
recovering /boot in RHEL 4 westb Linux - Enterprise 3 07-26-2006 07:23 AM
recovering the boot loader b0nd Linux - Newbie 1 01-23-2005 07:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:03 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