Edited 10.8.2011: Updated the howto because there were some errors and missing info.
UPDATE 0: I have now added some stuff into the howto. It looks pretty messy but if you read carefully and slowly then you should understand :) I have added some UPDATEs and NOTEs in some parts to give more important info.
UPDATE 1: The part 2. Download boot files is NOT NEEDED! Because we dont use them anywhere :) The script provided will download the files from elsewhere.
UPDATE 2: This post tells you to create boot partition for external SD card but we wont actually copy anything to it. I havent tested to install Debian on external SD card without the boot partition so proceed as guided.
UPDATE 3: There will be fixed and properly tested howto for this in some time..maby after the holidays :) Meanwhile use this as it is..it SHOULD work!
UPDATE 4: It is possible to install Debian on the external card without making and extra boot partition. Also we do not need the uImage to get it up and running.
UPDATE 5: I havent tested wlan, blutooth etc, just the installation!
----
This little guide tells howto install Debian on Dreamplugs external SD memory card. And now we are talking about fresh Debian installation, not the image from Globalscale!
I wrote about the Dreamplug in finnish few months ago when I was waiting for the NewIT forums to process my forum registeration. Now 1,5months later I still haven't got the accept to the forums so I decided to write this in english too!
So the problems is that the Dreamplugs internal memory card includes only Ubuntu 9.04 which is veeeery old. Of course you want to update it and maby install some other OS in it. I wanted this also, but I was too afraid to "brick my plug" so I decided to find a way to install the other OS to the external SD card.
Globalscale technologies also offer ready Debian packages which can be relatively easily installed to the internal card. Get them here.
Changing the operating system of Dreamplug
Here are the quick notes how I installed Debian on the Dreamplugs external SD card using working Linux laptop. NOTE:JTAG module is required!
1. Prepare the SD card
UPDATE:Actually the SD card does NOT NEED two seperate partitions. It works also with one normal ext3 partition. No need to make it bootable. Just make one partition like 2-xx GB
I have 8GB SD card which is formatted (with fdisk) like this:
- /dev/sdb1 100MB boot partition (flag as bootable!)
- /dev/sdb2 on big partition with rest of the free space
Format boot partition (sdb1) as FAT32 and the other partition (sdb2) as EXT3
sudo mkdosfs -F 32 /dev/sdb1
sudo mkfs.ext3 -b 4096 /dev/sdb2
2. Download necessary boot files
THIS PART IS NOT NEEDED! SKIP SKIP!!
---
We need two files for the boot partition: uInitrd and uImage. Source #1 told to get uInitrd from here: ftp://ftp.debian.org/debian/dists/squeeze/main/installer-armel/current/i...
uImage file is downloadable from the Dreamplugs Google Code site: http://code.google.com/p/dreamplug/downloads/list
SKIP ends here!!
----
3. Create necessary root files for Dreamplug Debian
Nickname IvanSanchez has created a nice script for creating the root files. Here is the post about it.
The script uses Multistrap (remember to install it!) to build working Debian system files. Then the files can be copied to the external SD card.
The script uses a Multistrap configuration file which can be also downloaded from Ivan's website.
The script empties the folder /media/disk and then downloads the required files in there. Of course you can modify the script to work as you want. Make sure /media/disk exists:
mkdir /media/disk
I commented out this line from the script:
echo -e \"$rootpasswd\\n$rootpasswd\\n\" | /usr/bin/passwd root
I also commented out the section which starts like this:
echo \"Tweaks to reduce flash writes
and ends like this:
>> /etc/sysctl.conf
Commenting was done because the script did not work (no idea why) until I commented them out. Remember to make the (commented) changes after the installation is complete.
NOTE: before running the script make sure that multistrap is installed!
apt-get install multistrap
NOTE: running the script might need superuser rights. Run script as sudo for example:
sudo ./script.sh
Put the script and the multistarp.conf in the same folder and execute the script. Note: Internet access is required, because Debian files are download directly from Debian servers. At the end of this process, there should be about 300MB stuff in the /media/disk folder.
Copy the files from /media/disk to the SD cards partition /dev/sdb2
Insert the SD card in Dreamplugs external SD card slot.
UPDATE: if you have only one partition at the SD card then the partition is usually named /dev/sdb1
4. Changing the boot options of the Dreamplug
You should now read the manual provided by Globalscale about installing the Debian filesystem to the Dreamplug. The manual is available from the Google Code site.
Note: The manual provided in the site describes how the Globalscales Debian image is installed in Dreamplug. So the manual in example tells you to use different partitions. I am telling you to read the manual just to know what is going to happen next.
These are short notes, please read the official manual for more info!
Open connection to the Dreamplug from Linux computer:
sudo screen /dev/ttyUSB0 115200
View current boot setup:
printenv
Default root line should look like this. Sda2 is the root partition of the default memory card(MicroSD) included in the Dreamplug.
x_bootargs_root=root=/dev/sda2 rootdelay=10
Tell Dreamplug to boot the itself from the SD cards sdb2 partition:
setenv x_bootargs_root root=/dev/sdb2 rootdelay=10
saveenv
To see the changes, use the printenv command.
Reboot the device using this command:
reset
UPDATE: If you have only one partition on the SD card, then use /dev/sdb1 !!
Dreamplugs first boot from external SD card
I recommend using the JTAG when booting first time with the new root files. This way you can see possible errors and other info messages.
If you copied the script "as-it-is" the Dreamplug LEDs should be blinking during the boot. JTAG should print some Debian package installation information. The device is booted at the end of installation.
If everything went well, you should see the normal Debian login screen. Password should be password
If you see some incorret info, please leave a comment!
Source info
Thanks to all sources!
Lähde/source 1: http://blog.davideaves.com/archives/2011/03/21/installing_debian_gnulinu...
Lähde/source 2: IvanSanchez http://www.newit.co.uk/forum/index.php?topic=2073.0
Guess I own you a beer or two now :)
http://code.google.com/p/dreamplug/downloads/list
http://newit.co.uk/
http://www.globalscaletechnologies.com/

