Most of the time, I would use a Huayra GNU/Linux (a Debian distro for educational purposes), as it was tailored for low spec Atom netbooks in Argentina. There is a specialized AntiX for these machines too, with many games/emulators. A ThinkPad T42 with 2 Gigs should run Huayra 3.2 without any issues.
retrocomputing
Discussions on vintage and retrocomputing
Thanks for your suggestion. Antix is already on my list of lightweight OSs to try out.
Currently, I have been daily driving FreeBSD on a ThinkPad T43 (slightly newer internals than T42).
As others pointed out, finding Win98 drivers for that will be quite a challenge. The same probably applies to Windows 2K/Me. If for some reason you don't like XP, a good alternative for T43 is OS/2 based OSs, starting from 0S/2 Warp 4.52. I tend to prefer supported and maintained software as long as the device is expected to surf the internet, so ArcaOS would be a better alternative.
Linux support for 32-bit x86 is shriking day by day; at this point you'd better install NetBSD on anything i486 onward (but this is just my opinion).
Considering it has a pentium, and I have core 2 duos that won’t open some websites, you might run into some issues as well. Can’t fix that, the cpu just doesn’t physically have the instruction set. But other than that, have fun and don’t expect performance greater than a raspberry pi.