Welcome! Log In Create A New Profile

Advanced

Headless Debian Wheezy armhf with nand install

Posted by guillaume 
Headless Debian Wheezy armhf with nand install
November 01, 2012 11:52AM
Hi,

Debian wheezy armhf (aka testing), kernel 3.0.42+.
HEADLESS – Full network stack (netfilter, vlan, …) – NFS server – eth – wlan

http://guillaumeplayground.net/mele-a2000-headless-debian-wheezy-armhf-with-nand-install-v1/

Nand install, etc...

Have fun!
Bye.
Re: Headless Debian Wheezy armhf with nand install
November 01, 2012 12:00PM
Excellent!

Looks like we finally got somebody else to contribute ;)

Now I can relax and hopefully catch some sun in Barcelona this weekend instead of building A10 images. . .

Even better is that it is a nand install! Did you hopefully include the multi-boot so that people can alternately boot from SATA or USB?
Re: Headless Debian Wheezy armhf with nand install
November 01, 2012 12:39PM
Nice city Barcelona. i'm going every year for food and wine.
If you like gastronomy, i have some address ;-)

For the nand boot and since there's no github, it's with the good old method with the stock uboot.
You are free to add it.

For the contribution, i think mine was from start without a glitch and i solved my problems sadly quite alone (sata patch revealed as deep clock problem, uboot clock, nand boot). Except i had Tom's help on the uboot clock.
As i told in my previous post with the ubuntu armhf, too tired just reading talk and talk, going nowhere... and nothing to ease the process for the community.

It is done now.
I run a company and i'm quite busy. Once these images are approved, i will return 100% to my life and will maintain support on my posts.

Have a nice trip.
jijiji I live near Barcelona,
jeje the best tapas in Barcelona is a old bar/restaurant named "la Cova Fumada" barceloneta neiborhood,
is a friend "Josep Maria" and the inventor of "potato bomb" best of the world jeje, it's a "must visit" if you come here.

cheers,
Re: Headless Debian Wheezy armhf with nand install
November 01, 2012 06:05PM
Will this work on an MK802+ ? Also if it does will it use the full 1G of ram?
Re: Headless Debian Wheezy armhf with nand install
November 01, 2012 06:43PM
Quote

For the nand boot and since there's no github

Hno has a10linux tree in his git now, and the binaries are here in Jeff's forum.

Quote

Will this work on an MK802+ ? Also if it does will it use the full 1G of ram?

Using nand for the uboot along with the 3.0.42 kernel should solve and ram and other boot issues like in mk802. On Mele you can use recovery partition for the Linux rootfs if you want to keep Android. On a tablet I split the nandi /sdcard partition into two. I backed up /sdcard and then reformatted for the new size and restored the existing vfat fs, leaving 1.7GB for the Debian rootfs. Using the latest multi-boot nand uboot you can then select whether to boot from Android or Debian. Of course a lot of people will simply want to remove Android, especially on devices like mk802 or mele. But there is plenty of room to keep it.

Edit: the mele and tablet installs I referred to were definitely not headless. You can fit headless in much less space. LXDE install needs over 1GB. Plenty of room on nand for that, even with Android still installed.



Edited 1 time(s). Last edit at 11/01/2012 06:48PM by gnexus.
ciquta
Re: Headless Debian Wheezy armhf with nand install
November 02, 2012 04:40PM
Is there a way to install Debian on Mele's NAND using the whole 4GB space (or at least leave just space for a swap partition)?
I don't give a damn about its sort of Android, just want to get rid of it.
Re: Headless Debian Wheezy armhf with nand install
November 02, 2012 05:26PM
Quote

Is there a way to install Debian on Mele's NAND using the whole 4GB space

Use sunxi-tools. There is a tool called nand-part that partitions the nand. The nanda partition is not writable, and thus not shown. It will not be affected. The kernel and uboot are stored in the "linux" directory in that partition. You must keep the "env" partition to store the uboot environment. Partition the rest as you see fit. Then either use a modified Jeff's Debian install script, or a Debian roofs archive, to create a rootfs in the new nand partition. Even easier - just copy existing rootfs from mmc.
Re: Headless Debian Wheezy armhf with nand install
November 02, 2012 06:35PM
ciquta Wrote:
-------------------------------------------------------
> Is there a way to install Debian on Mele's NAND
> using the whole 4GB space (or at least leave just
> space for a swap partition)?
> I don't give a damn about its sort of Android,
> just want to get rid of it.


If you are using this image, just type PIMP_MY_MELE and choose "nand install".
It will repart your nand (4Go) and the current debian from your SD will be copied to the nand.

If you want to study how it's done, check the source of the perl script:
http://guillaumeplayground.net/pimp-my-mele/



