Hardware and software setup

How to install windows 7 over LAN. Installing Windows over a network without Windows AIK

The other day I needed to install Windows 7 on a netbook. There was no usb drive, no flash drive of a decent size at hand - so I decided to install it over the network. Googling in search of a ready-made solution and not finding it, I decided to try to do it similarly to Windows Vista, all the same, the systems are very similar.
So what do we need:

1. Distribution kit with Windows 7 of the edition you need
2. Windows® Automated Installation Kit (AIK) for Windows® 7
3.DHCP and T FTP server s. Using tftpd32

4. Computer with installed:

Windows Server 2003 with Service Pack 2
Windows Vista Service Pack 1 (SP1)
Windows Server 2008 family
Windows 7 family
Windows Server 2008 R2 family
Program type Daemon Tools Lite
5. Straight arms and 20 minutes of time. Go!!!


First, install " Kit automatic installation Windows® (AIK) for Windows® 7", for this you will have to mount the installation image into a virtual drive (DaemonTools, Alcohol, UltraIso, Nero ...) or unpack it into a separate folder and run StartCD.exe from there
In the disk autorun menu, select Installing the Windows AIK- Next...-Next-Done.

Now in the start menu we are looking for Microsoft Windows AIK and run from there Command line deployment tools. Now the fun begins :)

Creating a Windows PE Image

In the open console, enter the commands
copype.cmd x86 d:\winpe
imagex /mountrw winpe.wim 1 mount .
Now in the d:\winpe\mount directory we have a mounted winpe.wim image.

While the current Windows PE image is loading, a command prompt will appear on the screen. In order not to connect network drive and not to run the setup program manually, it is necessary in the directory d:\winpe\mount\windows\system32 edit the file startnet.cmd , bringing it to the following form.

wpeinit net use y:\\192.168.1.1\seven /user:install install if exist y:\sources\setup.exe (y: cd \sources setup.exe)
Please note that the drive y is connected with the rights of the install user with the password of the same name. Therefore, it is important to create on the machine that will act as the install user's server. For example, you can do this with the command:
net user install install /add /passwordchg:no

If you have an exotic network card - read the SUPPLEMENT at the end of the article.

After all the work with the image is finished, you need to unmount it. You can do this with the command:
imagex.exe /unmount /commit mount
Now the image is ready.

Create directories for downloading over the network

Create a root directory for download, for example D:\Seven\. We create a directory in it boot- in which boot files will be stored. Now copy the directory sources from DVD Windows disk 7 to folder seven. Also in the directory sources you can drop the file autounattend.xmlwith settings for automatic installation, but it will work without it.

Now let's fill the directory boot.
Again we mount the winpe.wim image in order to copy the files necessary for booting over the network. You can do this with the command
imagex /mount d:\winpe\winpe.wim 1 d:\winpe\mount .
Commands
xcopy /ey d:\winpe\mount\windows\boot\pxe d:\seven
xcopy /iy d:\winpe\mount\windows\boot\fonts d:\seven\boot\fonts
copy /y d:\winpe\ISO\boot\boot.sdi d:\seven\boot
copy the necessary files to the d:\seven directory for booting over the network.
After all the work is finished, you need to unmount the used image with the command:
imagex.exe /unmount d:\winpe\mount
The WinPE image used must also be copied to the directory d:\seven\boot command:
copy /y d:\winpe\winpe.wim d:\seven\boot
Also need to do general access(share) to the D:\Seven folder for all users or specifically for the install user.

Now let's create a file BCD– boot configuration data (storage of boot parameters)
For this we need a script d:\winpe\createbcd.cmdwith content like this:

FOR RUSSIAN DISTRIBUTION

