22 Feb 2014 by dryobates
HP recovery partition on Compaq 6720s has some unwanted behavior: it overwrites boot manager if accidentaly run.
In my notebook I have dual boot: Windows and FreeBSD. I use FreeBSD boot manager to choose which one start. This manager by default shows all primary partitions. I have all four (I still use MBR/LBA instead of modern GPT ).
My boot menu looks like that:
F1 Win F2 Win F3 ?? F4 FreeBSD
F1 is my Windows partition. F2 is recovery disk. Once I accidentally pressed F2 and had to restore FreeBSD boot manager from FreeBSD live cd like this:
fdisk -B -b /boot/boot0 /dev/ada0
(ada0 is my disk from which system starts).
As it’s easy to make mistake and press wrong key I thought I’ll disable not used ones (“Prevention is better then cure”):
boot0cfg -m 0x9 ada0
I used mask 0x9, because I want only F1 (bit nr 0 set) and F4 (bit nr 3 set) to be enabled:
$ dc -e '2i 1001p' 9
Now I wont make mistake:
F1 Win F4 FreeBSD
And if I would like to run software from recovery disk I can press F9 during normal Windows boot (it still works) or enable partition again from FreeBSD:
boot0cfg -m 0xf ada0
|||GUID Partition Table: http://en.wikipedia.org/wiki/GUID_Partition_Table|