Dienstag, 7. Mai 2013

[Dreamplug] Creation of a Setup-USB-Stick with Linux

Hey there,

since I already published some Debian-6-distributions shipping with various libraries and applications (Mono 2.10, OpenCV, LAMP, prepared to run customized start ups from a script,...), I think it might be interesting how to create an USB-Stick for the installation of such distributions on a Dreamplug.


Firstly, you need a USB-Pendrive with 4GB or better 8GB. Then grab yourself the required files:

Plug in the USB-Pendrive to your Linux Host. I use OpenSuse 12.2 and a Transcend JetFlas 8GB USB Flash Drive.

You now have to options to partition the Flash Drive. Either fdisk command line tool or the graphical GParted. To install GParted on OpenSuse, use zypper:

 linux-ulun:/home/tbergmueller # zypper in gparted  

Although I prefer fdisk, I'll show you the GParted-way, since this is more intuitive for most users:

Select your Drive from the drop-down in the upper right corner of the tool. Then delete the most-likely already existing partition on the drive. From the unallocated space, create two partitions:

1st primary Partition: 100MB fat16
2nd primary Partition: remaining space as ext3

GParted for USB Flash Drive partitioning


Doublecheck your settings in order to not accidentally delete some of your data on another drive or even break up your system. Then apply the changes by hitting the green tick on the Shortcut-bar.

Let's assume you downloaded the files from above to your Download-Folder. Mine is at /home/tbergmueller/Downloads.

Open a shell (preferably as root) and navigate to the Downloads-folder. Then create two directories for mounting the USB-Sticks partitions. I create them in /mnt named setupstick_kernel and setupstick_system. Then mount the formerly created USB Flash Drive's partitions to these nodes. My Flash-drive is registered as /dev/sdb.


 linux-ulun:/home/tbergmueller/Downloads # mkdir /mnt/setupstick_kernel  
 linux-ulun:/home/tbergmueller/Downloads # mkdir /mnt/setupstick_system  
 linux-ulun:/home/tbergmueller/Downloads # mount /dev/sdb1 /mnt/setupstick_kernel/  
 linux-ulun:/home/tbergmueller/Downloads # mount /dev/sdb2 /mnt/setupstick_system/  

Now copy the Kernel (uImage) to the 100MB partition and untar the Filesystem-tarball to the system-mount-point:

 linux-ulun:/home/tbergmueller/Downloads # cp uImage /mnt/setupstick_kernel/  
 linux-ulun:/home/tbergmueller/Downloads # cd /mnt/setupstick_system/  
 linux-ulun:/mnt/setupstick_system # tar -xvzf /home/tbergmueller/Downloads/setupStick_v0-6.tar.gz   


After this is done, safely remove the USB Flash Drive. You're now ready to install the system which is embed in the Setup-FS-Tarball. Best follow the Installation guide provided in setup_update_instructions_v2.pdf