bcdedit -createstore %1\BCD
bcdedit -store %1\BCD -create (ramdiskoptions) /d "Ramdisk options"
bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdidevice boot
bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdipath \boot\boot.sdi
for /F "tokens=2" %%i in ("bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader") do set guid=%%i
bcdedit -store %1\BCD -set %guid% systemroot \Windows
bcdedit -store %1\BCD -set %guid% detecthal Yes
bcdedit -store %1\BCD -set %guid% winpe Yes
bcdedit -store %1\BCD -set %guid% osdevice ramdisk=\Boot\winpe.wim,(ramdiskoptions)
bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions)
bcdedit -store %1\BCD -create (bootmgr) /d " Windows Vista boot manager"
bcdedit -store %1\BCD -set (bootmgr) timeout 30
bcdedit -store %1\BCD -set (bootmgr) displayorder %guid%

FOR ENGLISH DISTRIBUTION

bcdedit -createstore %1\BCD bcdedit -store %1\BCD -create (ramdiskoptions) /d "Ramdisk options" bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdidevice boot bcdedit -store %1\BCD -set (ramdiskoptions) ) ramdisksdipath \boot\boot.sdi for /F "tokens=3" %%i in ("bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader") do set guid=%%i bcdedit -store %1\BCD -set %guid% systemroot \Windows bcdedit -store %1\BCD -set %guid% detecthal Yes bcdedit -store %1\BCD -set %guid% winpe Yes bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions) bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions) bcdedit -store %1\BCD -create (bootmgr) /d "Windows VISTA BootManager" bcdedit -store %1\BCD -set (bootmgr) timeout 30 bcdedit -store %1\BCD -set (bootmgr) displayorder %guid%
Now in our console we execute the command:
createbcd.cmd d:\seven\boot

Setting up the TFTPD32 program

We launch tftpd32.exe, go to the DHCP tab and set everything as in the screenshot

Now click Settings, set as in the screenshot, restart the server.

EVERYTHING IS READY!


Now you need to connect the patient to this server over the network and enable boot from network card. After that, an IP address will be obtained via DHCP and pxeboot.n12 will be executed - which will start WinPE from the winpe.wim file. Immediately after loading WinPE, the Seven directory will be automatically mounted and the installation will start from it. Further installation proceeds in the same way as with the DVD.

ADDITION
If you have an exotic network card whose drivers are not included in the Windows Seven distribution, you can add them yourself at the stage of creating the WinPE image. To do this, we take *.cat , *.inf , *.sys files from the driver and copy them to the d:\landrv directory.
Now you can start installing these drivers into the mounted image, in the mount directory. You can do this with the command:
peimg.exe /inf=d:\landrv\ (DRIVERNAME) mount\windows
Where instead of (DRIVERNAME) is the name of your *.inf file

I got most of the information on the site http://unattendedxp.com. Checked and tested personally.

Not so long ago, I ran into a situation that, in principle, does not cause any special problems for system administrators. There was a need to update the OS on numerous computers of the organization, which in turn nevertheless caused a number of some problems, the solutions of which had to be collected in parts, as well as finish most of the whole process myself, which I actually want to tell you about.

These problems were the limitations in the availability of one DVD-ROM drive, one day of free time, as well as about twenty computers on which it was necessary to install Windows 7 with the entire set required drivers, programs etc.
When searching for information on Google this issue there was nothing that would work without jambs or work at all. But let's start in order.

Preparing an operating system image

For ease of preparation of the combat OS, Oracle VirtualBox was taken as the basis latest version, as well as Windows 7 x64 Professional. The first thing to do is install and configure Windows 7 on a virtual machine. To do this, in the process of adding a VM, we create two virtual hard disks. One for installing and configuring Windows 7 on it, the second for subsequently saving the image of the configured system on it. You also need to install the Virtualbox Guest Addition - Virtual machine Additions and create a shared folder for further copying the created image to a physical machine.
After installing all the stuffing on the VM, we proceed to the stage of system preparation using the utility sysprep, located in the system root of our VM: %windir%\system32\sysprep\sysprep.exe
To prepare the system for creating a customized image, you need to set the utility parameters:
  1. Go to the system welcome window (OOBE) - this mode will be activated the next time the system starts. Starts the computer in welcome screen mode.
  2. Check the box "Preparing for use" - prepares the installation of Windows before creating the image. The security identifier (SID) is reset, system restore points are reset, and event logs are deleted.
  3. Shutdown options "Shutdown" - when the utility is finished, the system will shut down.
