Menu

Adding windows to grub2win window

jlaudiofan
2017-05-26
2017-06-05
  • jlaudiofan

    jlaudiofan - 2017-05-26

    Is there a way to add Windows 10 to the grub2win window, or do I have to go into the windows boot loader?

    I have read through some threads here and haven’t been able to find the information I am looking for.

    I have my laptop with Windows 10, Bodhi Linux, and a DOS partition. I’d like to add DOS to grub2win as well, but my initial question is the more important of the two.

    If this has already been answered elsewhere, a link to the pertinent thread would be much appreciated.

    Thank you!

     
    • Ed  P

      Ed P - 2017-05-27

      Hi Jason,

      How did you get a DOS partition? Did you install a DOS system to it or copy a DOS system to it?

      And to show you how old I am I find it difficult to write DOS without the word floppy following it. :D

      Ed

       
      • jlaudiofan

        jlaudiofan - 2017-05-27

        I copied all the files from an existing (working) machine. So far I have been unable to get it to boot, but I can get it running in DOSBox if I run the autoexec file. I remember the time before windows ;)

         
        • Ed  P

          Ed P - 2017-05-28

          Ah yes, autoexec.bat and config.sys, I remember them. So not an install, and thus no MBR involvement. So chainloader shouldn't work. But what will Drummer?

          Can you post the two boot files Jason?

          I gotta go rummage around the desktop pc upstairs. LOL

          Ed

           
  • Drummer

    Drummer - 2017-05-26

    Hi Jason,

    Is your machine running BIOS or EFI?

    In BIOS mode, the native Windows bootloader starts at boot time and it in turn loads Grub2Win. Therefore, your must start from the Windows bootloader in BIOS mode.

    I'm not sure what you mean by a DOS partition, please explain. Do you mean a partition containing the old MS DOS operating system?

    Please let me know,

    Dave

     
  • jlaudiofan

    jlaudiofan - 2017-05-27

    It is running BIOS, so looks like I will use the windows bootloader for windows.

    As for the DOS partition, yes it's a FAT partition with MS-DOS on it. I use old dos based programs regularly at work, and would like to be able to boot into DOS instead of using dosbox (which is a bit flaky for what I need to do in DOS).

    Would I be better off using the windows bootloader to boot into dos?

    Thank you for your reply Dave :)
    Jason

     
  • Drummer

    Drummer - 2017-05-27

    Hi again Jason,

    Yes you should be able to set up an MS-DOS entry as follows:

    Add a menu entry with an OS type of "other". When you are prompted to enter custom code, the following two lines should suffice

     set root='(hd2)'               # Should point to the MS-DOS hard drive
     chainloader +1
    

    Obviously, you will need to adjust the set root command to point to your DOS drive number.

    I've attached a screenshot showing how it should look.

    Please let me know how this works out for you. I don't have a DOS test bed, but this should work.

    Dave

     
    • jlaudiofan

      jlaudiofan - 2017-05-27

      I tried it but it has not worked. I get a black screen with a short countdown, then a message to remove disks or other media, press any key to restart.

      I think the code you gave me is working as intended, and it's something not right with my DOS installation.

      I thank you for your help sir!
      Jason

       
  • Drummer

    Drummer - 2017-05-28

    Hi Jason,

    One more try.

    I built an MS-DOS 6.22 virtual machine using VirtualBox and ran into the same problem trying to boot from Grub.

    Playing around with the code and looking around the Internet, I came up with this

    drivemap (hd1) (hd0) # (hd1) is the MS-DOS 6.22 boot disk
    set root=(hd1,1)
    chainloader +1

    I added the single line of code, the drivemap (hd1) (hd0) command and it worked (at least in VirtualBox).

    Seems this tricks MS-DOS into seeing the second drive as drive 0. Obviously you will need to fill in your actual MS-DOS drive number.

    Please give this a try and let me know.

    Thanks,

    Dave

     
  • Drummer

    Drummer - 2017-05-28

    Hi again Jason,

    Search by disk label also works. You need to fill in the proper label on the search command.

    search.fs_label MS-DOS_6 dosaddress
    echo The MS-DOS 6.22 disk is address $dosaddress
    drivemap ($dosaddress) (hd0)
    set root=($dosaddress)
    chainloader +1

    Again, please let me know if this works in a real environment.

    Thanks,

    Dave

     
  • Ed  P

    Ed P - 2017-05-29

    A couple of grubldr menu items I encountered that may help the cause:

    title Dos 7.1 from Windows 98
    chainloader (hd0,0)/io.sys
    boot
    
    title Return to DOS
    chainloader /IO.SYS
    

    HTH

    Ed

     
  • Ed  P

    Ed P - 2017-05-31

    Well, this didn't work/

      set DOS='/DOS/io.sys'
      search -f $DOS --set=root
      chainloader $DOS 
    

    error: cannot load imge

    Which I suspect is due to the DOS folder being on a NTFS drive. Will try a FAT flash drive later.

    Ed

     
    • Ed  P

      Ed P - 2017-05-31

      NTFS not the problem. I moved the folder to a FAT32 flash drive and got the same error. Also noted the file name displayed differently in Linux than in Windows but this

      set DOS='/DOS/IO.SYS'

      didn't help either.

      Ed

       
  • jlaudiofan

    jlaudiofan - 2017-06-05

    I am still fooling around with this. Every time I try to boot to the dos partition, I get "Please remove disk or other media, press any key to restart".

    I am able to use a win98SE boot disk and get a dos prompt. I'm using a toughbook cf-30 which should have dos compatible hardware. I think I haven't found the correct set of dos files to make it work yet though.

    Dave, the disk label search did work and find the correct partition, but I get the above mentioned remove disk error.

    I will report back after more testing.

     
  • jlaudiofan

    jlaudiofan - 2017-06-05

    Dave,

    Your search label code in the above post worked like a charm. I ended up deleting my dos partition and starting over from scratch. There must have been a glitch in the matrix, because after doing a "SYS C:" on the dos partition and copying over my software, it's working like a charm.

    Thank you for taking the time to help me get this working, I really, really appreciate it!

    Jason

     
    • Ed  P

      Ed P - 2017-06-05

      SYS C: made the partition bootable. So not just a plain FAT32 partition anymore. OK. Thanks for the update.

      My testing fails were most like due to that and the fact my machine is UEFI. Too bad, it would have been fun to boot to old DOS to show friends where we came from. I suspect DOSBox may support that idea.

      Ed

       
  • Drummer

    Drummer - 2017-06-05

    Hey Jason,

    Glad it worked out well for you!

    Thanks again for your patience,

    Dave

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.