Well actually, if it says to restart the computer, you're supposed to have removed the CD from the drive so Windows can continue with booting up and the installation from the harddrive
You might want to boot up the computer from the floppy and completely format the harddrive from there (that way it should work), then start installing Win98 from the CD again. Just remove the CD before booting up, when it says you need to restart the computer, and insert it again after Windows GUI launches and asks for the CD.