Unbootable solaris 10 x86

 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Unbootable solaris 10 x86
# 57  
Old 11-29-2010
Quote:
Was this disk previously used by Windows before you installed Solaris 10 on it ?
Not sure it was an old install
Quote:
Are you sure there was no other storage device connected to your machine (a third disk, USB key, whatever ?)
Not sure also, but i have a usb disk i used to connect it to the box

here is the ouput of dd
Code:
#dd if=/dev/rdsk/c0d0p0 bs=1024k skip=30 count=512 | od -X | grep 00bab10c | head
6004000        00bab10c        00000000        0000000a         00000000
6006000        00bab10c        00000000        0000000a         00000000
6010000        00bab10c        00000000        0000000a         00000000
6012000        00bab10c        00000000        0000000a         00000000
6014000        00bab10c        00000000        0000000a         00000000
6016000        00bab10c        00000000        0000000a         00000000
6020000        00bab10c        00000000        0000000a         00000000
6022000        00bab10c        00000000        0000000a         00000000
6024000        00bab10c        00000000        0000000a         00000000
6026000        00bab10c        00000000        0000000a         00000000
512+0 records in
512+0 records out
#

# 58  
Old 11-29-2010
Those look like ZFS uberblock magics.

But the offsets are far from where I would have expected to find them. Seems like either there was free space or another partition in front of the ZFS partition.

Last edited by fpmurphy; 11-30-2010 at 12:44 AM..
These 2 Users Gave Thanks to fpmurphy For This Post:
# 59  
Old 11-30-2010
Okay, so finally we have something consistent. The current partition table and the windows boot loader were written by some unexpected gremlin. The 3% extended partition doesn't exist. The uberblocks are precisely where I expected them to be (@fpmurphy: this offset is not due to an fdisk partition but to the hidden slices 8 and 9 being located before slice 0) so if you are lucky and nothing else beyond a mbr overwriting happened to your disk, your zpool is safe. Your disk has a single Solaris2 partition spanning the whole space available.

You need first to reconstruct your partition table. The correct data to be placed in it should be:
Code:
191   128  0      1      1       254    63     1023    16065     156280320

Unfortunately, Solaris fdisk command is zeroing the vtoc (slice table) should a new Solaris2 partition is created. As we want to preserve the existing vtoc, the trick is to create a partition with another type like this:
Code:
echo "6 128 0 1 1 254 63 1023 16065 156280320" > /tmp/fdisk.txt
fdisk -F /tmp/fdisk.txt /dev/rdsk/c0d0p0

Then, you need to reboot on a CD/DVD and immediately leave the grub menu to the GRUB CLI (press 'c' when the boot menu appears).

From here, you can change the partition type to the correct one with this command:
Code:
parttype (hd0,0) 0xbf

Your pool should then be importable and your data recoverable. By reinstalling grub, you should even have your OS fully recovered and bootable.

Of course, as all these steps involve writing to your disk. You should first make a full copy of your source disk and run the commands I suggested on that copy, not the original. The destination disk needs not to be exactly the same model as the source one, just of equal size or larger.
To perform the copy, either use the command suggested by ilikecow if you are more confortable with Gnu/Linux than Solaris, or run the equivalent Solaris command:
Code:
dd if=/dev/dsk/c0d0p0 of=/dev/dsk/c1d0p0 bs=512k

Adjust c1d0p0 to the correct device should it be different.

Last edited by jlliagre; 11-30-2010 at 12:41 PM.. Reason: fdisk command was bogus, corrected
These 4 Users Gave Thanks to jlliagre For This Post:
# 60  
Old 11-30-2010
@jlliagre
First of all , thanks a milion for your effort in helping me .

As far as i understand so the order of recovery steps as follows and as a precaution i'll summarize my steps ( please correct me if there is something wrong )

1-clone the disk into a new disk .
Quote:
The destination disk needs not to be exactly the same model as the source one, just of equal size or larger.
with the following command
Code:
#dd if=/dev/dsk/cxdxpx of=/dev/dsk/cxdxpx bs=512k

2- work on the clone in single user shell and issue fdisk command with the exact arguments
Code:
#fdisk -R - /dev/rdsk/c0d0p0 <<%EOF%
6   128  0      1      1       254    63     1023    16065     156280320
%EOF%

3- boot in GRUB menu cli mode and change the partition type to the correct one
with following command
Code:
parttype (hd0,0) 0xbf

4-My pool should then be importable and my data should be recoverable , i can issue command like
Code:
zpool import rpool

even i can install GRUB and boot into the system

