Start ReactOS from DOS

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
Malba Tahan
Posts: 13
Joined: Sat Nov 27, 2004 3:08 am
Location: Chapecó, SC, Brazil

Start ReactOS from DOS

Post by Malba Tahan » Fri Apr 22, 2005 5:54 pm

I'd like to run ReactOs from DOS (MS-DOS 7.0 in my case), maybe by typing reactos.exe at the command-line. That way I wouldn't have to burn a new CD or CDRW in order to install ReactOS. I would be just a matter of unzipping the binaries in C:\Reactos.
I tried to create a DOS executable to load the FreeLoader bootsector at 0x0000:0x7c00 and run it, but it didn't work.
Anyone already tried to develop a program like that? Do you think it's easy to make it? Is it going to be implemented in ReactOS in the future?
Bush was reelected, Terminator is at his side, and Superman is dead! Who's gonna save us?

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf » Fri Apr 22, 2005 6:00 pm

Look at loadlin and see if it can be adapted for freeldr.

Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Post by Dr. Fred » Fri Apr 22, 2005 7:30 pm

I'm pretty sure that this is possible. But I don't know how.
Last edited by Dr. Fred on Sat Apr 23, 2005 12:57 am, edited 1 time in total.
Where do you want ReactOS to go today ?

GvG
Posts: 499
Joined: Mon Nov 22, 2004 10:50 pm
Location: The Netherlands

Post by GvG » Fri Apr 22, 2005 9:33 pm

There is a Grub version for DOS, which is able to load FreeLdr. Sorry, no URL, Google is your friend.

Malba Tahan
Posts: 13
Joined: Sat Nov 27, 2004 3:08 am
Location: Chapecó, SC, Brazil

Post by Malba Tahan » Sat Apr 23, 2005 6:48 am

I finally managed it to work!
It's not the way I wanted, but it works.
I can't start ReactOS from DOS. I'm using a Freeloader bootdisk.
But I got what I wanted: I didn't need to burn a CD to install ReactOS at all!

Thanks for your help, guys!!!
Bush was reelected, Terminator is at his side, and Superman is dead! Who's gonna save us?

Jaix
Moderator Team
Posts: 838
Joined: Sat Nov 27, 2004 3:40 pm
Location: Sweden, Växjö

Make a H0WT0 in the WIKI

Post by Jaix » Sat Apr 23, 2005 7:53 am

Malba Tahan wrote:I finally managed it to work!
It's not the way I wanted, but it works.
I can't start ReactOS from DOS. I'm using a Freeloader bootdisk.
But I got what I wanted: I didn't need to burn a CD to install ReactOS at all!

Thanks for your help, guys!!!
Well how did you succeed? I'm sure there are a lot of us who want to be able to do the same.
Can you create a H0WT0 in the WIKI?

oiaohm
Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

got one to try some time.

Post by oiaohm » Sat Apr 23, 2005 9:17 am

loadlin.exe for linux.
freeldr.sys(what ever the multiboot sys is called)
And mbootpack
http://www.tjd.phlegethon.org/software/#mbootpack.

In theory. And I repeat in theory. mbootpack should turn a multiboot kernel ie freeldr.sys into a bzimage(a linux kernel image) so that loadlin.exe and any other linux bootloader should load it.

Yep might not work but worth a shot.

Note a linux kernel image file for loader would be nice. Ie Every linux boot loader then would support reactos directly.

Anyone want to try.

Malba Tahan
Posts: 13
Joined: Sat Nov 27, 2004 3:08 am
Location: Chapecó, SC, Brazil

Post by Malba Tahan » Sat Apr 23, 2005 3:27 pm

OK, this is how I did it:

I was unable to compile ReactOS (strange errors during compilation). So I got the ReactOS version preinstalled in qemu. I used WinImage 7.0 (It's shareware, I don't know any free HD (FAT32) disk image editor :-( ) to extract the ReactOS folder and binaries inside it to my C: drive. I also extracted "Documents and Settings", FREELDR.SYS and FREELDR.INI. - I don't have the "Documents and Settings" directory 'cause I'm using Win98.

Next, I tried to use Grub for Dos to boot FREELDR.SYS from MS-DOS mode - no succes. It could load Freeloader, but always locked at the "Detecting hardware..." message.

So I tried a different approach - that worked! I thought the problem was related to Dos Grub, so I tried to load FREELDR.SYS in a different way. I downloaded an old Freeloader (FreeLoader-20041226.i386.tar.gz) and then I tried to run the program install.exe, which is part of the freeloader package, to rewrite my HD bootsector, in order to load FreeLoader properly. I didn't work again. I couldn't even rewrite the floppy disk bootsector, it always failed! Then decided to look at install.c to see what it was doing. I found out that it was trying to rewrite the first floppy sector, but wouldn't touch the BPB (Bios Parameter Block, I guess). The floppy disk BPB starts at offset 3 in the boot sector and is 59 bytes long. So I did it manually, using WinImage. That way it worked.

After patching the boot record, I copied FREELDR.SYS from C: to A:. Then, I copied the FREELDR.INI which came with the old Freeloader to A: too. That's it.

I'm sure there should be an easier way to do that, perhaps rewriting install.exe (Maybe it works ok on WinNT, remember I'm using Win98), but if you want me to post a message about how to use WinImage to manually patch the bootsector, please ask me. There should be a way to patch your HD MBR also, but I don't think WinImage will write directly to the Hard Disk. A DOS program running in DOS mode could do it!

About the WIKI... I think it will be nice to write one, but first I want to hear what you think abou this method. There should be an easier method b4 we post it the wiki.
Bush was reelected, Terminator is at his side, and Superman is dead! Who's gonna save us?

Jaix
Moderator Team
Posts: 838
Joined: Sat Nov 27, 2004 3:40 pm
Location: Sweden, Växjö

Who is goiny to save us?

Post by Jaix » Sun Apr 24, 2005 9:06 am

[guote="Malba Tahan"]
Bush was reelected, Terminator is at his side, and Superman is dead! Who's gonna save us?[/quote]
Well this solution woan't anyway :lol:
I like tte Win2k solution,j'nit start the file winnt.exe or the Win98 solution setup.exe from DOS-prompt, really easy for those without cd-drive.

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests