пятница, 1 апреля 2011 г.

Weird boot0 behavior


It seems I've found one interesting bug in FreeBSD boot0. The long story is the following. We deploy new systems on IBM blade servers. After some local fixes made by Oleg we made FreeBSD gmultipath work with our EMC Clarion storage. However, we observed strange behavior. Periodically systems refused to boot. We could see only black screen and no usual "F1: FreeBSD" boot0 prompt. This was healed by some tricks - in particular we were able to make two servers boot in all cases by some BIOS and FC adapter settings. However, all these tricks (particular FC adapter settings, disabling Planar SAS and unnecessary boot methods in BIOS) didn't help in last case. It took about a week to make last server boot. At last I've found the certain bug in boot0.


I cassually stepped on this. I've tried to install boot2 loader from current and instead of "bsdlabel -e " executed "bsdlabel -w". And system booted 10 times in a row (to a point before mounting local filesystems). Luckily, "/" filesystem was on the first BSD partition. "bsdlabel -w" rewrote partition table and made one partition on whole slice. Root ("/") could be mounted, other filesystems were lost. So, OS was able to boot to a certain stage. There could be two reasons which influenced boot0 behavior: existence of several partitions and their labels. So I recreated partition table and labeled all BSD partitions as "unused" (instead of "4.4BSD"). This helped. System boots now without any random failures (at least it boots 12 times in a row).
I've created a bug entry for this boot0 failure and started to setup a new FreeBSD server... Why do partition labels influence boot0? I don't know, maybe it's related to OS probing (when boot0 writes "F1: FreeBSD" and not "F1: Disk1"). At least, I'm rather happy: we inclined to install Linux on our blades in case if we wouldn't be able to make FreeBSD booting robust. So I shouldn't learn OpenVZ peculiarities and bugs and can use familiar jail infrastructure (we are going to deploy vnet jails). And ZFS for storing jail images and applications' data. This is a killer feature of FreeBSD which made me struggle for a week :)

Комментариев нет:

Отправить комментарий