LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ms-dos & grub (http://www.linuxquestions.org/questions/linux-newbie-8/ms-dos-and-grub-688685/)

Chronothread 12-06-2008 01:12 AM

Ms-dos & grub
 
How can you set up GRUB to be able to boot MS-DOS? I've tried a couple of things with no luck. What should be in the GRUB menu.lst for DOS.

And if it's not very easy to do it's not a big deal. I mostly just want to have DOS for the fact that it is DOS.

Quakeboy02 12-06-2008 01:23 AM

Here's an example of dual booting to Windows on a different drive from grub.
Code:

title                Windows Server 2003
rootnoverify        (hd1,0)
map                (hd0) (hd1)
map                (hd1) (hd0)
makeactive
chainloader        +1

Notice the two "map" calls that essentially swap the drives. Here's a link to a random page that will give you more info: http://www.linuxselfhelp.com/gnu/gru...er/grub_4.html. You can also search here on LQ for "dual boot".

mrrangerman 12-06-2008 06:51 AM

If you have Dos installed on a separate drive then as Quakeboy02 has posted should get you going. But if you have Dos installed on the same drive as Linux you should be able to chainload some thing like this.

Code:

root (hd0,0)
chainloader +1
makeactive
boot

Here is another link for Grub booting tips

pixellany 12-06-2008 09:35 AM

What is implied here, but not stated directly, is that DOS has it's own bootloader. With "chainloader", you are passing control to the DOS loader just as you would for Windows.

As to why anyone would WANT DOS, I defer to the real experts here....;) (I always have seen DOS as sort of like Unix, but with some strange syntax, partitions called "drives", and all the "/"s going the wrong way.)

Duck2006 12-06-2008 10:44 AM

The good old dos days, "pixellany" you don't know what you missed.


"Chronothread" This may help.

http://ubuntuforums.org/archive/index.php/t-143192.html
http://www.linuxselfhelp.com/gnu/gru...er/grub_4.html

pixellany 12-06-2008 11:13 AM

Quote:

Originally Posted by Duck2006 (Post 3366389)
The good old dos days, "pixellany" you don't know what you missed.

Sure I do...I had the opportunity to start on the Mac, and then the PC much later, after Windows had reached the advanced state known as "Windows '95".

I had the opportunity to experience the earliest 128K Macs with no harddrive, learning to write Mac apps in C (when the Mac OS itself was written in Pascal), experiencing the mind-blowing performance breakthru when installing one of the first 10 MEGA-byte Hyper-drives.

Then on to the era of the Power-Mac (AKA Crash-o-Mat). It was my 7100, crashing a minimum of once per day, that moved me to Windows 95......incomprehensible today that Win95 would be seen as an improvement over anything.

What would have happened to modern computing if:
--Apple had had more coherent management in the early years.
--Linus Torvalds had been born 5 years earlier.
--The USA had had a rational approach to controlling monopolies and excessive corporate power.
???

Chronothread 12-07-2008 02:06 AM

Thanks everyone for the replies.

MrRangerMan, I tried the code you suggested and I got the following:

Code:

  Booting 'MS-DOS'

root (hd0,0)
 Filesystem type is fat, partition type 0xb
chainloader +1
makeactive
boot
This is not a bootable disk.  Please insert a bootable floopy drive and press any key to try again ...

Anyone know what I need to do to fix this?

Thanks again for your help.

Duck2006 12-07-2008 07:53 AM

Mark the partition flag as boot with parted magic or gparted.

archtoad6 12-07-2008 08:38 AM

Quote:

Originally Posted by pixellany (Post 3366411)
Then on to the era of the Power-Mac (AKA Crash-o-Mat). It was my 7100, crashing a minimum of once per day, that moved me to Windows 95......incomprehensible today that Win95 would be seen as an improvement over anything.

You "obviously" (;)) never ran "Winders" 3, let alone "Winders" 1. :)


But seriously, there is excellent advice here in amongst the humor -- no idiot wrong paths in the lot.

Chronothread 12-07-2008 02:10 PM

I tried flagging the fat32 partition as boot but it still gives the same result. Also, I tried unflagging it as boot and loading it like that. When I did that it gave the same result, but the weird thing was that when I reloaded gparted it was already flagged as boot again. Maybe I'm doing something wrong when I'm closing gparted or something?

Thanks for your help so far.

pinniped 12-07-2008 03:41 PM

Quote:

This is not a bootable disk. Please insert a bootable floopy drive and press any key to try again ...
For GRUB to actually chain to the DOS bootloader, you actually need a DOS bootloader. Each partition map (including the MBR) has some space used for storing the bootloader (for DOS it is the entire bootloader, for most other systems it is the Stage1 bootloader). What seems to be happening on your machine is that you instructed it to chain to another boot block (in a partition map) but the map did not actually have any boot code.

So the challenge is putting in an actual MS-DOS boot code into the partition you want to boot.

Quakeboy02 12-07-2008 03:46 PM

Quote:

Originally Posted by pinniped (Post 3367389)
So the challenge is putting in an actual MS-DOS boot code into the partition you want to boot.

Wouldn't we normally disconnect all other drives at this point and setup the target drive so that it boots properly under Windows, before we try to get the grub transfer working?

Added:
Chronothread did you specify how many drives etc in this thread and I just missed them? How many drives do you have. Exactly how are they partitioned? Did DOS (is it DOS and not windows) actually boot before you installed grub?

Chronothread 12-07-2008 09:02 PM

Just one drive. I've got the first partition as fat32 for DOS. Second as puppy ext3. Third as Linux Swap. It is MS-DOS 7.10 which is installed. When installing I was going to try to see if it would work by itself, but whenever it tried to edit the MBR the installation would freeze up. However, this also happened whenever I let it try to search for a usable partition. By skipping those two parts the rest of the installation went off without a hitch. However, because of not letting it edit the MBR and since I haven't gotten it to work on GRUB yet I have not yet had it running.

Thanks for your help.

Quakeboy02 12-07-2008 09:13 PM

You might give Super Grub Disk a try to see if that will fix it for you.


All times are GMT -5. The time now is 06:57 AM.