Août 302013
 

A quick article around my adventures with the Arduino.

This time, lets play with infrared.

More precisely lets catch IR signals and send them back.

The IR sensor can be found here.
The IR emitter can be found here.

You can use 2 arduino or built it all on one arduino (if so, add a object.enableIRIn() after each send or you wont be able to receive after the 1st send).

Here below the wiring and a quick and dirty sketch for sending.

Now go and place with your remotes !

ir_receiver_sender_bb

 

Sketch to send signals with your IR emitter.

/*
* IR LED must be connected to Arduino PWM pin 3.
*/

#include 

IRsend irsend;

void setup()
{
Serial.begin(9600);
}

void send(int code)
{
for (int i = 0; i < 3; i++) {
irsend.sendNEC(code, 32); // code, length
delay(40);
}
}

void loop() {
send(0x11223344);
delay(5000);
}
Août 292013
 

Agenda

  • Prepare winpe (3 or 4) with QuickPE
  • Prepare the ipxe script
  • Prepare the PXE server with TinyPxe Server
  • Prepare the ISCSI target
  • Boot to winpe, prepare the drive, and Install windows
  • Reboot to your target !

Note that we have already covered installing win7 (or win8) directly to an ISCSI target : here.

However, there are times where yoy may not have a dvd drive or media available, or else, you may also want to perform some tasks before triggering the windows setup.

Prepare winpe (3 or 4) with QuickPE
You can either use MS WAIK (winpe3), or MS ADK (winpe4) or an existing windows setup DVD or ISO file.
Launch _run_me.cmd and make your choice.

quickpe_menu

Prepare the ipxe script
The following will attach an iscsi drive and will boot your winpe


#!ipxe
dhcp net0
set gateway 0.0.0.0
set keep-san 1
sanhook iscsi:192.168.1.248:tcp:3260:0:iqn.2000-01.com.synology:test
set boot-url http://${dhcp-server}
initrd ${boot-url}/images/winre.iso
kernel ${boot-url}/memdisk iso raw
boot

Prepare the PXE server with TinyPxe Server
Use ipxe-undionly.kpxe as « boot file name » and the above script (name it install.ipxe) as « filename if user-class=iPXE »

tinypxeserver

Prepare the ISCSI target
There you can either use starwind target free edition or any other target (many home nas device do have that feature also).
The target should be at least 8GB.

starwind_setup

Boot to Winpe, prepare the drive
Now lets network boot (pxe as first device in the bios).
Computer will pxe boot, load ipxe, then load your script.
The script will atatch your iscsi target and boot into winpe.
Note : you need one physical disk in your computer or else winpe might reboot in a loop. Also the windows setup will not go pass the disk selection if not physical disk is present.

Once in Winpe you should see your iscsi target listed as a physical drive : to check this, launch CloneDisk or diskpart.

Fist, lets create a disk, then lets create a (active) partition and finally lets format it : you can do all this with CloneDisk or diskpart.

clonedisk_iscsi
Then Lets also take care of the MBR and BS either with « bootsect.exe /nt60 c: /MBR » or with bootice or with CloneDisk.

Finally lets also create the bcd store with the following « bcdboot x:\windows /s c: ». C: is your iscsi disk, X: is your winpe disk.
Another alternative is to copy the bcd folder and the bootmgr file from your dvd to your target drive.
Then edit c:\boot\bcd with bootice or bcdedit and add a default win7 entry.

Now we are ready to perform the installation : map a drive thanks to PeNetwork (in the tinyshell launchbar) and either map a dvd shared over the network or an iso found in a network share.
Note : CloneDisk can also mount a virtual dvd driver from an iso file (only in winpe4).

Launch the windows setup and let it run : you should find your iscsi drive there.

screenshot.7

Boot to your ISCSI target via PXE
Here comes your second ipxe script, name it boot.ipxe and use it within Tiny PXE Server :
#!ipxe
dhcp net0
set gateway 0.0.0.0
set keep-san 1
sanboot iscsi:192.168.1.248:tcp:3260:0:iqn.2000-01.com.synology:test

Windows should the complete the installation, and reboot one last to your windows desktop.

 Posted by at 19 h 12 min
Août 172013
 

Here below the different steps to backup or clone a (physical or logical) disk (hosting any operating system) using WinPE and CloneDisk.

