Question: I have a Windows XP/Debian Squeeze (XFCE desktop) dual-boot set up on a Dell Latitude laptop. The Windows XP portion boots fine. However, sometimes the Debian portion does not boot. If it doesn't boot, and I do a hard reboot, it will boot the second time. However, sometimes Debian will boot the first time.

How can I diagnose this problem?

All help appreciated!

[EDIT] I should mention that the improper boot manifests itself as a failure to reach the login screen. I see the standard Debian wallpaper with the stars and so on, but it doesn't display the login box.

Answer: 
AFAIK this is the graphics driver that is causing the problem. Can you boot to console in failsafe (recovery mode)? Check and regenerate your `xorg.conf` file, make sure all the settings are right.
This is probably a buggy driver, now the problem is to find out which.
The first thing to investigate is to look at the logs: `/var/log/kern.log` and `/var/log/Xorg.0.log`. Note that that latter file is restared each time you boot; if you've rebooted into X since the failure, the previous log will be in `/var/log/Xorg.0.log.old`.

The OS may gave crashed before it could write the logs, but there is probably a message on the console. To make this message appear, you need to deactivate the boot-time splash screen. With Grub 2, edit `/etc/default/grub` and change the line `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"` to just `GRUB_CMDLINE_LINUX_DEFAULT=""`. Hopefully, the next time the bug prevents your system from booting normally, the last few lines on the screen will tell you what's wrong.