Please help me boot Debian from SD


knightron

Member
Joined
Jan 30, 2013
Messages
100
Location
Australia Victoria
Hello, i would like to boot Debian from SD, on my 1gz Pandora. I've two sd cards in my Pandora, both supposed to be; according to the wiki (and in my experience so far) working well with ext.
I've partitioned a 17 gb space in ext3 for Debian, and a swap file too just in case.
I have downloaded the http://www.stuckiegamez.co.uk/apps/pandora/Debian/pandora-squeeze-1.0.5-grip.tar.bz2 and untared it onto my 17 gb partition on my sdcard, with "tar -xvjpf pandora-squeeze*.tar.bz2 -C".

It should be bootable now correct?

All i get when it attempts to boot is a black screen. I have changed the autoboot.txt, to a boot.txt, and it still does it when i boot from the right shoulder button. I have changed the 'root=' point to the correct partition on the sd, but i still get the exact same, black screen.

I am obviously doing something wrong, but i'm unsure what. Could someone please help me.

(As an additional question, i have a external usb cdrom drive; is it possible to boot installation discs on the pandora with that?)

Thank you.
 
Hello,

i am booting debian-hf ( hardfloat ) as experimental OS ( debian/sid ). Works fine for me.
Main thing was the kernel and autoboot.txt

Maybe it helps you, here is my autoboot.txt:


setenv bootargs root=/dev/mmcblk0p1 rw rootwait console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K mmc_core.removable=0 video=/dev/fb0
fatload mmc 0 ${loadaddr} uImage-3.2.39-hf
bootm ${loadaddr}

but ( there is always one ) my first Partition is an FAT32-Partition where the autoboot.txt and the kernel is located.

You can load the kernel from your first ext2 partition with:

Code:
ext2load mmc 0 ${loadaddr} /boot/uImage
 
If you want to use the old image you should format to ext2, ext3 is not working properly.

Also if you have problem you must wait only a bit as we are making an up-to-date debian installation and configuration guide.
 
If you want to use the old image you should format to ext2, ext3 is not working properly.

Also if you have problem you must wait only a bit as we are making an up-to-date debian installation and configuration guide.
Would be very interested in your guide....

Thanks!
 
Hi guys, so even with the suggestions given i was unable to boot Debian. I'm using a 125 GB sd card, you don't think the size could be influencing this? I haven't tested on a smaller one.
 
If you want to use the old image you should format to ext2, ext3 is not working properly.

Also if you have problem you must wait only a bit as we are making an up-to-date debian installation and configuration guide.
It would be great if you could put online the stuff that you have already written. I've had issues with XFCE4, where policykit didn't work, and I'd like to see if you have solved it. I had to switch to KDE. A bit slower, but suprisingly not so much so that it isn't usable if you don't use zram and use swap, and I will be able to play with pykde. Also, I would like to see how you have solved suspend/hybernate.
 
hey guys, ive managed to get debian to boot finally. my problem was the kernel. for some reason i can't get my pandora to boot the old kernel, so transferring the modules firmware and uImage from Angstrom fixed that. ive finished building Debian from scratch. i've xfce4 installed with gdm. for some reason when i try to boot though, x displays half a blank screen and a mess of colour at the top half, which flashes every now and then. it is unusable. ive disabled gdm from boot and it boots fine to the command line. When i attempt to; startx; it fails. i'm using the xorg config file from the debian on sd wiki.

my /var/log/Xorg.0.log file reveals this.