You should not start the OS before saving the system image, because the next time you start the computer, a specialized configuration step begins to work. A new security identifier (SID) is generated and the Windows activation clock is reset.

The utility also removes installed drivers. To save them, you need to sysprep from the command line with the parameter: /unattend: specify the path to the answer file In the answer file, you must specify the PersistAllDeviceInstalls parameter (starting with Windows 8 there is also the DoNotCleanUpNonPresentDevices parameter):
true After cleaning is completed, the system will automatically turn off. Let's move on to the next step.

Installing and configuring Windows AIK + PE

Download and install the Windows Automated Installation Kit (AIK) for Windows 7. After launching setup.exe, select the item "Install Windows AIK". There should not be any particular problems during installation.
Creating and configuring a Windows PE image
Windows PE- the pre-installation environment used to prepare for the installation of the OC. With Windows PE we will capture the system volume into a wim image using the utility imagex and them save it to another partition hard drive.
In this case, we are considering creating a disk with a 64-bit Windows version PE. If you are creating a disk with a 32-bit version of Windows PE, you will need to change the architecture (amd64 to x86) in all commands.

From the Start menu, run All Programs > Microsoft Windows AIK > Deployment Tools Command Prompt- all subsequent commands will be entered into this command line window. Requires running as administrator.
Copying the Windows PE Image Files
copype.cmd amd64 d:\winpe_image
To change the copied Windows PE image, you must connect it with the command
dism /Mount-Wim /WimFile:d:\winpe_image\winpe.wim /index:1 /MountDir:d:\winpe_image\mount
Now that we have included the image, we can install packages into it and add our own files.
Let's add a utility to our image imagex.
xcopy "%ProgramFiles%\Windows AIK\Tools\amd64\imagex.exe" d:\winpe_image\iso\
Also, if desired, you can immediately prepare a list of exclusions - files and folders that will not be included in the saved image. Create in any text editor file Wimscript.ini and specify in it the files and folders that you want to exclude from the image. The Wimscript.ini file is located in the same folder as imegex.
Default imagex uses the following exceptions:
\$ntfs.log \hiberfil.sys \pagefile.sys "\System Volume Information" \RECYCLER \Windows\CSC *.mp3 *.zip *.cab \WINDOWS\inf\*.pnf
Now you need to save the image with the command:
dism /unmount-Wim /MountDir:d:\winpe_image\mount /Commit
All preparatory work was carried out with the winpe.wim file, and for boot disk Windows PE uses the boot.wim file located in the winpe_x86\ISO\sources folder. Therefore, you need to replace the boot.wim file with the winpe.wim file and rename it.
xcopy /y d:\winpe_image\winpe.wim d:\winpe_image\ISO\sources\boot.wim
To create an image, run the command:
oscdimg -n -bd:\winpe_image\etfsboot.com d:\winpe_image\ISO d:\winpe_image\winpe_image.iso

Create an image of Windows 7
It is necessary to save the image of our OS using the utility imagex. We boot into the VM from the winpe_image.iso image that we created earlier. After good download a command line window opens in front of us, in which we will just work.
Capturing and saving an image is done with one command
F:\imagex.exe /capture E: D:\install.wim "Windows 7 x64" /compress maximum
/captureE:- section E capture:
D:\install.wim- the location and name of the saved WIM file.
Windows 7 x64- image name. The name must be enclosed in quotation marks.
/compress maximum- type of file compression in the image (optional). For parameter /compress valid values maximum(maximum compression), fast(fast compression) and none(without compression). If the parameter is not specified, fast compression is used. Maximum Compression allows you to reduce the size of the image, but capture takes longer than fast compression. The speed of decompressing an image is practically independent of the type of compression. It remains to wait 20-30 minutes and the image will be ready.

