LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-06-2008, 12:12 AM   #1
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Rep: Reputation: 15
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.
 
Old 12-06-2008, 12:23 AM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,238

Rep: Reputation: 121Reputation: 121
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".
 
Old 12-06-2008, 05:51 AM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
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
 
Old 12-06-2008, 08:35 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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.)
 
Old 12-06-2008, 09:44 AM   #5
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
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
 
Old 12-06-2008, 10:13 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by Duck2006 View Post
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.
???
 
Old 12-07-2008, 01:06 AM   #7
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Original Poster
Rep: Reputation: 15
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.
 
Old 12-07-2008, 06:53 AM   #8
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Mark the partition flag as boot with parted magic or gparted.
 
Old 12-07-2008, 07:38 AM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
Quote:
Originally Posted by pixellany View Post
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.
 
Old 12-07-2008, 01:10 PM   #10
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Original Poster
Rep: Reputation: 15
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.
 
Old 12-07-2008, 02:41 PM   #11
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
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.
 
Old 12-07-2008, 02:46 PM   #12
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,238

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by pinniped View Post
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?

Last edited by Quakeboy02; 12-07-2008 at 02:49 PM.
 
Old 12-07-2008, 08:02 PM   #13
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Original Poster
Rep: Reputation: 15
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.
 
Old 12-07-2008, 08:13 PM   #14
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,238

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


Reply

Tags
dual boot, grub, msdos


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading DOS by GRUB without NT-loader? JZL240I-U Linux - Software 3 10-07-2005 01:58 AM
[help]grub for dos doesn't work kevinpan Debian 5 07-27-2005 02:16 AM
Linux & Win lilke Mac & DOS in Quadra610 txino Linux - Hardware 3 07-20-2005 04:51 PM
dos fat support is 'modularized' && gconfd error thegsusfreek Linux - Software 0 10-04-2004 08:25 PM
An equivelant DOS command for & or && rootyard General 3 09-30-2003 04:24 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration