Find the answer to your Linux question:
Results 1 to 4 of 4
I've been working on a bootable usb drive with the grub bootloader that basically is a utility to run a number of floppy images, etc. I have a number of ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3

    Grub to run batch and exe files

    I've been working on a bootable usb drive with the grub bootloader that basically is a utility to run a number of floppy images, etc. I have a number of submenus created to break down motherboard bios, dmi, download disks and everything works fine. However there is a few bios flashes and utilities that are too big to be floppy emulation images. They originally are on a cd-rom, however with all of there files copied from the cd-rom to a dos bootable usb written with batch files, they work fine.

    Basically how can I run batch files with grub commands to run like it's in dos? For example, I want grub to run flash.bat which has a number of dos commands to display a text file of options, and execute the batch files and run the flashes like they would on cd-rom or floppy.

    I've been looking all over forums and sites and really haven't seen anything that would seem to help. I hope it's possible and seems like it could, i'm just missing which commands to use and how.

    I also looked into running the raw .iso image of the cd-rom but they way i understood reading some forums that grub couldnt' do that yet. I'm running grub .97.

    Any ideas? Thanks in advance.

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    Batch files are executed by the DOS command processor, COMMAND.COM,
    which in turn , depends on the DOS kernel. In short, you have to run DOS.

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3
    Quote Originally Posted by rcgreen View Post
    Batch files are executed by the DOS command processor, COMMAND.COM,
    which in turn , depends on the DOS kernel. In short, you have to run DOS.
    Ok, so for instance in my config file I have:

    title TEST
    root (hd0,0)
    kernel /boot/memdisk
    initrd /boot/s5000/dosboot.ima


    Where 'dosboot.ima' is an exact image of a ms dos bootable floppy. When I try this, it runs through and bumps back to my main config file. Could I then in my config file just put dos commands then for example:

    title TEST
    root (hd0,0)
    kernel /boot/memdisk
    initrd /boot/s5000/dosboot.ima
    flash.bat
    run.bat

    ????

  4. #4
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3
    Quote Originally Posted by mirage137 View Post
    Ok, so for instance in my config file I have:

    title TEST
    root (hd0,0)
    kernel /boot/memdisk
    initrd /boot/s5000/dosboot.ima


    Where 'dosboot.ima' is an exact image of a ms dos bootable floppy. When I try this, it runs through and bumps back to my main config file. Could I then in my config file just put dos commands then for example:

    title TEST
    root (hd0,0)
    kernel /boot/memdisk
    initrd /boot/s5000/dosboot.ima
    flash.bat
    run.bat

    ????

    when i run this, it still jumps back to my main config file, but when i pause it before it jumps back, the error says "no systemdisk. booting from harddisk".

    so i'm assuming i have to put in another command for the dos kernel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...