After saving the image on the second disk virtual machine, for further work it needs to be transferred to a physical OS. We start the virtual machine again and complete the Windows installation that was interrupted at the OOBE stage. If you have already installed Virtual Machine Additions, now you need to copy the file from the virtual machine to the physical one using shared folder(shared folder), which can be specified in the virtual machine settings.

Customizing the Windows 7 Boot Image
At this stage, we launch the Deployment Tools Command Prompt again and copy the Windows PE image files:
copype.cmd amd64 d:\winpe
Mounting the image
imagex /mountrw winpe.wim 1 mount Windows PE is mounted and in the d:\winpe folder you can find the winpe.wim file.
Configuring Windows Setup Autorun.
To avoid manually creating virtual disk and not to start the installation manually, you can edit the file startnet.cmd and startnet2.cmd. They are located d:\winpe\mount\windows\system32.

Startnet.cmd
wpeinit %windir%\system32\startnet2.cmd
startnet2.cmd
chcp 1251 netsh interface ip set address name="Connect via local network"source=dhcp chcp 866 pause net use z: \\192.168.0.1\win7 /user:install install cd /d Z:\sources setup.exe
The net use command connects to a computer with an IP address of 192.168.0.1 (our server computer) to a shared directory named win7 as the install user with the same password.
You can create the user we need with this command in cmd
net user install install /add /passwordchg:no
We execute the following instructions:

  • On the server computer, we create a root directory for booting (I have it d: \ win7 \), and in it the boot folder.
  • We share the win7 folder, that is, we give public access to it to all users.
  • Copy the entire sources folder from installation disk Windows 7 in d:\win7.
  • We replace the install.wim file in the d:\win7\sources directory with the file that we copied earlier from the virtual machine ( finished image Windows 7)
Now you need to copy additional files to install Windows 7.
Mount the WinPE image:
imagex /mountrw winpe.wim 1 mount
Copy:
xcopy d:\winpe\mount\windows\boot\pxe\pxeboot.n12 d:\win7 xcopy d:\winpe\mount\windows\boot\pxe\bootmgr.exe d:\win7 xcopy d:\winpe\winpe. wim d:\win7\boot xcopy d:\winpe\iso\boot\boot.sdi d:\win7\boot
Unmount the image with the command:
imagex.exe /unmount d:\winpe\mount

Next, you need to create a BCD (boot configuration data) file in the d:\win7\boot directory. To simplify this process, we will use the createbcd.cmd file. Create a file d:\winpe\createbcd.cmd and enter into it:
bcdedit -createstore %1\BCD bcdedit -store %1\BCD -create (ramdiskoptions) /d "Ramdisk options" bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdidevice boot bcdedit -store %1\BCD -set (ramdiskoptions) ) ramdisksdipath \boot\boot.sdi for /F "tokens=2 delims=()" %%i in ("bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader") do set guid =(%%i) bcdedit -store %1\BCD -set %guid% systemroot \Windows bcdedit -store %1\BCD -set %guid% detecthal Yes bcdedit -store %1\BCD -set %guid% winpe Yes bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions) bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions) bcdedit -store %1\BCD -create (bootmgr) /d "Windows BootManager" bcdedit -store %1\BCD -set (bootmgr) timeout 30 bcdedit -store %1\BCD -set (bootmgr) displayorder %guid%
Run the command with administrator rights:
createbcd.cmd d:\win7\boot
If you have problems with drivers, you can also add them in the "Deployment Tools Command Line":
Mounting an Image to Add Drivers
dism /mount-wim /wimfile:winpe.wim /index:1 /mountdir:mount
To integrate drivers into an already mounted image, use the command
dism /image:mount /add-driver /driver:<каталог с драйверами либо файл с расширением inf>
After all work with the image is completed, it must be unmounted
dism /unmount-wim /mountdir:mount /commit

Setting up a TFTP and DHCP server

