=== doko_ is now known as doko
=== mythos_ is now known as mythos
=== panda|x201 is now known as panda|w530
jczI 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:12
ogra_jcz, are you on a Ubuntu machine doing all this ?10:13
jczogra_: yes10:13
ogra_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:13
ogra_install it, then copy /usr/bin/qemu-arm-static to the /usr/bin inside the chroot dir ... then try ot chroot, it should work10:15
jczogra_: 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:17
ogra_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-static10:18
jczogra_: i think it worked :D thanks, really10:18
ogra_(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:18
jczogra_: at least it managed to launch bash now10:19
ogra_there is a qemu-debootstrap too ... that you can use to build such chroots from scratch10:19
ogra_(that might be less cut down than ubuntu-core btw)10:20
jczogra_: oh, ill check it out (dont know what debootstrap is yet)10:21
jczogra_ i am kind of green in this stuff now10:21
ogra_we all were once ;)10:22
jczwhat is the difference between debootstrap, qemu-debootstrap and just unpacking ubuntu-core?  debootstrap just downloads the image by itself and unpacks?10:35
ogra_ubuntu-core is a tarball of a chroot that was built using debootstrap ....10:37
jczand that qemu version?10:38
ogra_debootstrap istself can only build for a binary compatible architecture (i.e. x86 on amd64 machines) ...10:38
ogra_to build a chroot it needs to chroot itself into the new root and configure the packages ...10:39
jczso for arm i need qemu-debootstrap10:39
ogra_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 board10:39
ogra_qemu-debootstrap now uses the above explained binfmt method to do both in one go10:40
ogra_sand on your PC ... preventing you from having to do the second half on real hardware10:40
jczbut still i guess it doesnt install the kernel? I need to do this with chrooting and running dpkg -i ?10:42
ogra_right, debootstrap only builds root filesystems ...10:42
ogra_for kernel and bootloader setup you have to take care yourself10:43
ogra_(or use a prebuilt image if someone already took care of that step)10:43
=== 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
jczi 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:38
jczi also tried booting ubuntu image on the device directly, and it failed..11:39
jczim using linux-image-3.8.0-34-generic armhf kernel11:39
ogra_if you chroot into the sdcard, was it automounted ?11:41
jczi mounted it manually11:41
ogra_(note that udisks disables all binary execution on all automounted devices)11:41
ogra_hmm, then it should just work11:42
jczis 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-kernel11:42
jczjust the chroot or i dont know - bash?11:42
ogra_what is the exact error message ?11:42
jczyes, just the segmentation fault11:43
ogra_and is qemu-arm-static on the sd in /usr/bin/ ?11:43
jczin the rootfs?11:43
jczyes, it is there11:43
ogra_if you chroot into the SD from the PC it needs to be there11:44
ogra_and the SD needs to have the right mount options so that binaries can be executed on it11:44
ogra_(if qou manually did a mount /dev/mmcblk* or /dev/sdX* on the cmdline, the defaults should usually be file)11:45
jczi did: mkdir /mnt/root; mount /dev/mmcblk0p2 /mnt/root11:45
jczand then chroot /mnt/root11:45
ogra_that should work then11:46
ogra_as long as qemu-arm-static is in /mnt/root/usr/bin/11:46
jczdo i need to use the qemu on arm board?11:46
jczit is already correct architecture11:47
ogra_no, thats only for chrooting on the PC11:47
ogra_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:48
jczwhen booting, i use parameters: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 noinitrd11:49
jczand it just restarts the board after a while11:49
jczthe image is properly loaded into the memory from sd card, the checksums are okay11:49
ogra_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
jczthat might be the case... ill check it out in a sec11:50
ogra_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:51
jczi 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
jczi downloaded it from ubuntu.packages.com11:53
jczargh, adding rootwait didnt help11:55
ogra_you are aware that the precompiled ubuntu arm kernels only work on a very limited amount of systems ?11:56
jczhmm, not really :/ so you are suggesting that i need to compile the kernel myself?11:57
ogra_(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
ogra_#ubuntu-kernel ... no "s" in the end11:57
jczi dont see why it doesnt even print anything at all, just restarts12:14
jczi suppose it could not work on the board, but at some point during boot or smth12:15
ogra_well, i would try with a known working kernel first12:19
ogra_(and bootloader)12:19
=== 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

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!