OS Hacking and more.

10.15.2008

Workaround for the 1TB disk in OpenSolaris

Recently it came to my attention that OpenSolaris has a bug by which it does not support disks greater than or equal to 1TB in size, a result of a label reading problem that causes Solaris to read the disk geometry wrong. This occurs for disks with the SMI labeling scheme, and therefore renders those disks incompatible with OpenSolaris.
I've found a workaround for this problem:
It turns out that EFI labeling doesn't have the same issue in OpenSolaris, ie the disks work fine under EFI labeling. So if we use EFI labeling instead of SMI, we can get Solaris to recognize the disk correctly. Only problem with this is that you won't be able to boot off that disk with EFI labeling and a standard OpenSolaris boot(ZFS or UFS).
Got a fix for that too!
Following the steps for my OpenSolaris live boot, you can create a small usb drive/flash memory device with just kernel, microroot image, and GRUB, and boot from that drive. That boot will recognize the huge disk and mount it as the root filesystem, allowing you to continue the boot normally from there. So there's a bit of hardware involved this way, but you really only need a 128mb flash drive, and you can get one of those for less than a dollar(US).
So, howto?
Follow my procedure for the ZFS live boot, but really focus on the creation/alteration of the microroot. Copy the microroot and kernel to the usb drive(UFS or even FAT) and install GRUB. Make sure to have a working menu.lst(it just needs kernel & module & title -- no ZFS here).
Then using a Mac or FreeBSD(or other ZFS-capable OS), format the big disk with an EFI label and ZFS. You can then follow my procedure for the rapid upgrade of an OpenSolaris install to get OpenSolaris on the big disk. I know this is a bit roundabout, but you wanted that 1-2TB disk right?
Now, you should be able to boot from the USB drive, and then it should then boot and chroot to your super drive...DONE~!

No comments: