Operating System - HP-UX
1821546 Members
2047 Online
109633 Solutions
New Discussion юеВ

Re: Strange MBR error on disk

 
SOLVED
Go to solution
likid0
Honored Contributor

Strange MBR error on disk

Hy after a powercut one of my rx servers, didn't boot any more, it was a development server without a mirror, cause i hade little time a restored from backup and worked fine, but I wantes to ask you, if there is a way to recover from this error, withou restoring the hole thing.

On the EFI shell the boot disk had disapeard, so I booted from lan and went into a recovery shell i could see the disk,i could vgimport vg00 and mount the fs , but each time i did and idisk or diskinfo I got this message:

ia64dsk WARNING MBR not valid. EFI tables are OK

i tried vgcfgrestore, and a reboot but the same happend, so I did and ignite restore

Any idea if you can restore the MBR of the disk ?


Thnx
Windows?, no thanks
14 REPLIES 14
Torsten.
Acclaimed Contributor
Solution

Re: Strange MBR error on disk

There are several efi tools to manipulate the efi area, but I think a restauration of the whole efi partition may help too.

There was no need for me to do this so far.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
likid0
Honored Contributor

Re: Strange MBR error on disk

This is what i got when i launched idisk:

idisk /dev/rdsk/c0t2d0
idisk version: 1.31

EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x2dc2f8e7
MyLbaLo = 0x1
AlternateLbaLo = 0x61a7fff
FirstUsableLbaLo = 0x22
LastUsableLbaLo = 0x61a7fdc
Disk GUID = c0531d9e-20c7-11dd-8001-d6217b60e588
PartitionEntryLbaLo = 0x2
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0xf2b37741

Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = c05320d2-20c7-11dd-8002-d6217b60e588
Starting Lba = 0x22
Ending Lba = 0xfa021
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = c05320fa-20c7-11dd-8003-d6217b60e588
Starting Lba = 0xfa022
Ending Lba = 0x60df821
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = c0532118-20c7-11dd-8004-d6217b60e588
Starting Lba = 0x60df822
Ending Lba = 0x61a7821

EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0xe0e2cab6
MyLbaLo = 0x61a7fff
AlternateLbaLo = 0x1
FirstUsableLbaLo = 0x22
LastUsableLbaLo = 0x61a7fdc
Disk GUID = c0531d9e-20c7-11dd-8001-d6217b60e588
PartitionEntryLbaLo = 0x61a7fde
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0xf2b37741

Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = c05320d2-20c7-11dd-8002-d6217b60e588
Starting Lba = 0x22
Ending Lba = 0xfa021
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = c05320fa-20c7-11dd-8003-d6217b60e588
Starting Lba = 0xfa022
Ending Lba = 0x60df821
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = c0532118-20c7-11dd-8004-d6217b60e588
Starting Lba = 0x60df822
Ending Lba = 0x61a7821

Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x0

Partition Entries in MBR:
Partition 1 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 2 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 3 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 4 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0


also tried a:

# idisk -r -w /dev/rdsk/c0t2d0
idisk version: 1.31
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes
idisk: Primary and alternate entries OK. Restoration not required.


What tools are there available?

How can you restore just the efi partition ?


Thnx
Windows?, no thanks
Jaime Bolanos Rojas.
Honored Contributor

Re: Strange MBR error on disk

Orange,

I check every were and I got nothing on that Warning, in any event if you need to recover the system without restoring there is a team at HP that specializes on that, I am sure they could tell you for sure if it├В┬┤s possible to fix that type of system.

If you want to you could even open a case for that question!

Regards,

Jaime.
Work hard when the need comes out.
Torsten.
Acclaimed Contributor

Re: Strange MBR error on disk

As said before, never tried.

But I found this in my records for example:

fs0:\EFI\efi_utils> type efichk.txt
File: fs0:\EFI\efi_utils\efichk.txt, Size 362

EFI Check Disk Version 1.0
Based on EFI Core Version 1.2.12.38
Checks a disk and displays a status report.

EFICHK [/F] [/R] volume
volume Specifies the EFI volume without a colon. Example: fs0
/F Fixes errors on the disk.
/R Locates bad sectors and recovers readable information
(implies /F).


By "restoring" I mean something like the "efi_fsinit ..." and "mkboot -e ..." (from hp-ux shell) to write the default contents to this partition.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
likid0
Honored Contributor

Re: Strange MBR error on disk

I was asking, because I restored to a SAN disk, just in case, so I didn't touch the original disk,it's on the system and we can play about with it, if you have any ideas?.

I could open a support case, but is not worth it now, the server is working ok, now is just for curiosity..

Thnx for the help
Windows?, no thanks
Torsten.
Acclaimed Contributor

Re: Strange MBR error on disk

Another source:

http://www.intel.com/technology/efi/diskutil_overview.htm


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
likid0
Honored Contributor

Re: Strange MBR error on disk

Thnx for the Info Torsten, I tried out restoring only the EFI partition:

before:
# /usr/sbin/efi_ls -d /dev/rdsk/c0t2d0s1 EFI/HPUX/
ia64dsk: WARNING: MBR not valid. EFI tables are OK
FileName Last Modified Size
. 6/ 5/2008 0
.. 6/ 5/2008 0
HPUX.EFI 6/ 5/2008 644703
AUTO 6/ 5/2008 12