Edited 1 time(s). Last edit at 11/02/2012 06:48PM by guillaume.
ciquta
Re: Headless Debian Wheezy armhf with nand install
November 02, 2012 07:53PM
Thank you so much guys,
Guillaume's solution worked almost like a charm at first attempt!! :)

Why "almost"?
Cos i can boot from NAND and ssh easily, but I have no video output (got VGA 1024x768), and when i type "PIMP_MY_MELE" all i can see on the menu is "MAc address" and the crucial "Led color" feature.

I have no "screen config" feature (and my background is blue instead of purple by the way).

What does that mean?!?
Re: Headless Debian Wheezy armhf with nand install
November 02, 2012 08:09PM
It's because it's a Headless version (like the title said) ;-)
It's a pure network server version... kernel tuned for it.

Under linux, you can export display to your ssh client for GFX apps but you will not get any Xorg running on it.
With it, you have all the mele memory available to network like hell !
Re: Headless Debian Wheezy armhf with nand install
November 04, 2012 08:53AM
Hi guillaume,

Great post will try to install on my mele next week.
Any experience with ispconfig v3 on the mele?

Regards
ciquta
Re: Headless Debian Wheezy armhf with nand install
November 04, 2012 11:54AM
guillaume Wrote:
-------------------------------------------------------
> It's because it's a Headless version (like the
> title said) ;-)
> It's a pure network server version... kernel tuned
> for it.
>
> Under linux, you can export display to your ssh
> client for GFX apps but you will not get any Xorg
> running on it.
> With it, you have all the mele memory available to
> network like hell !

Thanks, but i still need a little WM anyway.

I installed fluxbox from ssh... now what? how to output to VGA?
Re: Headless Debian Wheezy armhf with nand install
November 04, 2012 01:24PM
ciquta Wrote:
> Thanks, but i still need a little WM anyway.
>
> I installed fluxbox from ssh... now what? how to
> output to VGA?

Sorry you can't. The kernel is not including any video/framebuffer driver. Mali takes 64Mo of ram. That's why.
It's a shrink kernel (with all the network stack) dedicated to a headless server.
You can recompile you own kernel and install Mali drivers on this image if you want. All the infos are on sub-pages of http://rhombus-tech.net/allwinner_a10/

Or you can go for a working ubuntu if you want a display:
http://guillaumeplayground.net/mele-a2000-ubuntu-12-10-armhf-base-with-nand-install-v1/

The -t0 version (update section) on this page is reported to work on all mele.

Bye.
ciquta
Re: Headless Debian Wheezy armhf with nand install
November 04, 2012 04:25PM
guillaume Wrote:
-------------------------------------------------------
> ciquta Wrote:
> > Thanks, but i still need a little WM anyway.
> >
> > I installed fluxbox from ssh... now what? how
> to
> > output to VGA?
>
> Sorry you can't. The kernel is not including any
> video/framebuffer driver.

