Last modified 5 years ago Last modified on 03/01/10 02:23:41
There are four much better solutions for the problem. Unattended seems to be outdated, the recent CVS source doesn't compile without altering the Makefile.
It is now very possible to get the current (September 16th, 2007) CVS source to compile, which has linux kernel 2.6.22.6 so great hardware support, including SATA. Here's a (very) brief guide : [CompileCVS]
On recent systems, many of you may have experienced the infamous
NTLDR Not Found
error message after the first or second reboot. Users of Unattended 4.6 might not experience this problem, but users of the CVS version will under certain circumstances. For recent systems, the old Unattended is no choice because the used kernel misses support for several hardware items. Thus, the above error message is a problem for many of us. It only occurs on the Linux boot disk, the DOS boot disks seems to be problemless.
After poking around for a while, we seem to have at least found a workaround for this. The culprit lies in parted, which is responsible for partitioning and writing the MBR of the fat32 partition which will later on be converted to NTFS. The partition table gets created wrong, thus the Windows can't find its own boot loader, resulting in the above error message. Using parted up to version 1.6.22 cures the problem, as it relies on the old way of getting a disk's geometry, but starting with 1.6.23, it switched to a new function that causes the problem. I don't know for how long the deprecated old way will be supported in Linux kernels, but for now it works.
The main workaround is to use parted 1.6.22. Get Unattended from CVS and just modify your linuxboot/Makefile
to read
parted=parted-1.6.22
and go on with compiling, that should fix the problems.
We will soon provide a ready-to-use makefile, a short documentation on this and a ready-to-use linuxboot ISO for your convenience. The parted mailing list has already been informed about this problem, and we hope to have a solution for newer parted versions soon.
cd unattended/linuxboot
Makefile
in there (available for download on this site) make download
(in case of error, retry, can take some while until you got everything) sed -i "s/2.6.15.6/2.6.16.20/g" misc/nail-floppy.txt
replace "2.6.16.20" with the version of the kernel you are really using in Makefile
make tftpboot
(users wanting to have the ISO instead of the TFTP boot have to enter make iso
here and copy the ISO instead of the TFTP boot files later on) pxelinux.0
to tftpboot/
tftpboot/pxelinux.cfg/default
to match your z_path, z_user and z_pass wget http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.817-MSWin32-x86-257965.msi -O install/packages/ActivePerl-5.8.8.817-MSWin32-x86-257965.msi
mkdir install/os/xp_sp2
i386
folder and your own OEM drivers to install/os/xp_sp2
tar cvfz unattended.tar.gz unattended/install unattended/linuxboot/tftpboot
z:\tools\sys a: c:
to doit.bat
, right before the Windows setup is invoked, might work as well. (Thanks to Huberstuff for that!) format_cmd="format /y /z:seriously /q /u /a /v: c:"
As suggested by Chris Needham, change linuxboot/misc/master
for fixing DHCP issues
146c146
< if [ $SECONDS -ge $(($start + 60)) ] ; then
if [ $SECONDS -ge $(($start + 10)) ] ; then
A fix suggested by Tobias Richter for the NTLDR Not Found message
--- master.org 2006-06-10 12:45:21.828736942 +0200
+++ master 2006-06-10 12:47:04.144845228 +0200
@@ -399,9 +399,15 @@
cp /etc/dosemu/dosemu.conf /tmp
echo \$_hdimage = \"/dev/dsk$active_part\" >> /tmp/dosemu.conf
+
# DOSEMU always exits non-zero. FIXME.
dosemu.bin -f /tmp/dosemu.conf
+
sync
reboot
And then create a postinst.sh script inside the site folder:
----postinst.sh----
the linuxbootdisk
conv=notrunc
echo -e -n "\xf0" |dd of=/dev/sda1 bs=1 seek=26 conv=notrunc
mkdir -p /mnt/drive
mount -t msdos /dev/dsk1 /mnt/drive
echo -e -n "\xf0" |dd of=/mnt/drive/\$win_nt\$.~bt/bootsect.dat bs=1 seek=26
conv=notrunc
sleep 30
Another idea from Falko Trojahn
If I correctly remember there's a way to use unattended.txt files
according to the mac address as (mac-address-here).txt. Perhaps this
could be a way here, too, if somebody knows if there is (or we can get
somewhere from) an environment variable with the mac address to use it
during postinst.sh.
Or put in /etc/master something like
val=$(get_cmdline_param z_special) [ -n "$val" ] && Z_SPECIAL=${val#*=}
(around line 180 there same is done for Z_PATH etc.).
Then, in postinst.sh you can have:
if [ -n $Z_SPECIAL ] ; then
# FOR IBM ...
else
# FOR NORMAL PC ...
fi
So, if you specify e.g. "z_special=1" on the linuxboot command line,
your script gets executed.
When using precompiled ISOs, remember du update the linuxaux directory.