Tirsdag 18 mars 2008 15:18, skrev Regis Gras:
> After a lot of problems with samba (finaly, I compiled samba-3.0.20
> instead of 3.0.27)

I used "security = share" to get my samba share working with the newer 
unattended linuxboot.
I dont know if that will help, but is worth mentioning.

> As you said, this alternative installer is not yet included in 4.7
>
I really hope we can get a new release out soon :-)

> I do not found any nt5x-install with google
> On http://www.source-exchange.de/unattended/nils/ I do'nt see how to
> compile a kernel
>
> Do you know how to do to install nt5x-install in the official
> unattended-4.7 ?

I posted updated patches to -devel last night.
They are against current cvs, and Im not sure if they apply on 4.7.

But anyway, a quick and dirty "smørbrødliste":

- Pick a good directory for the CVS build:
[EMAIL PROTECTED]:~/src/unattended$ mkdir 2008-03-18
[EMAIL PROTECTED]:~/src/unattended$ cd 2008-03-18

- login to CVS (in one line):
cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/unattended 
login

(just hit enter when asked for password)

-download from CVS (in one line):
cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/unattended 
co -P unattended

You now have downloaded the unattended build-source from CVS :)

While standing in the same directory:
extract the .tar.gz into the unattended directory structure
(adds the ntldr binaries and the nt5x-install script to the unattended tree)
and apply the patches.

apply the 3 patches like this:
patch -p0 <altdosemu-xxx.patch

Now you are ready to do a "make download"

After the package download is done, add your tweaks to the kernel

 And finally:
"make" or "make iso" or "make tftpboot"
in the linuxboot directory.


Please note:
There are several new upgraded packages in CVS now and they are largely 
untested.
Also, busybox will probably ask a lot of questions.
I hope this will be somewhat helpful :-)

Attachment: altdosemu-2008-03-17.tar.gz
Description: application/tgz

--- unattended/linuxboot/Makefile-bf-altdosemu	2008-03-17 20:40:46.000000000 +0100
+++ unattended/linuxboot/Makefile	2008-03-17 21:08:00.000000000 +0100
@@ -790,6 +790,16 @@
 
 $(call copy_file,misc/freedos-mbr.bin,stage1/usr/lib/freedos-mbr.bin)
 
+$(call copy_file,misc/ntldrbin/ntldr_boot_code_install,stage1/usr/lib/ntldrbin/ntldr_boot_code_install)
+
+$(call copy_file,misc/ntldrbin/ntldr_boot_code_sektor0,stage1/usr/lib/ntldrbin/ntldr_boot_code_sektor0)
+
+$(call copy_file,misc/ntldrbin/ntldr_boot_code_sektor12,stage1/usr/lib/ntldrbin/ntldr_boot_code_sektor12)
+
+$(call copy_file,misc/nt5x-install,stage1/usr/bin/nt5x-install)
+
+$(call copy_file,misc/unatt-functions.sh,stage1/usr/lib/unatt-functions.sh)
+
 # Some apps (namely dosemu) need getpwnam() etc. to work
 $(call copy_file,misc/passwd,stage1/etc/passwd)
 
@@ -799,7 +809,12 @@
 		stage1/etc/master stage1/etc/modprobe.conf		\
 		stage1/etc/module-order.txt				\
 		stage1/etc/udhcpc-script stage1/etc/nsswitch.conf	\
-		stage1/etc/passwd stage1/usr/lib/freedos-mbr.bin
+		stage1/etc/passwd stage1/usr/lib/freedos-mbr.bin	\
+		stage1/usr/lib/ntldrbin/ntldr_boot_code_install         \
+		stage1/usr/lib/ntldrbin/ntldr_boot_code_sektor0         \
+		stage1/usr/lib/ntldrbin/ntldr_boot_code_sektor12        \
+		stage1/usr/lib/unatt-functions.sh                       \
+		stage1/usr/bin/nt5x-install
 
 # /etc/version
 stage1/etc/version: FORCE
--- unattended-cvs/linuxboot/misc/master	2008-03-17 17:12:55.000000000 +0100
+++ unattended/linuxboot/misc/master	2008-03-17 20:42:58.000000000 +0100
@@ -363,14 +363,6 @@
 
 echo "*** By Jove, I think we've got it!"
 
-# FIXME: Bad hack to work around dosemu bug running over network
-rm /usr/bin/dosemu.bin
-cp /z/linuxaux/usr/bin/dosemu.bin /usr/bin/dosemu.bin
-rm -f /var/lib /var/lib/dosemu /var/lib/dosemu/drives \
-    /var/lib/dosemu/drives/dosboot.img >/dev/null 2>&1
-mkdir -p /var/lib/dosemu/drives
-cp /z/linuxaux/var/lib/dosemu/drives/dosboot.img /var/lib/dosemu/drives/.
-
 # install.pl relies on these environment variables
 # (see also LEGACY_BIOS_HEAD and LEGACY_BIOS_SECT above)
 export Z_PATH Z_USER Z_PASS
@@ -391,13 +383,70 @@
     die "No active partition found!"
 fi
 