To create these servers, you need to download the TFTPD32 program.
task DHCP server a is to provide information remote computer about the free IP address, netmask, as well as the name of the downloaded file and the address of the TFTP server where this file is located. The task of the TFTP server is to ensure the transfer of files necessary for downloading to a remote computer.

We launch the program and first select the d: \ win7 folder, and a little lower - the IP of the network card. In my case, the computer has an IP of 192.168.0.1.
We go into the settings (the Settings button in the middle at the bottom) and gradually fill in the tabs:

  • GLOBAL tab - tick only opposite TFTP Server, DHCP Server and Enable IPv6.
  • TFTP tab - select the folder d:\win7.
  • TFTP Security Standard.
  • TFTP configuration - leave as is.
  • Advanced TFTP Options - there should be ticks next to: Option negotiation, Show Process bar and Translate Unix file names.
  • DHCP Tab
  • IP pool starting address specifies from which IP address to start issuing addresses. In my example, the issuance of IP addresses will start from 192.168.0.2.
  • Size of pool specifies the number of IP addresses that will be dynamically allocated. I set the value to 30.
  • Boot File tells the remote computer the name of the file to use as the bootloader. Set the value in pxeboot.n12.
  • Mask, specifies the network mask. In our case, this is 255.255.255.0. The rest of the parameter values ​​are left as default.
  • Ping address before assignment - uncheck (if you have a computer-to-computer connection without switches and routers).
Now you need to include BIOS boot from the network card and boot from it. After that, an IP address will be obtained via DHCP and pxeboot.n12 will be executed - which will start Windows PE from the winpe.wim file. Right after Windows boot PE will automatically mount the win7 directory and start the installation from there. Further installation proceeds exactly as well as from a disk.

Tags:

Add tags

In this article, we want to highlight the installation initialization process operating system Windows 7 over LAN.

It is likely that you have often come across a situation where you need to install an operating system on your computer, but there is no DVD drive on the computer, and there is no USB drive at hand. It was then that the thought comes to mind: it is not in vain that in the “bios” there is the possibility of booting from a network card.

So, all we need for the installation procedure:

1. Computer with Windows 7/Windows Vista/Server 2003 or 2008 already installed
2. Network cable(patch cord) - usually they simply forget about this little thing
3. Windows® Automated Installation Kit (AIK) for Windows® 7
4. DHCP and TFTP server emulator, such as tftpd32
5. Distribution with Windows 7, any edition
6. A program that allows you to work with iso disk images, such as Daemon Tools

And now let's start the process of preparing for installation:

Step 1. You need to download the Windows® Automated Installation Kit (AIK) for Windows® 7 from here (OS authentication is not required), then mount its iso image into a virtual drive and start the installation process (StartCD.exe).

Step 2 In the main menu "Start" we find Microsoft Windows AIK and run "Command Prompt Deployment Tools" - the console will open

Step 3 In the deployment tools console, enter the following commands (disk X is any disk on your computer):

1) copype.cmd x86 x:\winpe
2) imagex /mountrw winpe.wim 1 mount

Now in the catalog x:\winpe\mount the mounted image winpe.wim is located.

Step 4 Further, to get rid of the need to manually connect a network drive and initialize the launch of the executable application, you need to correct the batch file startnet.cmd located in the directory x:\winpe\mount\windows\system32. The file structure should be like this:

wpeinit
net use y: \\192.168.1.1\seven /user:install install
if exist y:\sources\setup.exe (
y:
cd\sources
setup.exe
)

In this case, it is assumed that the IP address of the computer from which files will be downloaded over the network is 192.168.1.1, if it differs from the example, then enter your specific address. Connection to the computer from the side of the second PC, on which the installation is being performed, will take place as the install user with the install password, so you need to create such a user in advance, for example, using the command:

net user install install /add /passwordchg:no

Step 5 Now you need to unmount the created image. Run the following command in the console:

imagex.exe /unmount /commit mount

Step 6 We create a folder on the computer from which the distribution files will be downloaded over the network in the future, for example x:\upload, in it we create another directory - boot (x:\upload\boot), it will contain boot files.

