Archives
- October 2025
- September 2025
- August 2025
- July 2025
- June 2025
- May 2025
- April 2025
- March 2025
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- January 2011
- November 2010
- October 2010
- August 2010
- July 2010
64-bit trouble with Solaris 10 U4 and earlier
On many newer systems, Solaris 10 releases up to and including Solaris 10 8/07 (that is Update 4, also known as S10U4) behave in an unhelpful manner. The installer can be launched from CD or DVD and the system can be installed, but the first time the new OS is booted, it almost immediately reboots the system or hangs. This affects both physical and virtualized systems.
The proximate cause of the crash is that when the Solaris kernel switches to PAE (Physical Address Extension) page tables, the tables are built incorrectly and do not properly map the system’s address space. This causes a page fault very shortly after. The OS tries to handle the fault, but fails (because it can’t access memory properly), and soon triggers a triple fault and CPU reset. If left unattended, the system will attempt to boot again and fail in the same way, stuck in an endless crash loop.
The ultimate cause of the problem is much simpler: Solaris incorrectly detects the CPU capabilities based on the processor model. The Solaris engineers had the misfortune of taking Intel’s processor family and model classification seriously, which turned out to be a bad idea.
In the good old days of the Pentium and Pentium Pro, the world was simple. The Pentium was a family 5 processor, Pentium Pro was family 6, and the older i486 was family 4. The Pentium II and III were still family 6 (so-called P6 family) as they did not differ significantly from the Pentium Pro in terms of basic capabilities.
With the Pentium 4, things got interesting. Rather than reporting itself as family 7, the Pentium 4 was family 15, entirely skipping families 7 to 14. But that wasn’t the end of it. When the Core Solo/Duo processors were released, they went back to family 6, since the Core was derived from the P6 micro-architecture. Suddenly the processor family jumped backwards, even though the processors were more capable.
To drive home the message that the model/family designations are best ignored, Intel at one point arbitrarily extended the family and model numbers with additional bits. This change affected the latter Core 2 models and following Core i3/i5/i7 processors. Those were also the CPUs causing trouble for Solaris 10 Update 4.
Without analyzing in exact detail what went wrong, it appears that Solaris 10 might think the processor is not PAE capable, even though every 64-bit CPU by definition must be. The PAE page tables are built incorrectly with fairly disastrous effects; the system is in such a state that it can’t even handle a kernel panic and therefore can’t provide any meaningful diagnostic information.
Needless to say, the problem was noticed as soon as someone attempted to install Solaris 10 or the then in-development Solaris 11 (Nevada) on one of the new processors. The issue was fixed in Solaris 10 Update 5 (officially known as Solaris 10 5/08) and Nevada build 72. The relevant bug number was 6574102, fixed by patch 127112-04.
Fixing the problem in a VM
How to fix the issue, especially in a VM? The easiest solution is using a newer version of Solaris. Solaris 10 Update 5 and later does not have the problem and will run happily on current 64-bit Intel processors. But folks running the older S10 versions may well have a reason to do so.
A sure-fire way to avoid the issue is forcing Solaris to use the 32-bit kernel. The exact steps to do that depend on the boot method, either the old Solaris boot loader in the initial Solars 10 release or GRUB in Update 1 and later. In either case, kernel/unix must be loaded rather than the default kernel/amd64/unix.
For the old loader, enter b kernel/unix when Solaris asks whether to (b)oot or enter the (i)nterpreter. For the GRUB-based loaders, add kernel/unix to the line starting with kernel.
Once Solaris is booted, the eeprom command may be used to change the default kernel to 32-bit. Simply run the following: eeprom boot-file=kernel/unix
When Solaris is successfully booted in 32-bit mode, patches may be applied to fix the 64-kernel, among other things.
When running Solaris 10 in VirtualBox, there is an interesting alternative. The CPUID information may be faked in such a way that Solaris will detect a CPU type close enough to what it needs to see. CPUID leaf 1 contains the relevant information, but only the EAX register value should be modified in order to change only just enough to placate Solaris.
First, the VBoxManage list hostcpuids command should be run to query the host’s CPUID information. The beginning of the information might look as follows:
Host CPUIDs: Leaf no. EAX EBX ECX EDX 00000000 0000000d 756e6547 6c65746e 49656e69 00000001 000206a7 06100800 17bae3ff bfebfbff 00000002 76035a01 00f0b2ff 00000000 00ca0000
In the example, the host’s CPUID leaf 1 contains 000206a7 in EAX, i.e. extended family/model bits are used. That will definitely upset old 64-bit Solaris 10 releases. To fix that, the EAX value needs to be modified; faking a Pentium D class processor is appropriate. To do that, run the following:
VBoxManage modifyvm <vmname> --cpuidset 1 00000f47 06100800 17bae3ff bfebfbff
Note that only the EAX contents are modified while EBX/ECX/EDX are unchanged. With the modification in place, Solaris 10 Update 4 and older should be able to boot in 64-bit mode.
Lo and behold, the original Solaris 10 release with no patches running on a modern CPU.
It is worth noting that once again, this bug belongs to a class of errors not discoverable by testing. At the time the Solaris CPU detection code was written, it almost certainly worked correctly with all processors available at the time. Only after several years, new processor models broke assumptions made by the Solaris kernel. Defensive programming helps, but it cannot entirely avoid such problems.
12 Responses to 64-bit trouble with Solaris 10 U4 and earlier
“Rather than reporting itself as family 7, the Pentium 4 was family 15, entirely skipping families 7 to 14.”
FYI, this is because Family 7 was already used for Itanium, and NT4 truncated the family number to 3-bit.
So you’re saying that because family 7 was taken, Intel chose 15 instead because that would be seen by NT as family 7? That makes total sense…
You say: note that only the EAX contents are modified while EBX/ECX/EDX are unchanged.
However, in your example, EAX and EBX are 000206a7 and 06100800, respectively, and yet you write VBoxManage modifyvm –cpuidset 1 00000f47 00100800 and so on. Is 00100800 instead of 06100800 a typo?
It’s not exactly a typo. The different value (00 vs. 06) is the processor’s APIC ID and on multi-core (even hyper-threaded) hosts it will likely differ between VBoxManage list hostcpuids runs. That’s how the values ended up being different. However, VirtualBox synthesizes that value for the guest anyway, so it doesn’t matter much what VBoxManage modifyvm is given there. Thanks for spotting though.
I wonder if this is the same reason that Windows NT 4.0 freaks out on install when Qemu or VirtualBOX emulate a higher level processor…
Not the same reason, but related. See http://www.geoffchappell.com/studies/windows/km/cpu/index.htm
VirtualBox restricts the CPUID range automatically when NT 4 guest type is selected. If the guest type is different, NT 4 will blow up (as it would on the host hardware).
Oddly enough when I select NT 4.0, it does the text install and right at the end of the GUI install it blue screens…. π
I end up installing under QEMU, then running vbox afterwards as it has hardware acceleration on x86_64 platforms…
Never saw that myself, but if you have a reproducible scenario, please open a ticket on the public bug tracker with all the relevant details.
Pingback: Using Qemu | Fun with virtualization
“So youβre saying that because family 7 was taken, Intel chose 15 instead because that would be seen by NT as family 7? That makes total sense...”
Note the “seen by NT”, which is old enough not to care. Proper programs would use all four bits.
If NT really didn’t care, why not simply choose family 8?
NT4 did care about the family number, but it makes no difference to NT4 if the family number is 7 rather than 6. Remember NT4 dates back to 1996.
This site uses Akismet to reduce spam. Learn how your comment data is processed.