# /usr/sbin/efi_fsinit -d /dev/rdsk/c0t2d0s1
ia64dsk: WARNING: MBR not valid. EFI tables are OK
# /usr/sbin/efi_ls -d /dev/rdsk/c0t2d0s1 EFI/HPUX/
ia64dsk: WARNING: MBR not valid. EFI tables are OK
efi_ls: file not found in the device
# /sbin/mkboot -e -l /dev/rdsk/c0t2d0s1
ia64dsk: WARNING: MBR not valid. EFI tables are OK
You must first run idisk to create EFI and HP-UX partitions.


So it seems its not and EFI issue, its about the MBR beeing corrupt..

Any idea if i use idisk to partition the disk again with the exact same size, will i loose the data?
Windows?, no thanks
Torsten.
Acclaimed Contributor

Re: Strange MBR error on disk

Some good links about the disk layout in combination with efi:

http://en.wikipedia.org/wiki/GUID_Partition_Table

http://en.wikipedia.org/wiki/Extensible_Firmware_Interface

According to this, the systems maps the GPT to an MBR for the OS.

Let's try something (are the last idisk results current or from your records?):

# idisk -v /dev/rdsk/c2t0d0
# echo $?
0

I cannot see something like you wrote here:

Partition Entries in MBR:
Partition 1 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 2 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 3 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 4 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0

IMHO the problem is here.

I noticed my idisk version is
idisk version: 1.32 for 11.23.
(no idea if this is related anyhow)


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
likid0
Honored Contributor

Re: Strange MBR error on disk

The info is current,Looks like the partions are ok, because i get a 0, but the MBR is broken

# idisk -v /dev/rdsk/c0t2d0
# echo $?
0
# idisk /dev/rdsk/c0t2d0

Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x0

Partition Entries in MBR:
Partition 1 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 2 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 3 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0
Partition 4 (UNKNOWN)
OS Type = 0x0
Starting LBA = 0x0
Partition Size = 0x0

What i was wondering is if you can partition the disk again with the exact same size, but I don't know if i would loose the data and if it would recreate de MBR
Windows?, no thanks
Torsten.
Acclaimed Contributor

Re: Strange MBR error on disk

You did already a restore and still get these messages?

Try it and you will know it!
(it's a test system, right?)

I don't know it too, but have no test system at this time.
If you do, let me know, please.

But first thing I would try is the "diskpart" efi tool first.

At the moment I cannot access EFI, that's why I cannot see the help text of this tool

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
likid0
Honored Contributor

Re: Strange MBR error on disk

Yes I have done the restore of the EFI and I still get the errors.

The problem with the EFI utils at the efi shell is that I don't see the root disk on the efi shell I can see all the data disks, but our bogus MBR disk.

So i will give It a go ath re-partitioning.

Tell u something soon
Windows?, no thanks
Torsten.
Acclaimed Contributor

Re: Strange MBR error on disk

I found this on the smartsetup for linux cd (for Integrity servers):

DiskPart Version 1.0
Based on EFI core release Version 1.2.1.0

LIST - Show list of partitionable disks
SELECT - Select a disk (spindle) to work on
INSPECT - Dump the partition data on the selected spindle
CLEAN [ALL] - Clean all data off the disk (DESTROY DATA)
ALL writes 0s to whole disk, without just 1st & last MB
NEW [MBR | GPT]
FIX
CREATE
DELETE
HELP - print this screen. Help for detail on a command
H - print this screen. Help for detail on a command
? - print this screen. Help for detail on a command
EXIT - Exit program
SYMBOLS [VER] - Show list of predefined type GUIDs.. VER is verbose
REM - Just print a remark
MAKE [LIST] [make script]
- 'make list' lists make scripts
'make scripname args' runs script
DEBUG (null)
ABOUT - About this version....



The "FIX" option is the one I would try ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
likid0
Honored Contributor

Re: Strange MBR error on disk

Well good news, yesterday afternoon when they let me stop the server, I got it all working from the old MBR broken disk.

What I did..

Created a file with the same partion layout the disk already had:

# cat lol.txt
3
EFI 500MB
HPUX 100%
HPSP 400MB

gave it the idisk:

# idisk -w -f lol.txt /dev/rdsk/c0t2d0
idisk version: 1.31
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes

and it recreated de MBR:

Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x2614af2

then:
#efi_init -d /dev/rdsk/c0t3d0s1
# mkboot -e -l /dev/rdsk/c0t3d0
# efi_ls -d /dev/rdsk/c0t3d0s1
FileName Last Modified Size
EFI/ 6/ 6/2008 0
STARTUP.NSH 6/ 6/2008 296

total space 523251712 bytes, free space 519856128 bytes

Reboot, and now the disk was shown again on the efi shell, gave it a boot, and up it went.

W0rking fine again, no data loss.

Thnx for the help
Windows?, no thanks
likid0
Honored Contributor

Re: Strange MBR error on disk

Thnx to Torsten for the Help
Windows?, no thanks