Step 7 Copy to folder x:\upload catalog sources from an existing Windows 7 distribution.

Step 8 In the console, we execute several commands with which we fill the boot directory and make it possible to download files over the network:

1) imagex.exe /mount x:\winpe\winpe.wim 1 x:\winpe\mount.
2) xcopy /ey x:\winpe\mount\windows\boot\pxe x:\upload
3) xcopy /iy x:\winpe\mount\windows\boot\fonts x:\upload\boot\fonts
4) copy /y x:\winpe\ISO\boot\boot.sdi x:\upload\boot
5) imagex.exe /unmount d:\winpe\mount

Step 8 Copy the newly created winpe.wim image to the folder x:\upload\boot, for example using the command:

copy /y d:\winpe\winpe.wim d:\seven\boot

Step 9 Sharing a folder x:\upload for ALL users

Step 10 We create a storage of boot parameters (Boot Configuration Data), for which we use a special script createbcd.cmd, which must be created in the directory x:\winpe\. Content this script differs depending on the language of the installed operating system, in the general case it should be like this:

FOR RUSSIAN DISTRIBUTION

bcdedit -createstore %1\BCD


for /F "tokens=2" %%i in ("bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader") do set guid=%%i





Windows VISTA BootManager"

FOR ENGLISH DISTRIBUTION:

bcdedit -createstore %1\BCD
bcdedit -store %1\BCD -create (ramdiskoptions) /d "Ramdisk options"
bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdidevice boot
bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdipath \boot\boot.sdi
for /F "tokens=3" %%i in ("bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader") do set guid=%%i
bcdedit -store %1\BCD -set %guid% systemroot \Windows
bcdedit -store %1\BCD -set %guid% detecthal Yes
bcdedit -store %1\BCD -set %guid% winpe Yes
bcdedit -store %1\BCD -set %guid% osdevice ramdisk=\Boot\winpe.wim,(ramdiskoptions)
bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions)
bcdedit -store %1\BCD -create (bootmgr) /d "Windows VISTA BootManager"
bcdedit -store %1\BCD -set (bootmgr) timeout 30
bcdedit -store %1\BCD -set (bootmgr) displayorder %guid%

Step 11 You need to run the following command:

createbcd.cmd x:\upload\boot

Step 12 We configure the tftpd32 utility exactly as shown in the figures:




Now our system is ready to "help" the second computer get a brand new OS

I recently bought myself new system. Considering that \"I won't need it\", I didn't buy any types and varieties of disk drives. This is where the epic began, called\"Installing Windows over the network \". Like any person
who had never done anything like this - I immediately went to the Internet with a very unambiguous question. Google gave me a mountain of solutions (mostly the same) related to Windows AIK and creating WinPE image. This way
did not help me - the connection was not very stable (maybe some other problems) and, therefore, the bootloader could not digest it.

I, with your permission, will describe a way to install Windows WITHOUT Windows usage AIK and WinPE.

