WHDD Live ISO Boot CD (old)

WHDD is created by Andrey Utkin. This is a small 'Live' image to run standalone.

=Prebuilt WHDD Live ISO=

For people who just want it without building themselves

Prebuilt ISO

Boot from Syslinux/PXELinux
Label WHDD V2 LINUX /memdisk iso INITRD /whdd-live.iso

or separate (not in ISO)

Label WHDD V2 LINUX /bzImage INITRD /initramfs

=Build it yourself=

Download Toolchain
This uses uClibc to create smaller C library files and hence a smaller output.

i386 uClibc toolchain

Create folders
Create directory structure somewhere;

mkdir -p patch source custom

Download Sources
cd source git clone https://github.com/krieger-od/whdd git clone git://git.busybox.net/busybox curl https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.xz | tar -Jx svn co http://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools smartmontools curl https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.5.tar.xz | tar -Jx curl http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz | tar -zx curl http://invisible-island.net/datafiles/release/dialog.tar.gz | tar -zx

Dir structures
Initially you should just have folders custom, patch, source and the Makefile.

(Ignore other folders for the moment, this is after it has been built to give you an idea how it should look)

├── custom │   ├── inittab │   └── rcS ├── destdir │   ├── bin │   ├── etc │   ├── include │   ├── lib │   ├── linuxrc -> bin/busybox │   ├── sbin │   ├── share │   └── usr ├── initrd │   ├── bin │   ├── dev │   ├── etc │   ├── home │   ├── init -> bin/busybox │   ├── lib │   ├── mnt │   ├── opt │   ├── proc │   ├── sbin │   ├── sys │   ├── tmp │   ├── usr │   └── var ├── Makefile ├── output │   ├── bzImage │   ├── initramfs │   └── isolinux ├── patch │   ├── whdd-CMakeList.txt.patch │   ├── whdd-libdevcheck-libdevcheck.c.patch │   ├── whdd-sliding_window_renderer.c.patch │   └── whdd-whole_space_renderer.c.patch ├── source │   ├── busybox │   ├── dialog-1.2-20140219 │   ├── linux-3.14 │   ├── ncurses-5.9 │   ├── smartmontools-code-3887-trunk │   ├── syslinux │   └── whdd ├── whdd-live.iso └── whdd.qcow

Patches
These are needed after git pull at time of writing

busybox-shell_ash.c.patch
This makes busybox set LANG as a default ENV so UNICODE works, required by WHDD.

whdd-CMakeList.txt.patch
This fixes being unable to specify the ncurses/tinfo location.

whdd-libdevcheck-libdevcheck.c.patch
Fixes compile bug due to mistake in the struct definition location.

whdd-sliding_window_renderer.c.patch
This stops 'any key' exciting the program when screen blanking comes on so you don't get to see the result.

whdd-whole_space_renderer.c.patch
This stops 'any key' exciting the program when screen blanking comes on so you don't get to see the result.

Makefile
This should be one level below the folder structure's created, see the dir layout


 * Change TCHAIN to where your toolchain is, buildroot ones have hard coded paths, x-tools (crosstools-ng doesn't?)

=/custom folder contents=

inittab

 * sysinit:/etc/init.d/rcS
 * ctrlaltdel:/sbin/reboot
 * shutdown:/bin/umount -a -r

tty1::respawn:/bin/sh tty2::respawn:/bin/sh

rcS

 * 1) !/bin/sh
 * 2) WHDD	by Andrey Utkin		#
 * 3)  Live ISO by Richud.com 2014  #
 * 1)  Live ISO by Richud.com 2014  #

mount -t proc proc /proc mount -t sysfs none /sys
 * 1) mount system virtual file systems

mount -t devpts devpts /dev/pts
 * 1) UNIX98 pseudoterminal support

mdev -s echo /sbin/mdev > /proc/sys/kernel/hotplug
 * 1) hotplug support with bb mdev

echo 1 4 1 7 > /proc/sys/kernel/printk
 * 1) stop all but EMERG kernel messages to console

/sbin/whdd
 * 1) startup whdd

=Build It=

Assuming you have all the files extracted and laid out correctly, just run 'make'.


 * make = build everything i.e. create kernel 'bzImage', programs and system archive 'initramfs', iso
 * make xxxxx = build program xxxxx (to 'destdir/')
 * make linux = just build (compile) kernel ('output/bzImage')
 * make progs = just build (compile) all the progs ('destdir/')
 * make system = clean/strip/cpio archive programs ('output/initramfs')
 * make iso = create ISO from bzImage and initramfs

=Test It (with QEmu)=


 * create a 50Mb test 'hard drive' image

qemu-img create -f qcow whdd.qcow 50M


 * fire it up

qemu-system-x86_64 -kernel output/bzImage -initrd output/initramfs -hda whdd.qcow

Selecting the QEMU disk



Main menu



Show hard drive SMART data



Running the 'read test' should produce something like this after a couple of seconds;



=Comments=