Menu

NTInstall5

Juan Jose Pablos

Last modified 5 years ago Last modified on 03/01/10 02:25:56

History:

The nt5x-install began its life in Mario Gzuk's unattended-gui project.

Mario posted a description to the unattended-devel mail-list on how to do the work of the 16bit dos winnt.exe windows 5.x native installer from a linux script.

Nearly a year passed before I got the time and enough pressing need to adapt it to my unattended installation.

The bash script I lifted from the unattended-gui framework needed just a little bit deleting to get down to the bare metal of cp and dd ..and it just worked.

So, if you meet Mario; buy the man a beer! This is a piece of awesome work.

The first patches posted was called 'dosemu alternative' or 'alt-dosemu'

the patch-set grew to include a fix for the NTLDR not found problem.

This fix covers both dosemu and the nt5x-install script.

A optional linux command can be run after the initial windows installation is done an while the 'Soon-to-be-C:' is still mounted as '/c.

Basically summed up:

  • Much faster than winnt.exe under dosemu:
  • basic raw bare-to-the metal busybox cp and dd
  • at the io speed of the latest linux kernel
  • Editable open source (GPLv2) bash script
  • Supports long filenames and deep directory nesting.
  • a cure for "NTLDR not found" (Fixes disk geometry)

install.pl ask if you want to run the dosemu alternative (nt5x-install) or if

you want to use the old dosemu:

Use nt5x-install script - (DOSEMU alternative) Y/N

If you answer N the old dosbased winnt.exe will run under dosemu

To get rid of the question put one of these in unattend.txt [_meta] section:

    ntinstall_cmd = "" # use old dosemu

    ntinstall_cmd = "nt5x-install" # use dosemu alternative (nt5x-install)

Disk geometry fixes:

Are as default added automatically.

You can turn this of by adding these (both) in unattend.txt [_meta] section:

    fix_disk_geo_heads = ""

    fix_disk_geo_sectors = ""

Or, if you like to override the automagic stuff:

    fix_disk_geo_heads = "240"

    fix_disk_geo_sectors = "63"

All possible new settings for unattend.txt [_meta] section summed up:

ntinstall_cmd =  #system command to run in place of dosemu.

post_ntinstall_cmd = # Linux system command to run after ntinstall

fix_disk_geo_heads =  #Heads to write to disk partition

fix_disk_geo_sectors = #Sectors to write to disk partition

How the NTLDR fix works:

In all its crude evil at full display:

echo -e -n "\x`printf "%02X" $fix_disk_geo_heads`"|dd of=/dev/dsk$BOOTNUMBER bs=1 seek=26 conv=notrunc

echo -e -n "\x`printf "%02X" $fix_disk_geo_sectors`"|dd of=/dev/dsk$BOOTNUMBER bs=1 seek=24 conv=notrunc

yeah, crude, but effective.

The windows installer get what it wants, both you and me get the bloody thing installed, our employers are happy and we get paid.

If you ever try to pass on something stupid like

fix_disk_geo_heads = "VeryStupid"

all bets are off. On the good side the damage will be limited to the partition you are trying to install to.

Files introduced to the Unattended source tree:

unattended/linuxboot/misc:

   nt5x-install

   unatt-functions.sh

unattended/linuxboot/misc/ntldrbin:

   ntldr_boot_code_install

   ntldr_boot_code_sektor0

   ntldr_boot_code_sektor12

For more details see the source code.


Related

Wiki: AdvancedTopics