To boot directly into DOS, open your text editor, and in the file Msdos.sys and change the line BootGUI=1 to BootGUI=0. This makes Win98SE behave like 3.x, so it boots into DOS, and you load 98 by typing win at the command prompt. You can also do this by using TweakUI's Boot Tab and turning off "Start GUI automatically". You'll need to load the proper mouse, CD, and sound drivers, etc. in your config.sys and autoexec.bat files.
To successfully exit to DOS, rename logos.sys and logow.sys. Whenever you choose "Shut down your computer," you will go to the DOS prompt.
Also, if you followed the instructions for booting directly into DOS you should now be able to type MODE CO80 and press Enter at the "It is now safe to turn off your system" screen to exit to DOS.(That is the letters C and O and #s 8 and 0. You won't be able to see the text until you hit Enter.
To successfully exit to DOS, you may need to disable the "Fast Shutdown" feature through msconfig.
Save your previous settings in case of trouble.
Hope this helps you out.