please review
# 61  
Old 11-30-2010
That's a good summary. Just a small comment: "cxdxpx" should be "cxdyp0", p0 being the whole disk.
# 62  
Old 11-30-2010
Quote:
Code:
fdisk -R - /dev/rdsk/c0d0p0 <<%EOF%
6   128  0      1      1       254    63     1023    16065     156280320
%EOF%

Correct me if I am wrong but I thought the -R option indicated that fdisk should treat the disk as read-only.
These 2 Users Gave Thanks to fpmurphy For This Post:
# 63  
Old 11-30-2010
Thanks for pointing that. The command should be:

Code:
echo "6 128 0 1 1 254 63 1023 16065 156280320" >/tmp/fdisk.txt
fdisk -F /tmp/fdisk.txt /dev/rdsk/c0d0p0

I was confused by the symmetric "-W -" (write) option and assumed "-R -" existed, but it doesn't.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Recovering files from unbootable disk in HPUX 9

First of all, forgive me if I come off as naive. Normally I'm doing day-to-day management of a Server 2008 network, so HP-UX isn't exactly my forte. We have several HP 715/100 machines running UX 9.x, and recently one of them stopped being able to boot. In the boot menu the disk shows up with... (3 Replies)
Discussion started by: GoldnPantaloons
3 Replies

2. Solaris

Solaris: clnt_create fails on solaris x86

Hi, I am facing an issue with Solaris x86 machine Machine Details: uname -a SunOS sol10-64 5.10 Generic_137138-09 i86pc i386 i86pc .............................. Description: I am trying to register a programm with proramm ID 300760 with version number 1, and tryint to create a... (0 Replies)
Discussion started by: DivakarAdari
0 Replies

3. Solaris

System Unbootable - /usr not mounted

Hi admins, I'm having some issues with a Solaris 10 machine. I just rebooted the box after at least 2 years running smooth and now the OS is not comming up. This is what I see in the console (if I press Ctrl^D it loops again): Root password for system maintenance (control-d to bypass): ... (3 Replies)
Discussion started by: verdepollo
3 Replies

4. UNIX for Dummies Questions & Answers

Running Solaris Sparc Apps on X86 Solaris

I know that Sun make s a version of Solaris for Sparc platforms and also an x86 (Intel/AMD) release of Solaris. Can an application that runs on Solaris/Sparc also run on a PC running the x86 release of Solaris? Would a different release be required or any re-compling of the application? jim (1 Reply)
Discussion started by: stocksj
1 Replies

5. Solaris

Solaris x86 on D<LL (OK I said it)

OK, I have a DELL Poweredge 2850 fresh out of the box sitting here. I'm thinking of putting Solaris 9 x86 on it. Has anyone ever attempted this before, do you think it will work? I dont want to get into something that is just going to be a enormus waste of time, so I am wondering if anyone... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

6. Solaris

Solaris 10 X86

Ok here goes, this MCSE is now fed up with MS, they are telling me that my Legal XP has a s/num they didnt issue. After countless emails I am P with them and am loooking for a new OS. Tried Linux, got it working but seems too flaky for me. Have installed Solaris 10 X86 (on a temp pc AMD Athlon... (1 Reply)
Discussion started by: mickie
1 Replies

7. Solaris

Installing Solaris 8 (x86) on PC

Hi, I have installed Solaris 8 on a PC, but I can not get the 2nd CD to install. I can log in to CDE desktop, by the way, is just black and white. I can mount the 2nd install CD, and double-click on the installer, but it does not install. Someting displays in the console and then it disappears... (1 Reply)
Discussion started by: annointed3
1 Replies

8. Solaris

solaris on x86

hi, need help! i've installed solaris 9 on my x86 box...problems with kdmconfig. here what i have: 1- Dell 17" Flat monitor ( 31kHz-80kHz horizontal and 56 Hz-76Hz Vertical) 2- Matrox Millenium G550 card what choices do i have to made? best regards thank you in advance (1 Reply)
Discussion started by: hmaiida
1 Replies

9. Solaris

How to install Solaris 9 on X86

HI All, I have three solaris disks: disk 1 & 2 and "image" disk. However, no instructions for installation on x86 came with them. (I downloaded from SUN.) I've searched far and wide on the net trying to find instructions for installing Solaris on my PII 500 mhz intel machine, but have... (7 Replies)
Discussion started by: JaredsNew
7 Replies

10. UNIX for Dummies Questions & Answers

Solaris 8 x86

Hi There, I search a lot across the board but didn't find answer... first of all... I installed the Companion CD. So Kde is supposed to work... I ran the script to have it in my login screen, and it's there... but when I enter it, it only kicks me to the login screen once... (1 Reply)
Discussion started by: Erythro73
1 Replies
Login or Register to Ask a Question