tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [SUCCESS] Debugging/fixing a kernel stalled not crashing



A final point:

Context: I rent a baremetal server (OVH) that has an Intel Xeon
quadcore, IvyBridge, with 16Gb of RAM, 3 2TB disks, an Intel PRO 1000
ethernet card (but the bandwith is limited to 100Mib). It is an entry
level offer, that I wanted only for an IPv4 address (there is an IPv6
address too).

The images to install include no BSD but only Linux/Debian variants.

Following instructions from an helpful wiki page, I try to install using
a Linux rescue disk (provided by OVH), running all in memory, and having
qemu-system-x86_64 allowing to use a CDROM install image.

Nothing booted.

Since it was unclear from the web interface if the boot process was
depending or not on the information about an image being installed (to
allow booting from the disk), I then installed a Linux/Debian on only
one disk (one can select, 1, 2 or 3 disks, but if multiple disks this
is software RAID).

Using the rescue system, I then resized the Debian partition and
installed NetBSD on another partition (dual booting) and, to bypass a
possible limitation in the booting process (only booting GRUB and
accessing directly GRUB), I chainloaded the NetBSD stage1 from the GRUB2
menu, and verified, under qemu, this will boot, using GRUB2 boot once
feature so that if the NetBSD crashed and reboots, I can go back to
Debian to try something else.

Still no success.

It was almost certain there was a problem with the kernel.

So I wrote a special /boot.cfg to test various things, custom compiling
a kernel (since the GENERIC installation one was not running), and tried
to validate step by step the booting procedure in order to try, after
to insert a cpu_reboot() instruction in the kernel to see where the
problem occurred (since when rebooting, I will be able to connect to
Debian, I would have known that before the instruction, it was OK).

In order to limit the work, I used once more qemu but to install NetBSD
on another disk (so that I can in fact use qemu not with the rescue
system, but directly under Debian without trashing the very disk Debian
runs from).

The first test was to see if, indeed, NetBSD stage2 was loaded. The
menu in /boot.cfg was simple: the instruction "quit".

=> First lesson: this does not work, because the rebooting is not a
total one, and mapping the drives (in GRUB2) to ensure that the booting
succeeds, the stage2 reboots but finally back to itself, so the machine 
was unendlessly rebooting and I had no connection.

It took me various modifications before realizing it was the case (under
qemu) so I abandonned the idea and tried to boot a custom kernel,
without SMP and without framebuffer (i915drmkms).

This succeeded.

I then get back to test letting the framebuffer. It didn't work.
I then disable the framebuffer for everything, and tried with SMP. It
worked.
Then, I tried 9.2 GENERIC and 9.3 GENERIC without framebuffer. Both
work.

So the final lesson: NetBSD can be installed on such machine but the
framebuffer is a problem. And NetBSD is not far behind Linux, because
the Debian distribution is a recent one, and the main clue was in the
Linux dmesg: 

Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-14-amd64 root=UUID=eea6d0a4-03b6-44e6-8588-ff6c4eba2095 ro nomodeset iommu=pt

The: nomodeset.

Linux doesn't work with the embedded graphics (HD 4000) either.

So it is partly a kernel problem (kernel stalling with framebuffer
initializations) but mainly an install problem (framebuffer in such
cases should be disabled).

If someone thinks there can be interest in how I set dual booting,
chainloading NetBSD from GRUB2, and configuring the boot procedure, I
can write a mini-page about it.

For the rest: problem solved. NetBSD can install on an OVH baremetal
(at least this kind of machine).
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index