Invisrc | hey anyone here | 00:07 |
---|---|---|
mkarnicki | yeah, me :D | 00:14 |
mkarnicki | but i was also waiting for 'somebody' - it's rather silent here | 00:14 |
mkarnicki | so i'm idleing to see any discussions :) | 00:15 |
Invisrc | hey | 05:08 |
=== dereks_ is now known as dereks | ||
=== jamie_ is now known as JamieBennett | ||
awolfson | lool, Hi. I followed instructions on https://wiki.ubuntu.com/UbuntuDevelopment/Ports and created a full system emulation environment. What is the command to boot from created hda disk | 15:33 |
lool | awolfson: Did it install a kernel? | 16:15 |
lool | awolfson: Easiest: drop -initrd and add root=/dev/sda or sda1 do your -append | 16:16 |
awolfson | Installation finished, but how can I check? | 16:16 |
lool | awolfson: Most correct: write a script which loop-mounts the disk, copies the installed kernel and initrd out of it into the host, umounts, and boots this | 16:16 |
awolfson | lool, how boot command looks like, I did not find it in that wiki | 16:17 |
lool | awolfson: e.g. qemu-system-arm -M versatilepb -m 256 -cpu cortex-a8 -kernel vmlinuz -hda sda.qcow2 -append "mem=256M root=/dev/sda1" | 16:18 |
lool | awolfson: What's missing from the landscape here is a means to abstract this away from the user; that mean could be a wrapper script as I mention earlier, but you can try the above approach which should work but wont allow you to use an initrd for instance | 16:19 |
awolfson | qemu-system-arm -boot -M versatilepb -m 256 -cpu cortex-a8 -kernel EXTRACTED_KERNEL -initrd EXTRACTED_INITRD -hda sda.qcow2 -append "root=/dev/sda1 mem=256M" | 16:20 |
awolfson | lool, is it correct? | 16:20 |
lool | awolfson: That looks correct, yes; if you're using an initrd you can also use a more clever root= | 16:21 |
lool | awolfson: For instance, one can use UUIDs in root= for initrd boots, so you could use a fixed string referencing your root fs without mentionning the hardware device (sda) | 16:21 |
lool | awolfson: If you develop such a script, or want help developing one, I'm happy to assist | 16:21 |
lool | One way to mount partitioned devices is with losetup + kpartx | 16:22 |
lool | awolfson: There's also one completely different approach which is related to kexec, but that's another story | 16:22 |
awolfson | lool, how about GUI wrappers around QEMU - are they any good? | 16:22 |
lool | awolfson: But first, you should test with the manual command-line | 16:22 |
lool | awolfson: GUI is another topic; the way I'd propose to solve the GUI problem is by integrating the boot script into libvirt; libvirt allows you to define new types of virtual machines (e.g. "QEMU ARM machine") and how to boot them | 16:23 |
lool | awolfson: So we could add a libvirt config for this, and use the libvirt GUI tools (virt-viewer) | 16:23 |
awolfson | lool, Unfortuntely I don't know anything about libvirt :( | 16:24 |
lool | awolfson: So to recap, what I'd do if I were you now: a) test manually | 16:24 |
lool | b) automate extraction | 16:24 |
lool | c) look into libvirt integration | 16:24 |
lool | that's by increasing order of complexity | 16:24 |
lool | awolfson: It's ok, libvirt is what we use for all Ubuntu vms and containers stuff, it's well documented and in use in e.g. UEC | 16:25 |
lool | awolfson: But libvirt is quite high level still; first make sure things work for you :-) | 16:25 |
awolfson | lool, OK give me couple of hours, I need to finish something and will give a,b,c a try | 16:26 |
lool | awolfson: Great; ttyl | 16:27 |
awolfson | lool, One more question - do I need "-boot" in the command? | 16:27 |
lool | awolfson: No | 16:29 |
lool | awolfson: it starts the kernel when you pass -kernel | 16:29 |
lool | awolfson: -boot is for e.g. when you have a memory holder where the emulated BIOS can read your boot device i | 16:30 |
lool | id | 16:30 |
awolfson | lool, System boots up to the login: prompt. I created user ubuntu, passwd ubuntu user. It accepts it but just ends up with new login prompt | 16:53 |
awolfson | lool, I tried to loop mount sda.qcow2 but was not able to. fdisk -l sda.qcow2 reports no partition table. I guess it is normal | 16:54 |
lool | awolfson: Oh right, you're using a .qcow2, that's a bit more complex | 16:55 |
lool | awolfson: I didn't think of that when advising loop mounting | 16:55 |
lool | awolfson: So what's the error when you're logging in with ubuntu/ubuntu? | 16:56 |
lool | awolfson: Concerning loop-mounting, there are two ways: either use qemu-nbd (which will serve your QEMU disk image files -- whatever the format -- as nbd devices you can mount), or convert your image to raw (with qemu-img for instance0 | 16:57 |
awolfson | lool, there is no error it just goes back to login: after printing welcome message | 16:57 |
lool | awolfson: Problem of raw images is that they take a lot of space | 16:57 |
lool | awolfson: Something must be failing then | 16:57 |
lool | awolfson: You could pass "init=/bin/sh" on the -append line and debug from there | 16:58 |
awolfson | I can boot in single user mode by adding single to -append | 16:58 |
lool | awolfson: e.g. you could run "su - ubuntu" or check the system log from the shell it spawns | 16:58 |
awolfson | I tried it but there was nothing special in the log | 16:58 |
lool | awolfson: Did you check auth.log? | 16:59 |
lool | awolfson: You could try su - ubuntu, or even running a getty | 16:59 |
awolfson | lool, authentication failure for user ubuntu :( | 17:01 |
lool | awolfson: Are you sure you didn't mistype the password? | 17:01 |
lool | awolfson: Try changing it | 17:01 |
lool | (perhaps you mistyped it during install that is) | 17:01 |
awolfson | lool, I tried misstype the passwd - i am getting error message in that case. I am adduser from the root shell now | 17:02 |
awolfson | lool, I added ubuntu1 passwd ubuntu1 from the root shell - it goes to the login loop again | 17:04 |
awolfson | lool, You just install it like it is instructed in a wiki page and it worked? Right? | 17:04 |
lool | awolfson: I didn't actually try a full install, but that should work yes | 17:05 |
lool | awolfson: if it doesn't it's a bug, but it might not be trivial to debug remotely | 17:05 |
lool | awolfson: So if it says authentication failure, it sounds like a PAM-level issue; you could dive into PAM debug options | 17:06 |
awolfson | lool, BTW among other things, however unlikely - this is a network install - may be something wrong in initrd image | 17:06 |
awolfson | lool, I will return to it in couple of hours. I have single user console so it is probably not specifc to QEMU at that point | 17:07 |
lool | Ok | 17:08 |
lool | awolfson: If all else fails, upload your .qcow2 somewhere and I could take a look | 17:09 |
awolfson | lool, also I found how to mount qcow2 image (So far did not work for me) so may be I shall start from extracting initrd and kernel? | 17:10 |
awolfson | lool, qcow2 is 1.1G I could enable remote desktop on my laptop if necessary | 17:11 |
lool | awolfson: As you wish, but I'm at a customer site today and tomorrow, then hotel, then on leave | 17:12 |
lool | so hard for me to stay on line | 17:12 |
* lool disappears | 17:12 | |
awolfson | lool, OK i brb | 17:12 |
=== kung|away is now known as kung | ||
=== kung is now known as kung|away |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!