Page 1 of 1

Start ReactOS from DOS

Posted: Fri Apr 22, 2005 5:54 pm
by Malba Tahan
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?

Posted: Fri Apr 22, 2005 6:00 pm
by mf
Look at loadlin and see if it can be adapted for freeldr.

Posted: Fri Apr 22, 2005 7:30 pm
by Dr. Fred
I'm pretty sure that this is possible. But I don't know how.

Posted: Fri Apr 22, 2005 9:33 pm
by GvG
There is a Grub version for DOS, which is able to load FreeLdr. Sorry, no URL, Google is your friend.

Posted: Sat Apr 23, 2005 6:48 am
by Malba Tahan
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!!!

Make a H0WT0 in the WIKI

Posted: Sat Apr 23, 2005 7:53 am
by Jaix
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?

got one to try some time.

Posted: Sat Apr 23, 2005 9:17 am
by oiaohm
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.

Posted: Sat Apr 23, 2005 3:27 pm
by Malba Tahan
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.

Who is goiny to save us?

Posted: Sun Apr 24, 2005 9:06 am
by Jaix
[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.