=== doko_ is now known as doko === mythos_ is now known as mythos === panda|x201 is now known as panda|w530 [10:12] 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? [10:13] jcz, are you on a Ubuntu machine doing all this ? [10:13] ogra_: yes [10:13] 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) [10:15] install it, then copy /usr/bin/qemu-arm-static to the /usr/bin inside the chroot dir ... then try ot chroot, it should work [10:17] 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? [10:18] 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 [10:18] ogra_: i think it worked :D thanks, really [10:18] (the wrapper has the path hardcoded, so to make sure it still works after chrooting, the binary needs to be in the same place) [10:19] ogra_: at least it managed to launch bash now [10:19] there is a qemu-debootstrap too ... that you can use to build such chroots from scratch [10:20] (that might be less cut down than ubuntu-core btw) [10:21] ogra_: oh, ill check it out (dont know what debootstrap is yet) [10:21] ogra_ i am kind of green in this stuff now [10:22] we all were once ;) [10:35] what is the difference between debootstrap, qemu-debootstrap and just unpacking ubuntu-core? debootstrap just downloads the image by itself and unpacks? [10:37] ubuntu-core is a tarball of a chroot that was built using debootstrap .... [10:38] and that qemu version? [10:38] debootstrap istself can only build for a binary compatible architecture (i.e. x86 on amd64 machines) ... [10:38] oh [10:39] to build a chroot it needs to chroot itself into the new root and configure the packages ... [10:39] so for arm i need qemu-debootstrap [10:39] 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 [10:40] qemu-debootstrap now uses the above explained binfmt method to do both in one go [10:40] sand on your PC ... preventing you from having to do the second half on real hardware [10:41] s/sand/and/ [10:42] but still i guess it doesnt install the kernel? I need to do this with chrooting and running dpkg -i ? [10:42] right, debootstrap only builds root filesystems ... [10:43] for kernel and bootloader setup you have to take care yourself [10:43] (or use a prebuilt image if someone already took care of that step) === chihchun is now known as chihchun_afk === dewdgang_ is now known as dewdgang_frank === dewdgang_frank is now known as frankie_ === frankie_ is now known as frank1e [11:38] 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? [11:39] i also tried booting ubuntu image on the device directly, and it failed.. [11:39] im using linux-image-3.8.0-34-generic armhf kernel [11:41] if you chroot into the sdcard, was it automounted ? [11:41] i mounted it manually [11:41] (note that udisks disables all binary execution on all automounted devices) [11:42] hmm, then it should just work [11:42] is there any way to see which program segfaults? [11:42] * ogra_ has no idea if the generic armhf kernel can run on openwrt though ... you would have to ask in #ubuntu-kernel [11:42] just the chroot or i dont know - bash? [11:42] what is the exact error message ? [11:43] yes, just the segmentation fault [11:43] and is qemu-arm-static on the sd in /usr/bin/ ? [11:43] in the rootfs? [11:43] indeed [11:43] yes, it is there [11:44] if you chroot into the SD from the PC it needs to be there [11:44] and the SD needs to have the right mount options so that binaries can be executed on it [11:45] (if qou manually did a mount /dev/mmcblk* or /dev/sdX* on the cmdline, the defaults should usually be file) [11:45] i did: mkdir /mnt/root; mount /dev/mmcblk0p2 /mnt/root [11:45] and then chroot /mnt/root [11:46] that should work then [11:46] as long as qemu-arm-static is in /mnt/root/usr/bin/ [11:46] do i need to use the qemu on arm board? [11:47] it is already correct architecture [11:47] no, thats only for chrooting on the PC [11:48] 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 ... [11:49] when booting, i use parameters: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 noinitrd [11:49] and it just restarts the board after a while [11:49] the image is properly loaded into the memory from sd card, the checksums are okay [11:50] 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 ... [11:50] that might be the case... ill check it out in a sec [11:51] are you sure that kernel works properly ? did you test it with some other rootfs before ? [11:51] * ogra_ would always start porting to some board with a known working kernel and bootloader [11:53] 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. [11:53] i downloaded it from ubuntu.packages.com [11:55] argh, adding rootwait didnt help [11:56] you are aware that the precompiled ubuntu arm kernels only work on a very limited amount of systems ? [11:57] hmm, not really :/ so you are suggesting that i need to compile the kernel myself? [11:57] (i think it is 4 or 5 boards for the generic kernel in 13.10, ask teh kernel team in #ubuntu-kernels which ones) [11:57] err [11:57] #ubuntu-kernel ... no "s" in the end [12:14] i dont see why it doesnt even print anything at all, just restarts [12:15] i suppose it could not work on the board, but at some point during boot or smth [12:19] well, i would try with a known working kernel first [12:19] (and bootloader) === psivaa is now known as psivaa-lunch === chrisccoulson is now known as notchrisccoulson === psivaa-lunch is now known as psivaa === notchrisccoulson is now known as chrisccoulson === fly-away is now known as xaoser