**** BEGIN LOGGING AT Mon Nov 18 02:59:59 2013 Nov 18 10:12:16 I would like to install ubuntu core rootfs on SD card. Basically, im following this instructions: https://wiki.ubuntu.com/Core/InstallationExample but i have problems with chrooting and installing the kernel because it is an armhf rootfs. Any ideas how i could bypass this problem? Nov 18 10:13:18 jcz, are you on a Ubuntu machine doing all this ? Nov 18 10:13:55 ogra_: yes Nov 18 10:13:56 then you can install qemu-user-static, that will set you up so you can chroot into arm cheroots (after copying one file into the chroot) Nov 18 10:15:19 install it, then copy /usr/bin/qemu-arm-static to the /usr/bin inside the chroot dir ... then try ot chroot, it should work Nov 18 10:17:02 ogra_: i will try it out now. BTW - how does this work with simply coping the binary? Does the package modify the chroot command to look for this file while chrooting? Nov 18 10:18:08 no, the package installs a binfmt handler for th kernel ... the kernel notices the binary is for arm and wraps every such binary into a call to qemu-arm-static Nov 18 10:18:44 ogra_: i think it worked :D thanks, really Nov 18 10:18:52 (the wrapper has the path hardcoded, so to make sure it still works after chrooting, the binary needs to be in the same place) Nov 18 10:19:17 ogra_: at least it managed to launch bash now Nov 18 10:19:39 there is a qemu-debootstrap too ... that you can use to build such chroots from scratch Nov 18 10:20:11 (that might be less cut down than ubuntu-core btw) Nov 18 10:21:34 ogra_: oh, ill check it out (dont know what debootstrap is yet) Nov 18 10:21:55 ogra_ i am kind of green in this stuff now Nov 18 10:22:08 we all were once ;) Nov 18 10:35:51 what is the difference between debootstrap, qemu-debootstrap and just unpacking ubuntu-core? debootstrap just downloads the image by itself and unpacks? Nov 18 10:37:27 ubuntu-core is a tarball of a chroot that was built using debootstrap .... Nov 18 10:38:28 and that qemu version? Nov 18 10:38:34 debootstrap istself can only build for a binary compatible architecture (i.e. x86 on amd64 machines) ... Nov 18 10:38:46 oh Nov 18 10:39:02 to build a chroot it needs to chroot itself into the new root and configure the packages ... Nov 18 10:39:03 so for arm i need qemu-debootstrap Nov 18 10:39:59 so if you want a foreign arch you can use debootstrap in two steps (using the --foreign switch) ... in the arm case it would be that the first step is run on your PC and the second would have to run on your arm board Nov 18 10:40:34 qemu-debootstrap now uses the above explained binfmt method to do both in one go Nov 18 10:40:56 sand on your PC ... preventing you from having to do the second half on real hardware Nov 18 10:41:09 s/sand/and/ Nov 18 10:42:17 but still i guess it doesnt install the kernel? I need to do this with chrooting and running dpkg -i ? Nov 18 10:42:39 right, debootstrap only builds root filesystems ... Nov 18 10:43:00 for kernel and bootloader setup you have to take care yourself Nov 18 10:43:52 (or use a prebuilt image if someone already took care of that step) Nov 18 11:38:27 i have openwrt on my arm device. When i try to chroot to a ubuntu armhf rootfs on sdcard i get a segfault. Any ideas why would that be? Does it have any connection with using the hard float version? Nov 18 11:39:14 i also tried booting ubuntu image on the device directly, and it failed.. Nov 18 11:39:40 im using linux-image-3.8.0-34-generic armhf kernel Nov 18 11:41:21 if you chroot into the sdcard, was it automounted ? Nov 18 11:41:43 i mounted it manually Nov 18 11:41:46 (note that udisks disables all binary execution on all automounted devices) Nov 18 11:42:01 hmm, then it should just work Nov 18 11:42:34 is there any way to see which program segfaults? Nov 18 11:42:42 * ogra_ has no idea if the generic armhf kernel can run on openwrt though ... you would have to ask in #ubuntu-kernel Nov 18 11:42:43 just the chroot or i dont know - bash? Nov 18 11:42:54 what is the exact error message ? Nov 18 11:43:06 yes, just the segmentation fault Nov 18 11:43:11 and is qemu-arm-static on the sd in /usr/bin/ ? Nov 18 11:43:19 in the rootfs? Nov 18 11:43:45 indeed Nov 18 11:43:53 yes, it is there Nov 18 11:44:01 if you chroot into the SD from the PC it needs to be there Nov 18 11:44:25 and the SD needs to have the right mount options so that binaries can be executed on it Nov 18 11:45:07 (if qou manually did a mount /dev/mmcblk* or /dev/sdX* on the cmdline, the defaults should usually be file) Nov 18 11:45:52 i did: mkdir /mnt/root; mount /dev/mmcblk0p2 /mnt/root Nov 18 11:45:56 and then chroot /mnt/root Nov 18 11:46:07 that should work then Nov 18 11:46:33 as long as qemu-arm-static is in /mnt/root/usr/bin/ Nov 18 11:46:54 do i need to use the qemu on arm board? Nov 18 11:47:05 it is already correct architecture Nov 18 11:47:25 no, thats only for chrooting on the PC Nov 18 11:48:20 on the board itself you should just get a proper bootloader and kernel setup and point the root= argument of the kernel commandline to the right device ... Nov 18 11:49:10 when booting, i use parameters: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 noinitrd Nov 18 11:49:20 and it just restarts the board after a while Nov 18 11:49:41 the image is properly loaded into the memory from sd card, the checksums are okay Nov 18 11:50:25 rootfstype should be autodetected by your kernel, it is obsolete ... you might want to add "rootwait" though so the system has enough time to initilize the SD card ... Nov 18 11:50:45 that might be the case... ill check it out in a sec Nov 18 11:51:06 are you sure that kernel works properly ? did you test it with some other rootfs before ? Nov 18 11:51:43 * ogra_ would always start porting to some board with a known working kernel and bootloader Nov 18 11:53:13 i didnt boot that kernel yet. I think it should work because it is the ubuntu already compiled kernel. The bootloader works properly on the board and boots other stuff. Nov 18 11:53:25 i downloaded it from ubuntu.packages.com Nov 18 11:55:44 argh, adding rootwait didnt help Nov 18 11:56:14 you are aware that the precompiled ubuntu arm kernels only work on a very limited amount of systems ? Nov 18 11:57:21 hmm, not really :/ so you are suggesting that i need to compile the kernel myself? Nov 18 11:57:26 (i think it is 4 or 5 boards for the generic kernel in 13.10, ask teh kernel team in #ubuntu-kernels which ones) Nov 18 11:57:31 err Nov 18 11:57:43 #ubuntu-kernel ... no "s" in the end Nov 18 12:14:39 i dont see why it doesnt even print anything at all, just restarts Nov 18 12:15:00 i suppose it could not work on the board, but at some point during boot or smth Nov 18 12:19:42 well, i would try with a known working kernel first Nov 18 12:19:52 (and bootloader) **** ENDING LOGGING AT Tue Nov 19 02:59:59 2013