![]() |
Re: Easy Debian Fremantle Beta Testing
[QUOTE=Estel;1443280]
Quote:
Thank you, Estel. In this case I would only be interested about using a keyboard inside LXDE, so from what you say things look promising. My main goal is working with a bluetooth keyboard with integrated trackpad. I think I'll just have to get one and try. When that happens I'll report back. |
Re: Easy Debian Fremantle Beta Testing
I kind of killed my main N900 (MyDocs even disappeared completely). I think it happened because of running xmaxima's test suite with a low battery. Or maybe I just punished the filesystem too much the past few days installing and running many big programs in EasyDebian ;)
I flashed (eMMC + Combined), and still this didn't solve the issue of the missing /dev/mmcblk01p1 (aka MyDocs). TestDisk didn't help much. I started gparted from my Ubuntu computer, and it would segfault when I tried to mess with the FAT32 partition (resize, move, etc). I finally converted the partition to ext3, and it seems that ext3 is more tolerant to errors than FAT32 (not surprisingly). From that, I converted again to FAT32, and flashed again, and then I could see MyDocs. Not sure about the logic involved in this, but something just changed. Since I screwed the N900 so badly, I figured it was a good chance to rebuild from scratch, so with the help of a Gparted Live USB key (my Ubuntu Gparted still was giving me problems) now I have this partition setup: 1. FAT32 (MyDocs) 8GB 2. ext3 (/home) 8GB 3. Extended partition 4. ext3 logical (7GB) (EasyDebian partition #1) 5. ext3 logical (7GB) (EasyDebian partition #2) 6. Linux swap (as stock, 768MB) So now I have 8GB to install Maemo programs, and 2 big ext3 partitions for EasyDebian. Probably will keep in one a stable configuration, and use the other for testing. I haven't tested yet that EasyDebian will work by copying an image to one of these partitions, but I don't see why not. :) |
Re: Easy Debian Fremantle Beta Testing
***UPDATE***
The MyDocs partition wasn't visible either from Windows 7. I fired up the GParted Live USB drive again, and ran Check for Errors (which runs a fsck command on the drive) a couple times. Now, I see the drive again in Ubuntu. I restarted the N900 and that didn't hurt things. I do know that TestDisk was reporting some I/O errors on the original FAT32 27GB volume, so let's see how reliable things are from now on. Any ideas are welcome. ***END UPDATE*** Alright, so I ran into a problem. I connected the N900 in storage mode to my Ubuntu system, and now MyDocs can't be mounted. (Although if I use BackupMenu Storage r/w Mode, I can see all partitions including MyDocs just fine. Also, I did a fsck -af /dev/mmcblk0p1 and I didn't get any errors. I get this error message: Code:
Error mounting /dev/sdb4 at /media/user/Nokia N900: Command-line `mount -t "vfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush" "/dev/sdb4" "/media/user/Nokia N900"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb4, Code:
[ 3623.012193] usb 1-1: new high-speed USB device number 5 using ehci-pci |
Re: Easy Debian Fremantle Beta Testing
No idea what's wrong there and as I've recently demonstrated in another thread I'm certainly no expert in N900-flashing. So maybe opening a dedicated thread where people with real knowledge will look would be a good idea.
But I'd suggest to reflash again with the stock partition layout, then simply switch /home/user and MyDocs partitions [1]. That's at least what I did with my main N900 long ago and it works fine. For ED it doesn't really matter if it has its own partition or if it runs inside a dedicated subdirectory anywhere else. After all it's just a regular chroot. For example at the moment I have 3 different ED setups sitting in 3 different directories on my 27GB /home/user. As for the "magic" that happened when switching from vfat to ext3 and back I think that both file systems store their metadata in different places, so one doesn't necessarily get overwritten by the other. Not long ago I got someone's SD card from a camera (vfat) that had some strange encounter with Linux Mint. After that I could mount it as vfat and as ext3, both showing me the exactly same directory structure (except for lost+found), but I could only see the files when mounting it as vfat. I could only correct this by deleting and recreating the partition altogether. [1] http://wiki.maemo.org/Repartitioning...Docs_partition |
Re: Easy Debian Fremantle Beta Testing
Thank you, sulu. I will probably start a thread in the N900 or Fremantle forum, as some things are a little puzzling.
Your experience with that flash medium is illustrative, thanks. Everything seems to be working fine, however, so I will experiment further with my setup for now. This problem that I had with my N900 made me do some reading, and I realize now that I want to minimize the use of FAT32 in my N900. The swap of MyDocs and /home was an alternative I thought about. I also thought about just converting MyDocs to ext3 altogether, but because of the assumptions made by the N900 startup script machinery some hacking I'm not comfortable with at this point is involved. During my first firmware flash attempt I experimented. Converting MyDocs to ext3 will boot the N900, but it will do so in a very bizarre state, as the N900 will mount it as /home/opt, so all image resources like backgrounds, icons, fonts, etc will show as big "missing image" placeholders. Converting MyDocs to ext2 instead results in the dreaded reboot loop. Regarding using ED in a dedicated partition vs a file image, is there no performance incentive whatsoever to using it in its own partition? One of the reasons I decided to go with 2 additional ext3 partitions for Easy Debian is that after the problems I had, I don't like the idea of an ext3 image hosted in a FAT32 partition, as I think it can result in problems with the image itself when corruption in the host partition takes place (just a theory). I am already running Easy Debian from one of the dedicated 7GB partitions, and so far so good! :) |
Re: Easy Debian Fremantle Beta Testing
Quote:
But it is not necessary to have a dedicated partition for that chroot. All it needs is a folder on a file system that supports POSIX file permissions (like the ext filesystems but not vfat). Basically I could release ED "images" as simple tarballs containing only directories and files that users simply extract into a dedicated directory. The only reason I don't do this is because I assume that most people still have their big partition as vfat MyDocs and therefore require some POSIX-compatible overlay. I for one have three different chroots running at the moment: wheezy_armel, wheezy_armhf and jessie_armel Each of them sits in its own subdirectory (with these names) on my /home/user partition. |
Re: Easy Debian Fremantle Beta Testing
Excellent, thank you for the explanation. I do remember a conversation earlier with Estel and somebody else about using folders.
Since now I have 2 additional ext3 partitions (aside from the one I'm using right now for my current EasyDebian installation), I'll give this a try. I'm about to partition my external microSD card to set up FlopSwap. So far I have been running ED and the swap partition both from the internal eMMC. I'm interested in seeing if I can achieve any performance gains by having swap on microSD. **EDIT** After installing FlopSwap, and setting swap on microSD, LibreOffice Writer starts cold (no data in swap) in 24 seconds. This is vs 31 seconds in my previous configuration (EasyDebian ext3 image in MyDocs, swap in eMMC). Really nice! :) |
Re: Easy Debian Fremantle Beta Testing
Debian Jessie went into freeze on 5th of november and as anounced earlier I took this as a chance to build a first Easy Debian image based on it.
So here it is (reinob kindly uploaded the image to dropbox): https://www.dropbox.com/s/oxeppgy5n9....img.lzma?dl=0 md5sums: Code:
$ md5sum debian_jessie0sulu_armhf.img* root password: root btw I screwed up (again) with the nameserver in /etc/resolv.conf. Please see step 17 on how to fix it if you want to have network access from within the image. Also, I forgot to set libc6 and libc-bin on hold in this image. Please see step 14 on how to fix that on your own. For the most part the same instructions I put up for creating a wheezy image [1] still apply. However, there had to be some changes. I hope this covers the whole process: 1) As mentioned in [2] we need to patch glibc to accept Fremantle's 2.6.28 kernel. You'll need an armhf/armel system running at least kernel 2.6.32 to do all this, so doing it on the N900 itself is no longer an option. I did all of this on my Cubieboard2, which took about 6 hours. Once you have an image running you can create new patched glibc packages on the N900 (if the watchdog doesn't kill it). I would strongly advise against using qemu, at least if you're over 40 and want it done before you retire. If you need newer glibc packages and can't create them on your own drop me a note and I'll build them. But it may take a week or so. a) On a Debian Jessie armhf (or armel) system get the glibc sources Code:
apt-get source glibc change into the created folder and apply the following changes: Code:
Description: decrease min kernel version to 2.6.28 for Fremantle compatibility Code:
# diff -u libc6/glibc-2.19/debian/testsuite-checking/compare.sh.orig libc6/glibc-2.19/debian/testsuite-checking/compare.sh We need to tell dpkg that we changed the sources: Code:
dpkg-source --commit d) Now you can build the packages Code:
debuild -us -uc 2) While we're at it we can patch pulseaudio as well since it needs to use an older protocol version to be able to communicate with Fremantle's pulseaudio. a) get the sources Code:
apt-get source pulseaudio change to the folder and apply the patch from [3]: Code:
Description: decrease protocol version to 15 for Fremantle compatibility make changes known: Code:
dpkg-source --commit build the packages Code:
debuild -us -uc 3) Once this is done (or in parallel) we can create our image. a) create 2GB image file (adjust size if desired) Code:
dd if=/dev/zero of=/path/to/image_file bs=1M count=2048 format image file with ext2 (or ext3 etc.) Code:
mkfs.ext2 /path/to/image_file mount image Code:
mount -o loop /path/to/image_file /mountpoint 4) Then we install Debian via debootstrap a) install base system (if you ommit --arch debootstrap will use the host's architecture; chose the Debian mirror closest to your location [4]) Code:
debootstrap --arch=armhf jessie /mountpoint http://ftp.de.debian.org/debian create /mountpoint/etc/apt/sources.list with this content (again, chose your mirror) Code:
deb http://ftp.de.debian.org/debian jessie main (optional) disable default installation of recommended and suggested packages via these entries in /mountpoint/etc/apt/apt.conf Code:
APT::Install-Recommends "0"; 5) So far in the image /var/run is a symlink to /run. For pulseaudio and dbus to work we need this to be swapped (the missing /mountpoint in the last line is not a typo) Code:
rm -rf /mountpoint/var/run Code:
mkdir /mountpoint/var/pulse For the xserver to start we need this to be a directory again: Code:
rm /mountpoint/var/lock 6) replace the standard keyboard layout in the chroot with the N900 keyboard I usually do this by mounting my N900 to say /mnt/n900 and copying the whole directory directly from the device Code:
rm -rf /mountpoint/usr/share/X11/xkb/* 7) copy the self-built glibc and pulseaudio packages somewhere into the image. Usually you won't need all of them. In any case you'll need the libc6 package itself and the libc-bin package (in my case: libc6_2.19-12_armhf.deb and libc-bin_2.19-12_armhf.deb) and the pulseaudio and libpulse0 packages (pulseaudio_5.0-13_armhf.deb and libpulse0_5.0-13_armhf.deb). Everything else can either be taken from Debian directly or I didn't need it for my basic setup. You can also find all the binaries I created or used in this [5] binary archive. In earlier Easy Debian images we also installed libgtkstylus for tap&hold for right click support. This package isn't available in Jessie anymore but the Wheezy package [6] still works. So download it and put it where you put the self-compiled glibc and pulseaudio packages. There's another way of adressing this tap&hold issue via evdev that wicket used for DebiaN900 [7]. It's advantage is that it doesn't need deprecated packages and that it works for all applications, not only those written in Gtk+. It's downside is a lot of additional Xorg-related packages that would have to be installed. And I haven't fully understood how it works yet, mainly how to find out which devices have to be defined. Any assistance with this would be appreciated. 8) extra binaries a) you'll need these binaries for keyboard focus in the chroot (take them from the provided archive [5], an existing image you have, or compile them on your own; sources are here [8][9]) Code:
/sbin/qobi-wmhint-fix if you use the provided armel binaries on a armhf image you'll need this symlink (see [10]) Code:
ln -s /lib/ld-linux-armhf.so.3 /mountpoint/lib/ld-linux.so.3 additionally you'll need a script /usr/bin/startlxde1 that starts lxde on $DISPLAY :1 with this content: Code:
[ "x$GTK_MODULES" != x ] || export GTK_MODULES=libgtkstylus.so If you prefer (and installed) another desktop you can replace startlxde in the 2nd line (e.g. with startxfce4), this script however has to keep its name startlxde1 You can find this script in the binary archive at [5] as well. 9) chroot into the image Code:
mount -o bind /proc /mountpoint/proc 10) update apt and install additional required packages (add any packages you like) Code:
apt-get update 11) fix this locales warning we just received (adjust the locale if you wish; info from here [11]) Code:
export LANGUAGE=en_US.UTF-8 12) Up until Wheezy lxpolkit was a seperate package and it wasn't included in Easy Debian by default. With the switch to systemd in Jessie lxpolkit was moved into the lxsession package. Since we have no systemd in Easy Debian (and we can't get it running with this old kernel) lxpolkit will start, but bring up an annoying message box complaining about a missing PID every time we start Easy Debian. The easiest way of getting rid of this is to delete these files: Code:
/mountpoint/etc/xdg/autostart/lxpolkit.desktop 13) go to the folder you copied the packages to and replace Debian's glibc and pulseaudio packages with recompiled ones (either from the provided archive or your own ones) and install libgtkstylus Code:
dpkg -i libc6_2.19-12_armhf.deb libc-bin_2.19-12_armhf.deb pulseaudio_5.0-13_armhf.deb libpulse0_5.0-13_armhf.deb libgtkstylus_0.3-2_armhf.deb 14) make sure they won't be overwritten by future Debian updates (note: if you use synaptic you have to hold them there as well because synaptic doesn't care for what dpkg says) Code:
echo libc6 hold |dpkg --set-selections 15) also hold xkb-data (this is where the keyboard layout comes from) Code:
echo xkb-data hold |dpkg --set-selections Code:
echo lxsession hold |dpkg --set-selections 16) create a user account. Fremantle's "user" has the UID 29999, but Debian starts creating users by default with a UID of 1000. So we have to specify the UID explicitly. But before we do this we should make sure that the "users" group has the right GID as well. By default it has the GID 100 and is already created but we want it to be GID 29999. So altogether it looks like this Code:
delgroup users 17) Up to now your image most likely contains an /etc/resolv.conf with an entry like this, which under normal circumstances will prevent any network access from within the image: Code:
nameserver 192.168.1.254 Code:
nameserver 127.0.0.1 Finally I did some basic tests with the image. What works: I) gparted works (at least it doesn't crash right away) II) audacity works, but it needs some tweaking. On the N900 in Maemo you'll find these files: Code:
/sbin/ezchroot Code:
mount -o bind /dev "$CHROOT/dev" Code:
mount -o bind /dev/snd "$CHROOT/dev/snd" What does not work: I) It's the return of the gimp text tool crash that occured in Wheezy/armel but not armhf. With Jessie we have it in armhf too (I haven't checked Jessie/armel so far). If I start gimp from the image on my Cubieboard 2 it works. II) Everything udev-related won't work as udev now relies on systemd. I can't estimate what that means right now. [1] http://talk.maemo.org/showpost.php?p...postcount=3053 [2] http://talk.maemo.org/showpost.php?p...postcount=3030 [3] http://talk.maemo.org/showpost.php?p...6&postcount=34 [4] http://debgen.simplylinux.ch/ [5] http://www58.zippyshare.com/v/Bqm1uBWR/file.html (md5sum: d7e6f0bb49c3371fe2a5cc411b856322) [6] https://packages.debian.org/wheezy/libgtkstylus [7] http://talk.maemo.org/showthread.php?t=93878 [8] http://talk.maemo.org/showpost.php?p...4&postcount=23 [9] http://talk.maemo.org/showpost.php?p=425218&postcount=7 [10] http://talk.maemo.org/showpost.php?p...postcount=3040 [11] http://www.thomas-krenn.com/de/wiki/...d_unter_Debian |
Re: Easy Debian Fremantle Beta Testing
Thank you for your work and for your detailed exposition of what you have done, sulu! It is a great resource.
I will install your image in the next days and test. |
Re: Easy Debian Fremantle Beta Testing
It seems qole is on vacation or something.
Could someone else please host the image before it vanishes? |
All times are GMT. The time now is 23:22. |
vBulletin® Version 3.8.8