1.Getting tools
First, lets get the needed files and prepare our working folder :
QuickPE and unzip it to x:\quickpe.
CloneDisk and unzip it to x:\quickpe\extra

2.Preparing
Now, lets prepare our WinPE iso
Generate your WinPE iso using any of the option that suit you best : use WAIK or ADK or your sytem WinRE or a DVD or an ISO …

3.Booting
At this point, you have an iso file in x:\quickpe\x86 named winxx.iso.
you can either burn it to cd/dvd (easiest path),
« burn » to a usb stick with rufus
or (more complex) boot it thru pxe (using these guides).

4.Networking
This step is needed only if you intend to backup your drive to an image file over a network drive.
Once booted, ensure you have a correct network setup using PeNetwork : click on the info button.
Provided, you have a network connectivity, then map a network drive, still using PeNetwork.

clonedisk_winpe1

clonedisk_winpe2

5.Backuping
Now, launch clonedisk from x:\extra folder, choose your source drive and either back it up to your network drive or clone your source drive to a new target drive.

clonedisk_winpe3

clonedisk_winpe4

clonedisk_winpe5

 Posted by at 14 h 45 min  Tagged with:
Août 132013
 

needed :
tiny pxe server
Partition Wizard

put pwhe8.iso in x:\pxe\iso

use the below ipxe script :

#!ipxe
set boot-url http://${dhcp-server}
initrd ${boot-url}/iso/pwhe8.iso
kernel ${boot-url}/memdisk iso
boot

name it pwhe8.ipxe and put it in x:\pxe

put ipxe-undionly.kpxe in x:\pxe

launch tiny pxe server with the following settings (leave other settings untouched) :
tick « httpd »
boot filename = ipxe-undionly.kpxe (use the browse files and folders « … » button)
tick « filename if user-class=gPXE or iPXE » = http://${dhcp-server}/pwhe8.ipxe.ipxe
push the online button

pxe boot your computer and here we go

homepw

 Posted by at 19 h 26 min
Août 132013
 

needed :
tiny pxe server
Clonezilla

open clonezilla.iso in winrar (or any other iso reading capable tool).
extract live folder to x:\pxe\iso\clonezilla

use the below ipxe script :

#!ipxe
set boot-url http://${dhcp-server}
kernel ${boot-url}/ISO/clonezilla/live/vmlinuz boot=live config noswap nolocales edd=on nomodeset vga=788 nosplash noprompt fetch=http://${dhcp-server}/ISO/clonezilla/live/filesystem.squashfs
initrd ${boot-url}/ISO/clonezilla/live/initrd.img
boot

name it clonezilla.ipxe and put it in x:\pxe

put ipxe-undionly.kpxe in x:\pxe

launch tiny pxe server with the following settings (leave other settings untouched) :
tick « httpd »
boot filename = ipxe-undionly.kpxe (use the browse files and folders « … » button)
tick « filename if user-class=gPXE or iPXE » = http://${dhcp-server}/clonezilla.ipxe
push the online button

pxe boot your computer and here we go

clonezilla

 Posted by at 19 h 20 min
Août 132013
 

needed :
tiny pxe server
winnfsd
redo backup recovery

open redobackup.iso in winrar (or any other iso reading capable tool).
extract casper folder to x:\pxe\iso\redobackup (or any path that suit you)

launch winnfsd with the following :
winnfsd.exe -id 0 0 x:\pxe\iso\redobackup
note : adapt the above path with your own path

use the below ipxe script :

#!ipxe
set boot-url http://${dhcp-server}
kernel ${boot-url}/iso/redobackup/casper/vmlinuz boot=casper netboot=nfs nfsroot=${dhcp-server}:/x/pxe/ISO/redobackup
initrd ${boot-url}/iso/redobackup/casper/initrd.lz
boot

note : adapt /x/pxe/ISO/redobackup to your own path.
name it redo.ipxe and put it in x:\pxe

put ipxe-undionly.kpxe in x:\pxe

launch tiny pxe server with the following settings (leave other settings untouched) :
tick « httpd »
boot filename = ipxe-undionly.kpxe (use the browse files and folders « … » button)
tick « filename if user-class=gPXE or iPXE » = http://${dhcp-server}/redo.ipxe
push the online button

pxe boot your computer and here we go

Redo-Backup-Recovery

 Posted by at 15 h 02 min