What are the two devices that are giving you problems.
Are the IDE ribbon cables pushed firmly in to the devices and motherboard.
How old is the system, could it be an old cmos battery starting to fade.
You can switch your hard drives to manual. Also your cdrom \ dvd \ cdrw to none. This will stop the bios looking for it and load faster. This will also stop telling windows if it is or isn't there.
If the problem devices are cdrom \ dvd \ cdrw then you can delete them, one at a time, from device manager and let windows reinstall them at next boot.