1. What do you need?
You will need some software that can be downloaded from the Internet.
Parted Magic 5.10 - Live Linux distribution, which allows you to do a lot with disks and generally restore the "fallen" system in every possible way. You need to download the PXE version (for those who don't know what it is, read below).

Syslinux is a set of Linux kernel loaders. From it, we also need only a PXE bootloader.

TFTP32 is a program that is complete solution to download over the network. DHCP and TFTP server included.

HFS - small (600 kb) web server

2. Preparation and theory
In order to boot the computer over the network, you must make the appropriate changes to the BIOS. In this case, the PXE code (Preboot Execution Environment) is loaded from the ROM of the network card,
which looks for a DHCP server, receives an IP address from it, looks for a TFTP (Trivial FTP) server and downloads a bootloader from it. This program cannot be larger than 32 KB, so you have to use a ring download - the first ring loads
next and so on. PXELINUX from the SYSLINUX package is perfect for this role, it takes only 27 kilobytes and is capable of displaying menus in text or graphic mode.

3. Getting Started
We only need a few files from the syslinux archive: ../core/pxelinux.0, ../com32/menu/menu.c32
We put them somewhere where it will be convenient for them to lie, next we put the pmagic folder from the partedmagic-pxe archive. Now in this secluded place we create a folder (!) pxelinux.cfg, where our configuration file will be located.
Its content is something like this:

UI menu.c32
LABEL pmagic
linux pmagic/bzImage
APPEND initrd=pmagic/initramfs edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 loglevel=0 max_loop=256

The config is named default without extension.
If you want to write your own config, then I recommend reading the wiki on the Syslinux "a website, where it is correctly explained in English how this can be done.
Our (above) config requires us to put the parted magic kernel files in the pmagic folder, so put them there (they should already be there), so that there would be no panic during the boot process.

We proceed to the TFtp32 configuration step. First, set up network adapter your installation computer (from which we will download and install) to some class C static IP address, for example, 192.168.56.1
We start tftp32 and select our adapter, as shown in fig. one

Click on the settings button, on the TFTP tab, select the folder in which our files are located, it will be the \"installation root\", and also configure other parameters. (Fig.2)

On the DHCP tab, you need to enter the address from which our server will start distributing addresses, as well as their maximum number. Well, the most important thing boot file for PXE. (Fig. 3)

That's it, we don't need anything else - let's move on to the next step, namely loading our new system.


Install in BIOS priority to download from the network. First, the PXE firmware of your network card will try to find DHCP on the network and when it succeeds, our bootloader will load. (Fig. 4)

In the menu of our bootloader, there is only one item described by us in the config, and we select it. There is a transfer of kernel files to our computer, all this is loaded into RAM and we see the desktop of our
distribution. In the end, we get random access memory complete OS. (Fig. 5)

5. System installation
The most interesting stage begins. Its essence, in fact, is as follows: we need to break HDD and format it to the system we need, for Win 7
it's NTFS. Then through the web server we will copy to disk setup files, or an image of our Windows or any other system. We write to the first section of our hard drive
MBR, make the disk bootable and reboot ..

We go to Partition program Editor on the desktop. We do all our\"dirty\" deeds and move on. (Fig. 6)

We put HFS on our installation machine, setting it up is so simple that it doesn't even need screenshots. I will show the process of copying
for the image, since it is more difficult, and in fact the files already unpacked from the image are what we will eventually have to get from the image.
Upload the image file to our server, log in from our system to firefox browser and enter the IP address of our server.
We mount one of the partitions of our hard drive through the program on the Mount Devices desktop. Download the image file to our machine. (Fig. 7)

Now we need to mount our image to file system and copy the installation files. We go to the terminal and enter the following commands:

Mkdir -p /mnt/iso
mount -o loop /media/sda1/win7.iso /mnt/iso
cp -r /mnt/iso/* /media/sda1

Attention, instead of win7.iso there should be your image, and instead of sda1, your partition. When everything is copied, you can delete the image file. (Fig. 8)

The following command will add to our MBR disk:
ms-sys -w /dev/sda

Now once again we go to the Partition Editor and set the \"Boot \" (boot) flag on our disk. Reboot and install Windows!

PXE (English Preboot eXecution Environment, pronounced pixie)- an environment for booting computers using a network card without using hard drives, CDs, and other devices used to boot the operating system. PXE uses IP, UDP, BOOTP, and TFTP to boot the system.

The PXE code, usually located in the ROM of the network card, is received from the network via the TFTP protocol (having obtained the address of the TFTP server via BOOTP) executable file, after which it transfers control.

The PXE specification limits the size of the bootloader to 32 kilobytes, so sometimes a two-stage boot is used, when the first bootloader receives and starts the secondary one, which already receives and starts the operating system image.

Requirements

  • Another computer with windows7/windows 2008 on hand (for creating setup files)
  • The computer on which the OS will be installed must be physically accessible, or via IP-KVM
  • Its BIOS must be able to boot from PXE
  • There must be another computer with windows or linux in the same network segment with it

If there is a computer with windows OS in one network segment, you can do without manipulating the linux server, and use the TFTPD32 program.

Preparing files (on windows):

Install WAIK (Windows Automated Installation Kit) for Windows® 7 and Windows Server® 2008 R2.

As administrator:

Start -> All Programs -> Microsoft Windows AIK -> Deployment Tools Command Prompt

In the window that appears, do:
copype.cmd amd64 c:\winpe mkdir c:\netboot\win\boot imagex /mountrw winpe.wim 1 mount xcopy c:\winpe\winpe.wim c:\netboot\win\boot xcopy c:\winpe\mount\ windows\boot\pxe\pxeboot.n12 c:\netboot\win xcopy c:\winpe\mount\windows\boot\pxe\bootmgr.exe c:\netboot\win imagex.exe /unmount /commit mount xcopy c:\ winpe\iso\boot\boot.sdi c:\netboot\win\boot
Make a createbcd.cmd file with the following content:
bcdedit -createstore %1\BCD bcdedit -store %1\BCD -create (ramdiskoptions) /d "Ramdisk options" bcdedit -store %1\BCD -set (ramdiskoptions) ramdisksdidevice boot bcdedit -store %1\BCD -set (ramdiskoptions) ) ramdisksdipath \boot\boot.sdi for /F "tokens=2 delims=()" %%i in ("bcdedit -store %1\BCD -create /d "MyWinPE Boot Image" /application osloader") do set guid =(%%i) bcdedit -store %1\BCD -set %guid% systemroot \Windows bcdedit -store %1\BCD -set %guid% detecthal Yes bcdedit -store %1\BCD -set %guid% winpe Yes bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions) bcdedit -store %1\BCD -set %guid% device ramdisk=\Boot\winpe.wim,(ramdiskoptions) bcdedit -store %1\BCD -create (bootmgr) /d "Windows BootManager" bcdedit -store %1\BCD -set (bootmgr) timeout 30 bcdedit -store %1\BCD -set (bootmgr) displayorder %guid%
As administrator:
createbcd.cmd c:\netboot\win\boot
Copy the sources folder from the installation image/disk to the c:\netboot\win folder
Zip folder c:\netboot\win and upload to linux server.

Software preparation (on linux server):
aptitude install dhcp3-server tftpd-hpa samba dhcp3-server

Set up issuing an ip address and loading from the pxeboot.n12 file
/etc/dhcp3/dhcpd.conf
subnet 192.168.10.0 netmask 255.255.255.240
( # host ferrum ( # hardware ethernet 68:b5:99:b0:44:94; # fixed-address 192.168.10.100; # ) # or range 192.168.10.100 192.168.10.100; filename = "pxeboot.n12"; )
important: filename = "pxeboot.n12";
Run:
/etc/init.d/dhcp3-server restart
iptables -A INPUT -p udp -m udp --dport 67 -j ACCEPT
tftpd-hpa
Set up translation of slashes and capital letters:
/etc/default/tftpd-hpa # /etc/default/tftpd-hpa
TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="-m /etc/tftpd.remap --secure"
/etc/tftpd.remap rg \\ / rg A a rg B b rg C c rg D d rg E e rg F f rg G g rg H h rg I i rg J j rg K k rg L l rg M m rg N n rg O o rg P p rg Q q rg R r rg S s rg T t rg U u rg V v rg W w rg X x rg Y y rg Z z
Run:
/etc/init.d/tftpd-hpa restart iptables -A INPUT -s site -p udp -m udp --dport 67 -j ACCEPT samba
Tune:
/etc/samba/smb.conf comment=win read only=yes path=/var/lib/tftpboot valid users=gnu win
Run:
useradd win smbpasswd -a win (set password, e.g. "win") /etc/init..su -p tcp -m tcp --dport 445 -j ACCEPT iptables
Just in case, do it.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!