Sergey Bugaev writes: Hello Sergey,
> On Wed, May 17, 2023 at 9:25 PM Janneke Nieuwenhuizen <jann...@gnu.org> wrote: > I've recently been doing this kind of debugging early boot-up process > *a lot*, so maybe I could provide some tips indeed. For getting more > lines of output, try console=com0 on gnumach cmdline, and run qemu > with -nographic -serial stdio or something like that. Now that was really a great help, thanks! It helped me (e)diff many different qemu runs: plain debian, debian+guix/pci-arbiter, debian+guix/pci-arbiter+guix/rumpdisk, plain guix, guix+debian/pci-arbiter, guix+debian/pci-arbiter+debian/rumpdisk... It was immediately obvious that the messages from rumpdisk were (nearly) identical. As the boot went silent at the end I assumed a crash or a hang in rumpdisk. After inspecting the diffs and seeing nothing really different, I noticed that I used -m 4096 for debian and -m 1024 for guix on the qemu command line. Do'h, turns out rumpdisk needs at least 1200MB... With https://gitlab.com/janneke/guix/-/tree/wip-hurd I've now succesfully been doing --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix system image -t hurd-raw gnu/system/examples/bare-hurd.tmpl cp /gnu/store/r5dpblnfsj08jh3hdmn8s6l9xaczwn65-disk-image guix.img sudo losetup -o $((512*2048)) /dev/loop0 guix.img sudo mount /dev/loop0 /mnt edit /mnt/boot/grub/grub.cfg, adding console=com0 sudo umount /mnt --8<---------------cut here---------------end--------------->8--- and then --8<---------------cut here---------------start------------->8--- guix shell qemu -- qemu-system-i386 \ -m 4096 \ --enable-kvm \ --device rtl8139,netdev=net0 \ --netdev user,id=net0,hostfwd=tcp:0.0.0.0:11022-:2222 \ --snapshot \ --no-reboot \ --device virtio-serial-pci \ --nographic \ --serial mon:stdio \ --hda r5dpblnfsj08jh3hdmn8s6l9xaczwn65-disk-image+CONSOLE=COM0 --8<---------------cut here---------------end--------------->8--- Just for fun, find the succesful log attached. Is there a way to pass the "console=com0" argument from the QEMU command line? That would be nice! > Other than that, just attach gdb and see what it crashes on? Like this: > > $ gdb /path/to/gnumach > (gdb) tar rem :1234 > (gdb) b i386_exception > (gdb) b task_terminate > (gdb) b Panic > (gdb) add-symbol-file /path/to/rumpdisk.static > blah-blah (y/n?) y > (gdb) c [..] Ah, I had no idea; this is so helpful. Maybe a good idea to have this on the website/wiki, right? Greetings, Janneke
guix-glibc.log
Description: Binary data
-- Janneke Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com