Howto: Install readonly emdebian on NAND

Thank you very much for pointing out the solution for this problem! I tried to figured it out, but just found out that dash couldn't be installed. Thought it has something to do with a link from "sh" to "dash". Didn't believe that the solution is that simple :-)

Thanks again! Installation is running right now.
Sascha

Sven Wrote:
-------------------------------------------------------
> - last reply for today -- promised! -
>
> Hard to find, but easy to fix...
>
> I read the debootstrap.log to find the package
> 'dash' not installing. Then I chroot'ed into
> debian and manually tried to install it - then I
> got the error of a non existent path!
> Just add this line before the actual call of
> debootstrap (there is already another mkdir
> present):
> mkdir -p $ROOT/usr/share/man/man1
>
> Et voila!
> Installation continues...

After first bricking my dockstar by not having any access to it any more, I finally managed to understand what was wrong (by grabbing a serial console port cable)...
Now I wanted to ask you to update this guide to match your current uBoot naming convention:

The lines to make UBI booting first seems to be done already in current uBoot install scripts, so one only needs to restore the boot order to boot USB first if needed.
Furthermore I found it more suitable to add the required read-only hints to the custom parameters to make them survive any uBoot updates!

...maybe it's even time to collect everything together in one single (and current) guide to match your current scripts!
I was some kind of impressed to find the ability to force rescue_boot by simply placing a file on my USB stick, although this did not work on the first try - but will go into this later...

I just installed the rescue image. I am also able to boot from an external drive. Since I no longer have the original pogo image on the drive, how can I install debian to the NAND? I tried to install from the rescue image but it failed (even after renaming to dhclient to dhclient3).

Also, everytime I reboot my dockstar, it boots into the resuce image. I have to run e2fsck and mount and unmount the usb drive for it to boot from the usb drive again. Is there anyway around this? I would like the dockstar to come up on its own if for instance there is a power loss etc.

Hi everbody
I set the env with the command " fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_ubi; run bootcmd_pogo; reset' ". After reboot, my dockstar is going green, off, green etc ... and i can't ssh to. Is it definitively down ?
I need help !

The problem I found is in checksum. Debootstrap verifies some packages against SHA256 and others against MD5, perhaps that configured in pckgdetailes coming from Jeff's page. Anyway, I modified checksum verification function in /usr/share/debootstrap/functions and everything worked beautifully. Here is modified version of the function:

Just a little heads up for those of you wanting to use a custom kernel + emdebian in NAND with ubifs:

Don't check the kernel config option for NAND page write verification!
It will render the ubifs unusable due to it being unable to write anything. Just found that issue and wanted to let you know. Don't know yet if it's a bug or lack of knowledge on my part. Both scenarios seem plausible.

1.) Ubifs uses compression if not explicitly specified otherwise. --> That 232M filesystem won't use 232M on ubifs.
2.) If there really that little flash space, or is it just partitioned strange? I mean the Dockstar has 256MB of NAND flash and one can use more than 200M for the root file system. Don't know about the pogo, though.

I successfully installed debian on the nand memory and it booted. Now I'm asking myself how it is possible to install further packages e.g. encfs and nfs? I just tried to install them with apt-get but I'll get an error saying:

$ W: Not using locking for read only lock file /var/lib/dpkg/lock
$ E: Unable to write to /var/cache/apt/
$ E: The package lists or status file could not be parsed or opened.

I've installed emdebian on mtd3, but I can't access my dockstar anymore...
I mixed Jeff's script for emdebian and shyd's script for debootstrap and easily obtained a bootable read-only usb with emdebian.
Afterwards, I installed several packages (lighttpd, samba (even though it doesn't work on a read-only partition), ...), changed the kernel (shyd's 3.1) and then copied the system on mtd3 to see if it fits...
There was 50 MB remaining, I thought it was good.

Then I typed :

fw_setenv usb_custom_params 'init=/sbin/init-ro'

... and rebooted.

My dockstar does boot. The light is solid green. I just can't connect to it.
So I tried with a "rescueme" file on a usb drive. The LED keeps blinking...

I don't have a CA-42 cable. I tried with a DCU-60, but it didn't work...
Eventually, I used my working dockstar to connect to the bricked one:

I commented out the "getty /dev/ttyS0" line in the inittab of my working debian

I connected GND to GND, TX to RX and RX to TX

I sshed to my working dockstar, used "screen /dev/ttyS0 115200" and booted the bricked one...

... and it worked !
Kinda...

I can see the messages from the bricked dockstar. Apparently, it cannot start the network because it needs write permissions... And when I use a USB dongle with a "rescueme" file, it hangs at:

The problem is that I can't write. I tried hitting a key at uboot. I tried with the "stuff" command.
Nothing happened. I'm stuck. I can see the login prompt, but I can't login.
What could I do ? Should I really go with a CA-42 ? Or am I close... ?

I installed emDebian on my dockstar a few years back but haven't touch it since and now I am lost and don't remember what I did. I took at look at dockstar.emdebian-squeeze-readonly.sh and it seems to be newer than what I used before (copyrighted 2012). My questions are is my version older, how do I upgrade, and can I run asterisk without an USB drive?

Hi.
since about a year, I am using three dockstars with debian and the dockstars work incredible solid.

Now i bought two pogoplugs (P24/V3) for only 25 € (both) and i want them to replace the dockstars, because there is more memory inside.

First i discovered the arch linux project for the pogoplug, but i also read a lot of trouble and problems. I know about the quality of jeff's debian installation, so i want to install and use debian on the pogoplug, too.

Question: Does it make sense to install the debian in the NAND? I will always use a debian with the pogoplug, so why not the NAND? Are there any disadvantage?

What i want to do with the pogoplug: I want to install a VDR (videodisk recorder), the logitech mediaserver (squeezebox) and a VPN.

Amazed to find that this *still* works with no modifications. I had a handful of these on a shelf and a need for a quickie OpenVPN client router. Had to remount rw and add an apt-source to get openvpn and iptables, but both fit with no problem. Thanks a ton!

Please, enter the code that you see below in the input field.
This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right.
If you enter the wrong code, a new image is created and you get
another chance to enter it right.