User:Illen/RAM Boot

From ReactOS Wiki
Revision as of 00:00, 25 March 2019 by Illen (talk | contribs)
Jump to: navigation, search

RAM boot might prove useful when there is no other way to install ReactOS (mostly a case on modern notebooks that can boot only from the xHCI USB ports). Installation from RAM disk is possible since 0.4.11 release.

Prepare the RAM bootable USB drive

On Windows

You will need installfreeldr tool to write the FreeLDR boot sector, you can extract it from dev build images.

Execute installfreeldr as following:

installfreeldr X: FAT32

Where X is a drive letter assigned to your USB drive, if your drive is formatted using FAT16 file system, use the FAT option instead. As pointed out by the tool itself, you need to get freeldr.sys and freeldr.ini files there. You can extract freeldr.sys from BootCD/LiveCD image, and create the blank freeldr.ini file. You may have to mark the volume on your USB drive as active, you can do that with DISKPART tool, or some 3rd party partition manager.

On Linux

You can use syslinux to chainload FreeLoader, syslinux is included in most Linux distributions. Format USB drive using FAT32 file system and add the boot flag (GParted can do this for you).

Install syslinux on USB drive:

syslinux --install /dev/sdbx

Where x is a number assigned to your USB drive. Copy chain.c32 and its dependencies (libcom32.c32 and libutil.c32) onto USB drive, and create syslinux.cfg with following configuration:

DEFAULT chain.c32 file=freeldr.sys seg=0x0F80

Copy freeldr.sys (can be extracted from BootCD/LiveCD) onto USB drive, and create blank freeldr.ini on it.

Setting up FreeLoader

Now you will need to configure FreeLoader to load the ISO image to RAM and boot ReactOS from RAM disk. Here is the example of freeldr.ini configured to load the Setup or Live image:

[FREELOADER]
DefaultOS=Setup
TimeOut=5

[Display]
TitleText=ReactOS Setup
StatusBarColor=Cyan
StatusBarTextColor=Black
BackdropTextColor=White
BackdropColor=Blue
BackdropFillStyle=Medium
TitleBoxTextColor=White
TitleBoxColor=Red
MessageBoxTextColor=White
MessageBoxColor=Blue
MenuTextColor=Gray
MenuColor=Black
TextColor=Gray
SelectedTextColor=Black
SelectedColor=Gray
ShowTime=No
MenuBox=No
CenterMenu=No
MinimalUI=Yes
TimeText=Seconds until highlighted choice will be started automatically:   

[Operating Systems]
Setup="Setup"
LiveCD="LiveCD"

[Setup]
BootType=ReactOSSetup
SystemPath=ramdisk(0)
Options=/RDPATH=bootcd.iso

[LiveCD]
BootType=Windows2003
SystemPath=ramdisk(0)\reactos
Options=/MININT /RDPATH=livecd.iso /RDEXPORTASCD

You can just copy & paste the configuration from above to your newly created freeldr.ini file.

At this point, the USB drive is fully prepared to RAM boot your ReactOS ISO image, just copy it there (and remember to rename it as specified in freeldr.ini).

Prepare the RAM bootable CD/DVD/BD

Of course, it is possible to load the ReactOS image into RAM from compact discs as well. You can install ReactOS through optical drive connected to xHCI USB port (or any other unsupported interface).

You will need mkisofs utility (download the Win32 version here). Create the new folder anywhere you want and name it whatever you want (I will use "cdfiles" as a name here), this folder will hold the data that will be later burned onto a CD. Create freeldr.ini file in cdfiles folder, you can take the configuration from above. Extract setupldr.sys and its ISO boot sector (isoboot.bin) from BootCD/LiveCD image to cdfiles\loader (create the folder). Copy ReactOS BootCD and/or LiveCD to cdfiles folder, and then execute mkisofs as following:

mkisofs -no-emul-boot -eltorito-boot loader/isoboot.bin -o RAMBootCD.iso cdfiles

Now you should get the ISO image generated by mkisofs, which is ready to be burned onto optical disc. You can check the ISO image in VM software to make sure everything is alright.

Known issues

The "Opening hive failed!" error

After the 1st stage setup, you will (most likely) get the "Opening hive failed!" error when attempting to load into 2nd stage setup. A workaround is to boot into LiveCD, check the drive and partition numbers using DISKPART, and update your freeldr.ini accordingly (in most cases, just need to change rdisk value to 0). An another "hit or miss" method is to press F8 in FreeLDR menu, choose "Custom Boot" option, then "ReactOS" option, and keep trying until you find the correct drive/partition numbers and successfully load ReactOS.

1st stage setup hangs at "Flushing cache"

It seems like older operating systems (Windows 2003 and older also are affected) are having issues with reboot command on some modern computers, they won't reboot but just hang after all the shutdown tasks are done. Just wait a moment to ensure that the data was properly saved and then manually reset your computer, unfortunately you have to do it each time you want to reboot your computer.

Load process of RAM-disk stuck on the screen with the progress bar

  1. Try to wait some more time. It may taaaake a whileeeeee....
  2. Retry with a different USB-stick. The problem may be related to the local incompatibility of the computer's USB chipset and the internal controller of the USB flash drive.

External links