Added ant target to support NT bootloader

Thanks to the help of GRUB installer for windows, it's now possible to use the windows NT/2K/XP boot menu. After this menu, you have the 'classic' grub menu for JNode.

How to use (I consider that windows is on c:) :
- If your windows is installed on C:\, nothing to do. Else, see Changing the default config.
- run ant with boot-files-winNT as target. this will build JNode and copy boot files to c:\jnode (default config).
- add (if not done) this line to your c:\boot.ini :
You must have admin rights to edit the file. This simply add a new menu to NTLDR.

Changing the default config
If you want another directory/drive for jnode boot files, change these properties : partition-nt (default: (hd0,0)) and jnode.install-nt.dir (default: C:\jnode). partition-nt use the grub notation and must correspond to the drive for jnode.install-nt.dir (by default c:).
For most users, windows is generally installed in c:\ on first drive, first partition. So, generally there is no need to change these properties.

NB: See the readme.txt and install.txt of the website for more informations on limitations and warnings (defragmentation, compressed drive/files, ...)

Works for me

one hard disk with Windows (no other partitions)

(Important??) Observations:
System Information shows Boot Device is \Device\HarddiskVolume2
BOOT.ini contains multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
Admin Tools->Disk Management shows a 47MB FAT partition (EISA Configuration) and a C: NTFS partition (System)

I downloaded the last grubinstall (v1.01) to replace JNode's old version.
I changed the partition-nt ant property to (hd0,1).
Ant build reports NTFS mount succeeded (and prints some info)
Double checked that (hd0,1) appears in menu-nt.lst.


Works fine on my 2kpro.
Thanks for the good work.


I have just tryed it on my XP

I have just tryed it on my XP, but it only comes to the "GRUB " text and then it stops. Any ideas?


Please give me more details about your config

I think it's a partition/hard drive problem because grub must be on the same drive as XP where there is the NT bootloader (file C:\ntldr in my case).

Do you have XP on the first partition of your first hard drive ?

Is your XP home directory in C:\windows (so XP is installed in C:) ?
I ask you this question because I think it's possible to change the drive letter where is installed XP (so, not necessary c:)

The ant task create a directory c:\jnode and put files in it. Do you have these files ?


Same Problem?

I had the same problem (selecting jnode -> GRUB prints out, halts). I discovered in my boot.ini that windows was posted at

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect

even though it shows up as C:\

I have 2 physical hard drives, 80Gb each, Windows IDs them as C: and F:, and Windows/ lives on C:\. Why is partition=2 in my boot image? Is this related to why I can't boot.ini to jnode? I tried changing hd,0 to hd,1 in the ant build script, but had the same error.

Also, my filesystem is type NTFS on C:\, is that okay for grub?

I also found:
->A support website that can answer questions about this installer
->GRUB problem

has a partial discussion of this same problem.


about menu-lst.ini

about menu-nt.lst:
any change to your c:\jnode\menu-nt.lst will have no effect to grub (it's just for information).
Instead, you should edit path_to_jnode_sources\all\conf\x86-nt\menu-nt.lst and use ant with target build-nt. This task will modify these files : stage1-nt and stage2-nt (writing the sector numbers where are located the files full.jgz, install.jgz and jnodesys.gz).

Having xp installed on ntfs is ok.

Sam, could you be more precise :
where is the file ntldr (in c:\, in f:\ ...) ?
Please use the disk manager (xp admin tool) and give me the partition number and disk number where is located your system. That's these numbers that are useful to configure menu-nt.lst.

Here is an example, if xp (and ntlr) is in second_drive-first_partition you must use (hd1,0) in grub menu. Maybe it's your case.

However, you can debug under grub shell with command like :
kernel (hd0,0)/jnode/jnodesys.gz
module (hd0,0)/jnode/full.jgz

If this allow you to boot jnode, then you can change the properties according to your tests under the grub shell.

The same here, only thing is

The same here, only thing is that I have one 40GB hd.

build result?


I have the same problem,

one thing to notice after the build process :


[copy] Copying 1 file to C:\jnode

[copy] Copying 1 file to C:\jnode

[echo] F:\bw\uni\inf02\Studienarbeit\jnode_eclipse\all\bin-nt\grubinstall-nt.exe -d (hd0,0) -1 C:\jnode\stage1-nt -2 C:\jnode\stage2-nt -m C:\jnode\menu-nt.lst

[exec] NTFS mount succeeded

[exec] NTFS dir failed for /jnode/stage2-nt

[exec] FAT mount failed

[exec] The file C:\jnode\stage2-nt could not be found on volume (hd0,0)


so I think it is no partition problem, but the stage2. Thats why GRUB hangs after stage 1.


I worked a little on this yes

I worked a little on this yesterday and got some more by changing the -d parameter to the grubinstall-nt.exe in the build script:

property name="partition-nt" value="C:"

Now it can build without failing the [exec] The file C:\jnode\stage2-nt could not be found on volume (hd0,0) part. But now I get a error 17 when trying to boot, this is from the grub site's error messages list:

17 : Cannot mount selected partition
This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.

hmm... what now?