Last modified 5 years ago Last modified on 03/01/10 02:25:56
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.
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)
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"
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
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.
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.