X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.32 armv5tel Debian
Current Operating System: Linux klayes-thinkpad 3.2.45 #894 Sat Jul 6 17:22:45 EEST 2013 armv7l
Kernel command line: root=/dev/mmcblk0p1 rw rootwait vram=6272K omapfb.vram=0:3000K mmc_core.removable=0
Build Date: 30 October 2011  09:07:45PM
xorg-server 2:1.7.7-14 (Julien Cristau <jcristau@debian.org>)
Current version of pixman: 0.16.4
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug  4 14:14:54 2013
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) No Layout section.  Using the first Screen section.
(==) No screen section available. Using defaults.
(**) |-->Screen "Default Screen Section" (0)
(**) |   |-->Monitor "<default monitor>"
(==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
    Entry deleted from font path.
(WW) `fonts.dir' not found (or not valid) in "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType".
    Entry deleted from font path.
    (Run 'mkfontdir' on "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType").
(==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/100dpi/:unscaled,
    /usr/share/fonts/X11/75dpi/:unscaled,
    /usr/share/fonts/X11/Type1,
    /usr/share/fonts/X11/100dpi,
    /usr/share/fonts/X11/75dpi,
    built-ins
(==) ModulePath set to "/usr/lib/xorg/modules"
(II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
(II) Loader magic: 0x1a9da8
(II) Module ABI versions:
    X.Org ANSI C Emulation: 0.4
    X.Org Video Driver: 6.0
    X.Org XInput driver : 7.0
    X.Org Server Extension : 2.0
(--) using VT number 7

(II) LoadModule: "extmod"
(II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension SELinux
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "dbe"
(II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "glx"
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    ABI class: X.Org Server Extension, version 2.0
(==) AIGLX enabled
(II) Loading extension GLX
(II) LoadModule: "record"
(II) Loading /usr/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.13.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "dri"
(II) Loading /usr/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.1.0
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
Primary device is not PCI
(==) Matched fbdev as autoconfigured driver 0
(==) Assigned the driver to the xf86ConfigLayout
(II) LoadModule: "fbdev"
(WW) Warning, couldn't open module fbdev
(II) UnloadModule: "fbdev"
(EE) Failed to load module "fbdev" (module does not exist, 0)
(EE) No drivers available.

Fatal server error:
no screens found

Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

it says thinkpad because that's the laptop i begun the debootstrap from. i've been using Gnu/Linux for about 3 years but am an absolute noob when it comes to diagnosing problems like this. i've googled around but couldn't find any relevant info. some assistance to get the xserver running would be much appreciated. thank you
 
I recently successfully got debian running on a 4G sd using the desktop debian instructions on http://pandorawiki.org/index.php?title=Debian_On_SD.

Works fine for me.  I used squeeze-1.0.5, as you did in your original post.  Perhaps the big card is a problem.  I seem to remember that the pandora recognizes cards up to 64 gig in size. 
 
Last edited by a moderator:
You can use pandebian if you just want to use debian software. I use opencv with QT Creator this way and it works great :) .
 
Or you try Bodhi Linux for Pandora which is Debian based and you have full Access to Debian Arm Repos :)
 
hey guys, ive managed to get debian to boot finally. my problem was the kernel. for some reason i can't get my pandora to boot the old kernel, so transferring the modules firmware and uImage from Angstrom fixed that. ive finished building Debian from scratch. i've xfce4 installed with gdm. for some reason when i try to boot though, x displays half a blank screen and a mess of colour at the top half, which flashes every now and then. it is unusable. ive disabled gdm from boot and it boots fine to the command line. When i attempt to; startx; it fails. i'm using the xorg config file from the debian on sd wiki.

my /var/log/Xorg.0.log file reveals this.

it says thinkpad because that's the laptop i begun the debootstrap from. i've been using Gnu/Linux for about 3 years but am an absolute noob when it comes to diagnosing problems like this. i've googled around but couldn't find any relevant info. some assistance to get the xserver running would be much appreciated. thank you
If you're using Debian armhf and don't need 3D stuff, then copy the kernel from openpandora (lib/modules/kernel_version, /boot/uImage-3, /lib/firmware), install package xserver-xorg-video-omap3, leave /etc/X11/xorg.conf empty, and create file /etc/X11/xorg.conf.d/50-nubs.conf with the following content (you can name it whatever you want, but try to keep the number not lower than 50, it affects the loading of some modules and stuff):


Section "InputClass"
Identifier "Nubs"
MatchDevicePath "/dev/input/js*"
Driver "joystick"
EndSection

Then on openpandora create modmap for your keyboard with

xmodmap -pke > my-xmodmap

copy that to your SD card with Debian armhf, and when the X loads, open an xterm and run

xmodmap my-xmodmap

wait a few minutes, the pandora will go crazy and seemingly freeze for a while, and when it's done, you'll have not only keyboard but also nubs as are on openpandora - left moves, right emulates mouse buttons...

I haven't had time to work on making the proper keyboard setup (Debian uses xkb for both console and X), but eventually I'll do that too...

And if you're using the now very old "Debian from SD" as is described on wiki, my recommendation is to forget about that.
 
And if you're using the now very old "Debian from SD" as is described on wiki, my recommendation is to forget about that.
I tried installing debian armhf using various sets of instructions today.  I tried debootstrap, cdebootstrap, played with multiple combinations of autoboot.txt settings, explored armhf images at the debian repositories.  No joy.  I will probably stick with armel using the old "Debian from SD" model until some clear instructions come around for armhf.

One particular sticking point:  when I ran /debootstrap/debootstrap --second-stage on the pandora, the task finished immediately, as if nothing was configured.  This was after an initial debootstrap with armhf and wheezy.
 
And if you're using the now very old "Debian from SD" as is described on wiki, my recommendation is to forget about that.
I tried installing debian armhf using various sets of instructions today.  I tried debootstrap, cdebootstrap, played with multiple combinations of autoboot.txt settings, explored armhf images at the debian repositories.  No joy.  I will probably stick with armel using the old "Debian from SD" model until some clear instructions come around for armhf.

One particular sticking point:  when I ran /debootstrap/debootstrap --second-stage on the pandora, the task finished immediately, as if nothing was configured.  This was after an initial debootstrap with armhf and wheezy.
That's because openpandora's armel and debian armhf don't like each other very much, and second stage dies right away. I don't know how others have solved it, but I have qemu on my Debian laptop (it has SD reader), and I do second stage on it like this:

- mount the SD card

- do the first stage debootstrap or cdebootstrap (I have succeded with both)

- copy /usr/bin/qemu-arm-static to /mountpoint_of_my_SDcard/usr/bin

- mount /dev /proc and /sys from my laptop to the same dirs on my /mountpoint_of_my_SDcard/ (create there /dev /proc and /sys if they aren't created by first stage)

- chroot /mountpoint_of_my_SDcard (chroot automagically starts qemu with arm emulation)

- do the second stage right there

- aptitude install whatever else I need

- leave chroot, unmount /dev, /proc and /sys from the SDcard, unmount the SDcard itself (if you have installed some stuff that runs right away such as apache or similar, then you'll have to kill those processes - ps aux|grep qemu)

- put SDcard into pandora that has booted into default openpandora armstrong

- copy kernel and stuff to SDcard, prepare boot config

- reboot

- enjoy your new debian system :)

Unfortunatelly, there is an bug with the xfce and policykit, which doesn't allow you to use stuff that requires root privileges - network manager, brightness etc... I have found an post from a few months ago that an xfce developer tried to solve this issue, but it didn't work for me. I have installed KDE and it works. But, I have removed zram, and put the swap partition on other SD card, because KDE really likes a lot of RAM. It works, and I have interest in KDE anyway, so it is ok for me, perfect for an hacking session while in public transportation... :)

Wifi works, and also an 3G USB dongle that I have. Enough for me. :)
 
Last edited by a moderator:
- mount the SD card

- do the first stage debootstrap or cdebootstrap (I have succeded with both)

- copy /usr/bin/qemu-arm-static to /mountpoint_of_my_SDcard/usr/bin

- mount /dev /proc and /sys from my laptop to the same dirs on my /mountpoint_of_my_SDcard/ (create there /dev /proc and /sys if they aren't created by first stage)

- chroot /mountpoint_of_my_SDcard (chroot automagically starts qemu with arm emulation)

- do the second stage right there

- aptitude install whatever else I need

- leave chroot, unmount /dev, /proc and /sys from the SDcard, unmount the SDcard itself (if you have installed some stuff that runs right away such as apache or similar, then you'll have to kill those processes - ps aux|grep qemu)

- put SDcard into pandora that has booted into default openpandora armstrong

- copy kernel and stuff to SDcard, prepare boot config

- reboot

- enjoy your new debian system :)

Unfortunatelly, there is an bug with the xfce and policykit, which doesn't allow you to use stuff that requires root privileges - network manager, brightness etc... I have found an post from a few months ago that an xfce developer tried to solve this issue, but it didn't work for me. I have installed KDE and it works. But, I have removed zram, and put the swap partition on other SD card, because KDE really likes a lot of RAM. It works, and I have interest in KDE anyway, so it is ok for me, perfect for an hacking session while in public transportation... :)
Thanks.  Armhf debian is now running on my pandora.  :D

I tried kde but got stuck.  I did an apt-get install kde-plasma-netbook while in qemu (took a long time).  Now when I # startkde it returns 

$DISPLAY is not set or cannot connect to the X server
I tried  "DISPLAY=:0.0" and "export DISPLAY" within the startkde script right before the test giving the above error is run.  No joy.

edit:  Ok.  Got past that by getting startx via xinit and getting fbdev via xserver-xorg-video-fbdev.

Now I'm trying to get the stylus and nubs to work.  The stylus is roughly 180 degrees off and the nubs are unresponsive, even though I have put the 50-nubs.conf file into /etc/X11/xorg.conf.d/ as mentioned on the boards.
 
Last edited by a moderator:
KDE has an "kde" metapackage, which pulls all of the stuff, so I just did that, and it works with no issues, using KDM as login. Yes, it takes a while to install... B)   But, I have managed to reduce the memory footprint by lowering the various tmpfs and shmfs values (by default those take about 50% RAM for the buffers that just stay unused), so the KDM has become more responsive. I'll post those later on.

I don't use stylus since the nubs work just fine and for me it is easier to use them than to pull the stylus out, fiddle over the screen, put it back, type more... But I'll check on my pandora and see how it works. On XFCE it was just a matter of running calibration utility and then putting those values in an config file. Not sure right now which one.

BTW, it seems that latest Debian kernel should support a lot of pandora functionality, I'll see if I can work something out with it.
 
Just wanted to say, i'm not ignoring all your helpful advice, i just haven't had the time to try it all out at the moment. I've wasted a fare few hours trying to get it to boot, and at the moment it's not on the top of my priority list. Thank you though for the suggestions.
 
I had to do:

  # echo mouse > /proc/pandora/nub0/mode

  # echo mbuttons > /proc/pandora/nub1/mode

to get the nubs to function as mouse/mousebuttons.  Both mode values were set to "absolute", which is joystick mode.

Now my nubs work properly and I can get around on the screen. 

Up next:  getting ethernet up and running.
 
I had to do:

  # echo mouse > /proc/pandora/nub0/mode

  # echo mbuttons > /proc/pandora/nub1/mode

to get the nubs to function as mouse/mousebuttons.  Both mode values were set to "absolute", which is joystick mode.

Now my nubs work properly and I can get around on the screen.
Well, I have just copied stuff from pandora angstrom (/usr/pandora, /etc/pandora...), and nubs work fine when I load modmap.

Up next:  getting ethernet up and running.
Over an USB dongle? I have seen the tutorials on openpandora wiki, but I'm fine with wifi and 3G usb dongle...
 
I had to do:


  # echo mouse > /proc/pandora/nub0/mode


  # echo mbuttons > /proc/pandora/nub1/mode


to get the nubs to function as mouse/mousebuttons.  Both mode values were set to "absolute", which is joystick mode.


Now my nubs work properly and I can get around on the screen.
Well, I have just copied stuff from pandora angstrom (/usr/pandora, /etc/pandora...), and nubs work fine when I load modmap.

Up next:  getting ethernet up and running.
Over an USB dongle? I have seen the tutorials on openpandora wiki, but I'm fine with wifi and 3G usb dongle...
Thank you for your help. 

I copied /usb/pandora and /etc/pandora from Zaxxon.  then,

# /usr/pandora/scripts/op_usbhost.sh switches on usb host.  Then I edited /etc/network/interfaces to configure eth0 via dhcp and I am on line.

I have been working in fluxbox.  It seems to handle permissions fine, evidently without the policykit problem of xfce4.

It looks like this will be my working os this year.
 
Last edited by a moderator:
If network manager works under fluxbox (and it should) I'd recommend it, because it really works well, and automates a lot of things, including managing of /etc/network/interfaces.

The only issue is that for usb devices you have to manage modules manually. There is an utility under pandora angstrom which does that, but not on Debian. So when you load ehci_hcd, network manager will recognize the device and allow for GUI control. It works just fine with my 3G USB dongle. YMMV of course.
 
Back
Top