:°°(

i still have a working installation on a SD card, can i use pimp_my_mele to have it bootable from the nand?
Re: Headless Debian Wheezy armhf with nand install
November 04, 2012 05:10PM
ciquta Wrote:
> :°°(
>
> i still have a working installation on a SD card,
> can i use pimp_my_mele to have it bootable from
> the nand?

Yes, take the TGZ from http://guillaumeplayground.net/pimp-my-mele/
Untar, type make and follow the instructions.

Bye.
Re: Headless Debian Wheezy armhf with nand install
November 04, 2012 08:45PM
guillaume:

Thank you so much,

I've been watching the development of the MeLe's Axxxx series. While I have been trying to compile the kernel and U-boot, etc. I'm not the most skilled at linux. So I've never been able to get it to work.. Till now.

I'll be trying the 12.10 At some point soon.

Also I can assist with a torrent box if you want help with distributed hosting. I upload for 6 hours a day and I can maintain that for indefinite time not the best amount, but can reduce the bills?

Regards
Mystery.
Re: Headless Debian Wheezy armhf with nand install
November 06, 2012 03:04AM
Thank you for your offer, you are very kind.
It's on my 3Gbps bgp network ... on a 1Gbps server. These files are insignificant in term of bandwidth.
But if you want to duplicate them, i can push a mirror list.

Regards,
ciquta
Re: Headless Debian Wheezy armhf with nand install
November 12, 2012 11:32AM
guillaume Wrote:
-------------------------------------------------------
> Yes, take the TGZ from
> http://guillaumeplayground.net/pimp-my-mele/
> Untar, type make and follow the instructions.

Can't cope with that, my version seems too unstable, I should refresh it but the img is no more online :°°(

Tried the ubuntu version you released but it seems far slower than the Debian, am I wrong?

Do you plan to relase a non-headless Debian image by any chance? :o)
Re: Headless Debian Wheezy armhf with nand install
November 12, 2012 11:55AM
The ubuntu has less ram (allocated for Mali) and stupid services like networkmanager.
Perhaps you could first drop these useless ubuntu services.

If it's still slower, it's probably the ram crunch from gfx drivers...
This will mean simply that building a non-headless debian version will make it as slow as you find the ubuntu (i don't get the same impression ;-)
ciquta
Re: Headless Debian Wheezy armhf with nand install
November 12, 2012 02:10PM
I could be wrong, but the Debian sid with LXDE seems to me well faster than Ubuntu, even with networkmanager and so on... :-\

Anyway, my goal is to set up a webserver: would it need a gpu to render the webpages?
Or it's totally made on client's side?
Is the GPU really useless for server purposes?

Thanks
Re: Headless Debian Wheezy armhf with nand install
November 12, 2012 02:16PM
Yes GPU is useless for server.
On my cluster, i even removed the vga connector to have the case a bit open for cpu temp.
Re: Headless Debian Wheezy armhf with nand install
November 12, 2012 03:36PM
Oh no i got it. Ubuntu and i don't know what seems to set the lowest cpufreq.

cat /proc/cpuinfo # and look at bogomips.
do a:
cpufreq-set -g performance

to set it back to max.
ciquta
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 12:11PM
I had a good time working on this, very stable and very easy to install thanks to PIMP_MY_MELE :)

I'm a newbie so took weeks to install what i needed... so yesterday i finally put it online.

In order to get a little security I followed these instructions:

# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

    edit /etc/ssh/sshd_config
    Change: UsePAM no

then i rebooted but no way to connect via ssh :°°(
As webserver is working fine, but i just can't connect via SSH :°°°°(

Should I delete everything and restart from beginning?
What is missing?
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 12:21PM
Did you generate private/public key for a user ?
(as user, 'ssh-keygen')

To save your distrib !
If you installed it on the nand, you have to boot from the mmc and mount your nand from the mmc:
# mount /dev/nandb /mnt/
# cd /mnt/etc/ssh
# <edit you sshd_config and rollback to UsePAM yes>

If you worked on the mmc, just mount your mmc from any linux:
# mount /dev/<MMC_DEVICE>2 /mnt/
# cd /mnt/etc/ssh
# <edit you sshd_config and rollback to UsePAM yes>

PS: Next time, you should try to ssh the mele on another ssh session and keep a running terminal just in case. (edit the config, launch 'service ssh restart' and try to connect, if it fails you will still have an active terminal on the mele ;-).
ciquta
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 02:33PM
Yeah it worked thanks!!! :-)))

I probably miss this:
Change: PasswordAuthentication no (and use authorized_keys to connect)

What does it means?!?
Is it enough to uncomment this:

#AuthorizedKeysFile     %h/.ssh/authorized_keys

?
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 02:45PM
'PasswordAuthentication no' and "UsePAM no" means you will use priv/pub key to connect. It is recommanded in all possible way.
Check the openssh documentation about it.

You have to generate priv/pub key on your client (with ssh-keygen under linux) and put the content of the pub key in the remote server under your account in: "~/.ssh/authorized_keys"

And that's it. You don't need a password anymore (except if you put one on your private key).

Bye.
ciquta
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 05:12PM
Is it enough to keep the port 22 closed on my router?

I am experiencing memory leaks, after a couple of hours it went from 90mb to 420mb usage.
I guess it's due to the webserver (i'm still on apache2), looks like it's too heavy stuff for my little Mele... :-\

What webserver is running on yours?
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 05:29PM
I'm running nginx but it's static files only.
Just check if it's not 'cached' memory (it's the FS caching memory so it's not a problem, in fact it's better like this ;-).
Take one apache process (ps auxww or a top) and 'RSS' (resident). It's the real memory your process is using.
Depending on the code you run on it, you should recycle your apache child faster if it leaks (MaxRequestsPerChild) and limit your max number of processes (MaxClients).
The only rule:
MaxClients * RSS < Total memory available.
Re: Headless Debian Wheezy armhf with nand install
December 03, 2012 05:41PM
$ uptime
00:31:07 up 63 days, 6:28, 1 user, load average: 0.24, 0.15, 0.15
$ free
total used free shared buffers cached
Mem: 513000 332648 180352 0 89476 119636
-/+ buffers/cache: 123536 389464
Swap: 0 0 0

not one node failure since the first launch on the 32 i'm running.
The ethernet relay relay board i have put in the pdu is just useless ;-)
Author:

Your Email:


Subject:


Spam prevention:
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.
Message: