Mar 112014
 

There are times where you need to make a bootable disk image, to boot from pxe, or from a boot loader (grub4dos, ms bootmgr, etc).

Lets see how to make it quick and easy with CloneDisk :

1-Lets create and attach a virtual disk
2-Lets create a disk
3-Lets create a partition
4-Lets format it
5-Lets install grub4dos as bootloader
6-Lets copy/paste grldr and menu.lst

1-Lets create and attach a virtual disk
->ignore the parent field
->fill in the path field
->indicate the size (in MB)
->lets go for a fixed one (vs dynamic)

clonedisk_howto1

2-Lets create a disk (i.e initialise)

clonedisk_howto2

3-Lets create a partition
->CloneDisk will use the whole disk size and will make the partition active

clonedisk_howto3

4-Lets format it (FAT or FAT32, NTFS works too)

clonedisk_howto4

5-Lets install grub4dos as bootloader in the MBR

clonedisk_howto5

6-Do not close CloneDisk yet (or else your new virtual logical drive will away) and copy/paste grldr and menu.lst (in CloneDisk zip file)

clonedisk_howto6

You got yourself a bootable disk image, feel free to add your own content.
Even better, since we used a VHD format, you can later on expand this virtual disk.

In a next tutorial, we will see how to PXE boot this virtual disk.

 Posted by at 13 h 46 min
Mar 102014
 

For some time I needed a tool to create, attach, detach, etc MS Virtual Disk HardDrives (VHD) from the command line.
Sure I could do it using diskpart or MS VhdMount but I was always lacking this or that…

Therefore, based on CloneDisk source code, I took 5 mns to write vMount.
It uses MS native virtdisk API available with Windows 7 (x86/x64) and up

Command line arguments :

vmount createfixed path_to_vhd size(MB)
vmount createdynamic path_to_vhd size(MB)
vmount createchild path_to_child path_to_parent
vmount attach path_to_vhd [NOLETTER]
vmount attach path_to_iso
vmount detach \\.\PhysicalDriveX
vmount detach path_to_vhd
vmount expand path_to_vhd size(MB)
vmount compact path_to_vhd
vmount merge path_to_child
vmount disks [filter]
vmount partitions [filter]
vmount mount x: \device\harddiskX\partitionX
vmount umount letter
vmount online disk_id
vmount offline disk_id
vmount ro disk_id
vmount rw disk_id
vmount attributes disk_id

Regards,
Erwan

Download here

Discuss it here.
vmount

 Posted by at 21 h 45 min
Mar 092014
 

Today, something easy : lets use a SD Card Reader with our arduino.

Can be useful for instance when you want to log datas such as temperatures or any other sensor.

I use this component from DS : SD Card Slot Socket Reader.

First the wiring : standard SPI (SCK/MOSI/MISO/CS).

sd_bb

Then some arduino skeches taken from the Arduino examples (note that I use CS=10 with my arduino uno, adapt if needed) :

Retrieve basic infos from your SD card and list files
Read and Write to a file (test.txt)
Dump the content from a file (test.txt)

That was it : quick and easy !

 Posted by at 19 h 04 min
Mar 012014
 

The excellent Rufus software got updated to version 1.4.4.

  • Add uncompressed Disk Image support (FreeBSD, FreeNAS, etc.) (NEW)
  • Add right-to-left language support (NEW)
  • Add an alert when multiple partitions are about to be erased (NEW)
  • Add (unofficial) NTFS Compression support (NEW)
  • Add Finnish translation, courtesy of Riku Brander
  • Ignore failure on ISO autorun.inf creation, to keep dumb security applications happy
  • Improve hotplug detection
  • Improve Syslinux v5+ support (requires an internet connection to download extra files)
  • Fix support for latest gparted, ArchLinux, and other Syslinux v5+ based ISOs
  • Fix detection for Toshiba drives (again)
  • Fix UDF Unicode support
 Posted by at 15 h 49 min
Mar 012014
 

I got myself a cheap nokia 5110 lcd screen at dx.com.

Lets see how easy it is to use with an arduino.

First lets get an arduino library here. (put it in your arduino libraries folder).

Then lets have a look at the wiring :

nokia 5110_bb

And now the arduino code (rename txt to ino or pde) : nokia5110_v5

And last, an ugly pic (dont look at soldering points…) :

nokia5110

 Posted by at 14 h 58 min
Fév 232014
 