-cp /etc/dosemu/dosemu.conf /tmp
-echo \$_hdimage = \"/dev/dsk$active_part\" >> /tmp/dosemu.conf
+#load functions so we can parse /c/netinst/unattend.txt:
+[ -f /usr/lib/unatt-functions.sh ] || die "/usr/lib/unatt-functions.sh not found" 
+. /usr/lib/unatt-functions.sh
+
+ntinstall_cmd=`parse_ini_file /c/netinst/unattend.txt _meta ntinstall_cmd`
+
+if [ -z "$ntinstall_cmd" ]
+then  
+    #Run the orginal dosemu:
+
+    # FIXME: Bad hack to work around dosemu bug running over network
+    rm /usr/bin/dosemu.bin
+    cp /z/linuxaux/usr/bin/dosemu.bin /usr/bin/dosemu.bin
+    rm -f /var/lib /var/lib/dosemu /var/lib/dosemu/drives \
+       /var/lib/dosemu/drives/dosboot.img >/dev/null 2>&1
+    mkdir -p /var/lib/dosemu/drives
+    cp /z/linuxaux/var/lib/dosemu/drives/dosboot.img /var/lib/dosemu/drives/.
+
+    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
+
+    #lets see if we should fix partition geometry - to avoid 'ntldr not found'
+    fix_disk_geo_heads=`parse_ini_file /c/netinst/unattend.txt _meta fix_disk_geo_heads`
+    fix_disk_geo_sectors=`parse_ini_file /c/netinst/unattend.txt _meta fix_disk_geo_sectors`
+    if [ -n "$fix_disk_geo_heads" ] && [ -n "$fix_disk_geo_heads" ] ; then
+        echo "fixing disk geometry .."
+        echo -e -n "\x`printf "%02X" $fix_disk_geo_heads`"|dd of=/dev/dsk$active_part bs=1 seek=26 conv=notrunc
+        echo -e -n "\x`printf "%02X" $fix_disk_geo_sectors`"|dd of=/dev/dsk$active_part bs=1 seek=24 conv=notrunc
+        echo "..done"
+    fi
+
+    echo "mount /c, we might still do some adjustments. It better be mountable now."
+    mount -t vfat /dev/dsk$active_part /c || die "Could not mount /c"
+
+    if [ -n "$fix_disk_geo_heads" ] && [ -n "$fix_disk_geo_heads" ] ; then
+        # We also need to fix disk geometry in bootsect.dat
+        bootsectfile="/c/\$win_nt\$.~bt/bootsect.dat"
+        [ -f "$bootsectfile" ] || die "$bootsectfile not found"
+        echo "fixing disk geometry in $bootsectfile .."
+        echo -e -n "\x`printf "%02X" $fix_disk_geo_heads`"|dd of=$bootsectfile bs=1 seek=26 conv=notrunc
+	echo -e -n "\x`printf "%02X" $fix_disk_geo_sectors`"|dd of=$bootsectfile bs=1 seek=24 conv=notrunc
+        echo "..done"
+    fi
+else
+    echo -e "* Running ntinstall_cmd: $ntinstall_cmd"
+    $ntinstall_cmd || die "* $ntinstall_cmd exited non-zero"
+fi
+
+# Installation is now complete, /c is mounted, some adjustments (if any) follows..
 
-# DOSEMU always exits non-zero.  FIXME.
-dosemu.bin -f /tmp/dosemu.conf
+post_ntinstall_cmd=`parse_ini_file /c/netinst/unattend.txt _meta post_ntinstall_cmd`
+if [ -n "$post_ntinstall_cmd" ] ; then
+    echo -e "* Running post_ntinstall_cmd: $post_ntinstall_cmd"
+    $post_ntinstall_cmd || die "* $post_ntinstall_cmd exited non-zero"
+fi
 
 sync
+umount /c
+
+echo "all done!"
+
 reboot
 
 exec bash
--- unattended-cvs/install/dosbin/install.pl	2008-03-17 17:12:55.000000000 +0100
+++ unattended/install/dosbin/install.pl	2008-03-17 21:00:43.000000000 +0100
@@ -998,8 +998,20 @@
 
 $u->{'_meta'}->{'fdisk_confirm'} = 1;
 
+$u->comments ('_meta', 'ntinstall_cmd') =
+    ['System command to run in place of winnt under dosemu? (linuxboot only)'];
+$u->{'_meta'}->{'ntinstall_cmd'} =
+    sub {
+        return (yes_no_choice ('Use nt5x-install script - (DOSEMU alternative)')
+                ? 'nt5x-install'
+                : undef);
+    };
+
 $u->{'_meta'}->{'format_cmd'} =
     sub {
+        if (defined $u->{'_meta'}->{'ntinstall_cmd'}) {
+            return undef;
+        }
         return (yes_no_choice ('Format C: drive')
                 ? 'format /y /z:seriously /q /u /a /v: c:'
                 : undef);
@@ -1499,10 +1511,22 @@
             close SETTINGS
                 or die "Unable to close $settings_file: $^E";
             print "done.\n";
+            # Disk geometry is now fixed, no need to hack disk geo into the partition:
+            $u->{'_meta'}->{'fix_disk_geo_heads'} = "";
+            $u->{'_meta'}->{'fix_disk_geo_sectors'} = "";
         }
         else {
             # Non-IDE disk.  Should probably sanity-check kernel
             # geometry against legacy BIOS geometry here.  FIXME.
+            # Send partition geometry via unatted.txt so we can
+            # hack it into partition after the dosemu run.
+            # FIXME Should we ask the user before we do this?
+            if (not defined $u->{'_meta'}->{'fix_disk_geo_heads'}) {
+                $u->{'_meta'}->{'fix_disk_geo_heads'} = $bios_head;
+            }
+            if (not defined $u->{'_meta'}->{'fix_disk_geo_sectors'}) {
+                $u->{'_meta'}->{'fix_disk_geo_sectors'} = $bios_sect;
+            }
         }
     }
 }
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
unattended-info mailing list
unattended-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to