zpool upgrade broke GRUB

Need to say that I have OpenSolaris on my Sony Vaio laptop. And I am following newest releases of OpenSolaris: 86, 96, 97 and now 98. In between builds 86 and 98 ZFS pool version was increased twice from 11 to 12 and from 12 to 13. I am paying attention to zfs status because I have external USB drive attached (Lacie 250GB) for mirror (backup) purposes. So I was doing zfs upgrade two times and two times had a problem with next boot. The problem is that GRUB is not able to see new ZFS and so it brings GRUB prompt. You may try to enter GRUB entries by hands but this would not help you:

GRUB> bootfs rpool/ROOT/opensolaris-2

GRUB> kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS

....
Error 17: cannot mount selected partition

The solution is to get DVD of your build and boot from it. And then installgrub:

jack@opensolaris:~/Desktop$ su - 
Password: opensolaris
Sun Microsystems Inc. SunOS 5.11 snv_98 November 2008 
bash-3.2# zpool status
no pools available 
bash-3.2# zpool import 
 pool: rpool
 id: 1988807281359054800
 state: ONLINE
 status: The pool was last accessed by another system. 
 action: The pool can be imported using its name or numeric identifier and 
 the '-f' flag. 
 see: http://www.sun.com/msg/ZFS-8000-EY
 config: 
 rpool ONLINE 
 mirror ONLINE 
 c5t0d0s0 ONLINE 
 c3t0d0s0 ONLINE 
bash-3.2# zpool import -f rpool 
bash-3.2# installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c5t0d0s0 
 Updating master boot sector destroys existing boot managers (if any). 
 continue (y/n)? y 
 stage1 written to partition 1 sector 0 (abs 96406065) 
 stage2 written to partition 1, 267 sectors starting at 50 (abs 96406115) 
 stage1 written to master boot sector 
bash-3.2# installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t0d0s0 
 Updating master boot sector destroys existing boot managers (if any). 
 continue (y/n)? y 
 stage1 written to partition 0 sector 0 (abs 16065) 
 stage2 written to partition 0, 267 sectors starting at 50 (abs 16115) 
 stage1 written to master boot sector 
bash-3.2# zpool export rpool 
bash-3.2# init 6

 

Comments:

I have been trying (from genunix.org) installing b97 and b98 to usb stick and it always fails exactly as described - just at grub prompt and cat / gives the unable to mount partiton error.
I tried doing the installgrub suggestion and from the b98 live cd and it appears to work but does not fix the problem.
pkginfo -l SUNWgrub gives version 11.11,REV=2008.09.04.21.33 is this version late enough to include ZFS versions 12 and 13 ?
If not is there anyway to upgrade the version of SUNWgrub using a live cd boot ?
Do you what version of SUNWgrub that I need ?

Thanks

Andy

Posted by Andy on October 05, 2008 at 06:16 AM PDT #

Hi Andy,

Let me say first that I've never tried to install on USB stick.
From your question: You can not boot fresh installed system?
The problem I just described appears with upgrade only. If your have fresh installed system then GRUB version is in sync with ZFS...

Probably another way is to check 3rd section of Question #25 at
http://www.sun.com/io_technologies/usb/USB-Faq.html

Posted by Roman Ivanov on October 06, 2008 at 05:13 PM PDT #

I had originally had Solaris 10 05/08 installed to the USB stick and other than a missing broadcom Nic driver , it had worked fine. I wanted to use the ZFS and CIFS code available in later ZFS code , so I installed ( As a new installation ) opensolaris from b98 ( downlooaded from http://www.genunix.org/distributions/indiana/osol-0811-98.iso )
This would install OK to the USB stick but would never get past the
grub> prompt. At the grub prompt typing cat / gives the error
Error 17: Cannot mount selected partition - which from other reading suggested a ZFS grub problem.
After reading your reply , I did a fresh install to a new USB stick to make sure it had the current grub - but it gives the same error. Would you expect the grub packaged with b98 to work with the later versions of ZFS ?
Maybe it is a specific hardware incompatability with my system.
(I'm trying to use USB drive boot so I can use the 4 sata drives as a raidz2 media server in my HP ML110 G5 )

Posted by Andy on October 07, 2008 at 06:12 AM PDT #

Andy,

I will put USB stick in my wish list for the upcoming birthday ;)

Seriously, I will suggest you to do the following:
1. boot from CD/DVD
2. mount USB stick to /mnt
3. print menu.lst located somewhere under /mnt/rpool/boot/grub/menu.lst
4. boot from USB stick
5. enter default boot entry from menu.lst line by line and adding "-kd" or "-kdvs" to the end of the line containing "kernel" keyword
6. make a screenshot
7. fill in the bug

Posted by Roman Ivanov on October 08, 2008 at 04:21 PM PDT #

I know this is out of place, in space and time, but I get the same problem with the just released Solaris 5/09 on an X4100. After install to a 2-disk ZFS root/boot volume, it reboots to an empty grub prompt. I tried your solution, to no avail. Any suggestions? I don't have a support contract... Thanks

Posted by Flow Control on August 09, 2009 at 11:45 PM PDT #

Hmm, it took two months for your post to appear in my mailbox. Something strange with time has happens.
The best place for you is opensolaris.org forums to get help. I don't have 4100 to try sorry.

Posted by Roman Ivanov on October 04, 2009 at 04:35 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Roman (pomah) Ivanov, ISV Engineering. Tips how to run Oracle best on Sun. Performance monitoring and tuning for system administrators. OpenSolaris user experience.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today