Arduino : display a clock based on a lcd screen and a RTC
Arduino : output to a tv (tvout)
Arduino : use a PS2 keyboard
Arduino : send and receive data thru radio frequency (RF433)
Arduino : programming an Arduino Pro Mini with an USB TTL Dongle
Arduino : use an ethernet controller (enc28j60)
Arduino : use it as an infrared remote
Arduino : use a Texas CC1101
Arduino : use your internal atmel 328p temperature

 Posted by at 15 h 52 min
Fév 232014
 

Reading the atmel 328 spec, one can see that its ADC (analog digital converter) has an internal temperature sensor.
Note that this applies to the atmel 168 too.

Although not as accurate as a dedicated temperature sensor (like the DS18B20), it can be useful to keep track of the arduino temp for an few extra bytes.

Note that it will be probably be higher to your environemental temperature : you may have to adjust.
Also, note that it is depending on the voltage / arduino activity : you may have to adjust again.

Here attached how to read the internal temp (rename to ino or pde) : internal_temp
(this was taken from a thread on avrfreaks).

 Posted by at 15 h 40 min
Fév 112014
 

In 2 weeks times, I lost a disk twice in my synology DS210.

First time, the disk was truly giving signs of imminent death.
Because I was using SHR (synology hybrid raid), I could not mount my disk under my ubuntu.

So this is how I got my datas back (right before the disk died for good).
The disk is mounted thru a USB dock bay onto my synology.

-1: locate your disk and raid partition with fdisk -l,
you should get something like this :
/dev/sdx3 588 19457 151569760+ fd Linux raid autodetect

-2: ensure this partition actually contains an MD device with mdadm –examine –scan /dev/sdx3,
you should something like that :
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=db7c8f07:6f0f4570:852c2e22:a378fec9

-3: locate your last active MD device with mdadm –detail –scan,
you should get something like :
ARRAY /dev/md1 metadata=0.90 UUID=f07f5754:cf6f8af4:663cbd89:1480ea74
ARRAY /dev/md2 metadata=1.1 name=ds201j:2 UUID=17f442a7:d767633b:a4fc4e5b:88db9d4b

-> you want to use next free MD device which is MD3.

-4: create a MD device pointing to your partition with mdadm -A –verbose –run /dev/md3 /dev/sdx3

-5 : now mount it with mount /dev/md3 /mnt/usb

You can now retrieve your files in /mnt/usb !!!

Now, like I told you at the beginning at this article, I lost 2 disk in a row in a week time.
The second time, the method above did not work 🙁
This time, UFS Explorer saved my datas.

Hope this can help others…

 Posted by at 20 h 12 min
Fév 092014
 

Another worthy tool to add to your toolset.

Disk2vhd is a utility that creates VHD (Virtual Hard Disk – Microsoft’s Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows’ Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion.

See here.

 Posted by at 17 h 24 min  Tagged with:
Fév 082014
 

Yet another tool (batch) to generate a minimalist winpe iso using the Windows Assessment and Deployment Toolkit (ADK) or Windows Automated Installation Kit .

Uncompress to x:\quickpe and launch make.cmd.
Get winpe iso in x:\quickpe\%processor_architecture% .

Changelog:

    • 0.2
    • -make4.cmd will generate a winpe4.iso (using MS ADK)
    • -make3.cmd will generate a winpe3.iso (using MS WAIK)
    • 0.3
    • -winre.cmd will generate a winre.iso (using local WINRE)
    • 0.4
    • -any files/folders in \pe_extra will be added in the wim file in the \tools folder
    • -winre.cmd renamed to make_re.cmd to be consistent with make_pe3.cmd and mape_pe4.cmd
    • -added setres to the zip file.
    • 0.5
    • -added make_re_from_iso.cmd which will generate a winpe iso based from a windows 7 or 8 iso.
    • -added make_re_from_dvd.cmd which will generate a winpe iso based from a windows 7 or 8 dvd.
    • -added a dpinst GUI so that one can easily load drivers from a driverspack.
    • 0.6
    • -added : compatibility with x64 hosts for winpe4
    • 0.7
    • -added : add-pack3.sample, add-pack4.sample (rename to cmd to add a winpe package in winpe3 or winpe4)
    • -added : _run_me.cmd as a main menu
    • 0.8
    • -added : x64 tinyshell
    • 0.9
    • -modified : reviewed code so that it all works on x64 platforms
    • -added : add-drivers3.sample, add-drivers4.sample (rename to cmd to add a windows drivers in winpe3 or winpe4)

Download/Discuss it here

The batch menu :

quickpev09

A generated Winpe :

winpe

 Posted by at 22 h 03 min