Kommentit
Well done!
Nice to know you got it working. My guess is still that something with the bootargs were not right, but if you already got it working, maybe we should not worry about it anymore!
I updated the howto and tested it by myself and got it working ok without problems. Don't know why yours did not work.
At least I tried to help :D !
I updated the howto
I have now tested again the howto and we can actually skip some things!
First of all, we do not need boot partition and we dont have to download the files. You can also comment out uImage from the script.
If you use only one partition, remember to always use sdb1 instead of sdb2 (in this howto)
printenv
Actually I remember now that I also encountered same kind of error as your kernel panic. It appeared because the boot options were not correct. Could you show them?
About the dd...I prefer solving this problem, not going around it. You can also install the Globalscales Debian image if you need it?
Pure Debian does not have ie the wlan drivers installed but I think the Globalscale image has...
So now I tried the
So now I tried the following:
create 2 partitions, the fat 32 partiion /dev/sdb1 is empty no uImage.
the 2nd partition has the multistrap content from /media/disk and is ext3.
When I boot from the external sd card I get:
** Unable to read "uImage" from usb 1:1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
reading uImage
So it is not working for me :(
this is my
this is my printenv:
Marvell>> printenv
bootdelay=3
baudrate=115200
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_usb=usb start
x_bootargs=console=ttyS0,115200
ethaddr=F0:AD:4E:00:81:4B
eth1addr=F0:AD:4E:00:81:4C
x_bootarg=console=ttyS0,115200
x_bootcmd_kernel=fatload usb 0 0x6400000 uImage
x_bootargs_root=root=/dev/sda2 rootdelay=10
filesize=296350
ethact=egiga0
bootargs=console=ttyS0,115200 root=/dev/sda2 rootdelay=10
x_bootarg1=console=ttyS0,115200 root=/dev/sdb2 rootwait panic=10
x_bootarg2=console=ttyS0,115200 root=/dev/sda2 rootwait panic=10
x_bootcmd1=mw 0x6400000 0 1000; fatload usb 1:1 0x6400000 uImage; setenv bootargs ${x_bootarg1}; bootm 0x6400000;
x_bootcmd2=mw 0x6400000 0 1000; fatload usb 0:1 0x6400000 uImage; setenv bootargs ${x_bootarg2}; bootm 0x6400000;
bootcmd=usb start; run x_bootcmd1; run x_bootcmd2
stdin=serial
stdout=serial
stderr=serial
Environment size: 833/4092 bytes
Sorry for all my replies, but
Sorry for all my replies, but I tried it with 1 partition ext3 bootable.
When I try to boot it boots but gives an error:
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[] (unwind_backtrace+0x0/0xe0) from [] (panic+0x54/0x134)
[] (panic+0x54/0x134) from [] (init_post+0xe0/0x110)
[] (init_post+0xe0/0x110) from [] (kernel_init+0xf0/0x128)
[] (kernel_init+0xf0/0x128) from [] (kernel_thread_exit+0x0/0x8)
My printenv:
Marvell>> printenv
bootdelay=3
baudrate=115200
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_usb=usb start
x_bootargs=console=ttyS0,115200
ethaddr=F0:AD:4E:00:81:4B
eth1addr=F0:AD:4E:00:81:4C
x_bootcmd_kernel=fatload usb 0 0x6400000 uImage
ethact=egiga0
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm;
x_bootargs_root=root=/dev/sdb1 rootdelay=10
bootargs=${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
stdin=serial
stdout=serial
stderr=serial
Environment size: 584/4092 bytes
FIXED: USE THE DEBIAN IMAGE
FIXED:
USE THE DEBIAN IMAGE FROM: http://www.newit.co.uk/forum/index.php/topic,2057.0.html
WORKS LIKE A CHARM :) !!
sorry for the caps, am very happy :)
Hi, Thanks for your kind help
Hi,
Thanks for your kind help :)
Where can I find the globalscale debian image files? the code.google.com repository does not work for me (the debain rootfs and uImage do not match up and give glibc errors :( )
So I can get the script from Ivan and have to create only 1 big ext3 partition (/dev/sdb1) and mount it to /media/disk and all should work?
Dreamplug boot options
Hi,
btw I hate our commenting system, should change this so all the comments are not nested :)
Can you tell me your dreamplug's boot options. I think it should not even try to boot from the internal card if you have done the configs ok.
Cant get you a dd right now because I am not at the plug at the moment...
Hi, ive set it to boot first
Hi, ive set it to boot first the external card and if that fails try to boot the internal sd card.
It works fine i was able to install the factory ubuntu onnthe external sd card and boot from it without any problems.
Ibwould be rwally happy if you could dd your sd card tonan img filevwhenevernyou got time :)
You can mail me at info ED pcintelligence DOT nl if that makes communicating easier :)
Thx,
Michiel
Hi, I am using fdisk as
Hi,
I am using fdisk as stated above to create the 2 partitions (1st is fat32 , 2nd is ext3)
I copy the uImage and Uinitrd files to the 1st partition on the sd card
mount my 2nd partition to /media/disk
run the mkbootstrap script with theb conf file in the same dir
change the boot settings
and boot from the external bootdisk (/dev/sdb)
correct?
btw I unmounted the sd card
btw I unmounted the sd card via umount to make sure the disk is not corrupted.
when i try to boot from it I get the following message:
scanning bus for devices... 4 USB Device(s) found
scanning bus for storage devices... 2 Storage Device(s) found
reading uImage
2712400 bytes read
## Booting kernel from Legacy Image at 06400000 ...
Image Name: Linux-2.6.33.6
Created: 2011-02-08 8:18:48 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2712336 Bytes = 2.6 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
reading uImage
2712400 bytes read
## Booting kernel from Legacy Image at 06400000 ...
Image Name: Linux-2.6.33.6
Created: 2011-02-08 8:18:48 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2712336 Bytes = 2.6 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
It tries first the external sd card and if it fails start from the internal sd card.
I think the uImage on the /dev/sdb1 is not good or matches the install from Ivan's website
I am getting a little bit
I am getting a little bit further, it will boot (I wget the uImage from the script and copied it to the first partition).
But now I get the following error:
/sbin/init: error while loading shared libraries: /lib/libc.so.6: ELF file version does not match current one
Kernel panic - not syncing: Attempted to kill init!
[] (unwind_backtrace+0x0/0xe0) from [] (panic+0x54/0x134)
[] (panic+0x54/0x134) from [] (do_exit+0x70/0x650)
[] (do_exit+0x70/0x650) from [] (do_group_exit+0xc0/0xf4)
[] (do_group_exit+0xc0/0xf4) from [] (sys_exit_group+0x18/0x20)
[] (sys_exit_group+0x18/0x20) from [] (ret_fast_syscall+0x0/0x28)
Rebooting in 10 seconds..
is it possible to create a dd
is it possible to create a dd image from your external sd card so I can install it on my sd card and run it on my dreamplug?
Use the official manual only as reference
Hi!!
You are getting a kernel panic so I quess something is wrong :)
Also notice that dmesg show actually 2 devices, sda and sdb. Be sure what device is the SD card. When you plug the SD card to your computer (not the Guruplug) what do you get from dmesg?
I think you should recreate the the external SD cards partitions. Plug the SD card in some other device than the Guruplug. Example: Plug the SD card to some Linux laptop and first clear the whole SD card, then create the 2 partitions I described in 1. Prepare the SD card.
Actually I did all the parts 1-3 on another computer, not at the Guruplug.
If you still have some problems, please tell the first problem you encounter so I can give better hints and help.
Hi I got an error, I tried
Hi I got an error, I tried the manual but had some questions about the /media/disk, that one does not exist should I create the folder and then mount it to the 2nd partition?
And is it correct that the 1st partition/fat32 partition is empty?
I get the following error: scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 9909 PQ: 0 ANSI: 0
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 0:0:0:1: Direct-Access Generic STORAGE DEVICE 9909 PQ: 0 ANSI: 0
sd 0:0:0:0: [sda] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
sd 0:0:0:1: Attached scsi generic sg1 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:1: [sdb] 16121856 512-byte logical blocks: (8.25 GB/7.68 GiB)
sd 0:0:0:1: [sdb] Write Protect is off
sd 0:0:0:1: [sdb] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1 sda2
sda: p2 size 3653412 exceeds device capacity, limited to end of disk
sd 0:0:0:1: [sdb] Assuming drive cache: write through
sdb: sdb1 sdb2
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
sd 0:0:0:1: [sdb] Assuming drive cache: write through
sd 0:0:0:1: [sdb] Attached SCSI removable disk
kjournald starting. Commit interval 5 seconds
EXT3-fs (sdb2): using internal journal
EXT3-fs (sdb2): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) on device 8:18.
Freeing init memory: 140K
Kernel panic - not syncing: Attempted to kill init!
[] (unwind_backtrace+0x0/0xe0) from [] (panic+0x54/0x134)
[] (panic+0x54/0x134) from [] (do_exit+0x70/0x650)
[] (do_exit+0x70/0x650) from [] (do_group_exit+0xc0/0xf4)
[] (do_group_exit+0xc0/0xf4) from [] (get_signal_to_deliver+0x3c8/0x428)
[] (get_signal_to_deliver+0x3c8/0x428) from [] (do_notify_resume+0x70/0x61c)
[] (do_notify_resume+0x70/0x61c) from [] (work_pending+0x1c/0x20)
Btw my SD card is /dev/mmcblk1p(1,2)
Marc
Hello
I had teh asme mistake, i format m'y card on ext2 and i put on it the dreamplug from gloablascape, it ok after that
Kommentoi