Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a laptop with a working dual boot system to Windows NT4 on the first primary partition, (another primary partition,) and Lubuntu Linux on an extended partition using grub2 as the boot manager in the MBR. I wish to add a third boot option to ms-dos on the second primary partition [edit: FAT16] on this disk.

So far I have added the following script in /etc/grub.d/40_custom

menuentry 'DOS' {
    parttool(hd0,msdos1) hidden+
    parttool(hd0,msdos3) hidden-
    set root=(hd0,msdos3)
    chainloader +1
    parttool ${root} boot+

The second primary partition contains the contents of an old dos boot disk including the following files: (, autoexec.bat,, among others.

When I run update-grub, os_prober fails to recognise the dos partition and my custom script is ignored with no menu entry added. If I then use Grub Customizer to overwrite grub.cfg, the menu entry is added, but upon attempting to boot from that option, I get the following error, which I believe is reported by the bios: "This is not a bootable disk. Please insert a bootable floppy and press a key to try again ..." ... at which pressing a key will return me immediately to the grub boot menu.

So my questions are these: 1. Can I boot to ms-dos on the second primary partition with this system configuration? 2. Is there something extra required in my dos partition to make it bootable? 3. Do I need to somehow add something like grub4dos into the chain after grub2 and before dos? (would like to avoid if 1 and 2 are workable) 4. Is this request not at all possible? (at which point I presume I will have to burn a cd with this OLD dos program we want to run)

share|improve this question
1. Your OS seems to be IBM PC-DOS or DR-DOS, not MS-DOS. MS-DOS system files are called io.sys and msdos.sys, not ibm*.com. 2. Did you just copy the files from the boot disk to the partition? Some files (I'm guessing ibm*.com) have to get saved to a special sector of the partition. On MS-DOS, this could be accomplished with format /S or sys. – Dennis Mar 3 '13 at 15:59
Hi Dennis, yes I copied the files from the boot disk directly to the partition. I do not know how critical the dos version is to the functionality of the required program (ie. direct single line printing to a dot matrix LPT printer etc.). I will have to see if it is possible to do this with a more recent version of ms-dos, provided the other parts of the question are not in conflict (namely the grub2 script chain loading to the second primary partition after hiding the first)? Not sure how I would go about installing dos or doing a format /S from win nt4.. – Stutz Jr Mar 3 '13 at 20:06
A DOS boot disk should contain at least, as it was vital to make a non-booting DOS computer functional. – Dennis Mar 3 '13 at 22:04
up vote 0 down vote accepted

In answer to my question, thanks to prompting from Dennis I can confirm:

  1. It is possible to boot to ms-dos on the second primary partition using grub2 with the quoted script above (refer to GNU GRUB Manual), although a manual edit of grub.cfg was required as update-grub/os_prober did not pick up the system automatically.
  2. Extra files were required to make this possible: simply copying the contents of a floppy boot disk was not sufficient. "sys c:" reported a spurious error about insufficient disk space, likely due the special sector requirement mentioned by Dennis above. I had to perform a "format c: /s" using an MS-DOS 6 boot disk - which then created a properly bootable partition as above (still not picked up by os_prober). N.B. the dos boot disk assigned the letter C: to my second primary partition as it didn't pick up the Windows NT4 partition at all.
  3. I did not have to add any other boot managers after the grub2 script quoted in the question to do this.
  4. My requirement was fulfilled, however I may have inadvertently caused the Windows NT4 bootloader to fail in the process. I'll deal with that as a separate issue.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.