[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] EFI boot unsuccessful with Ubuntu 18.04 dom0



I set out two goals: 1) to monitor via a serial port (serial on Linux to USB on Windows with the StarTech.com 1 Port FTDI USG to RS232 Serial Null MOdem Adapter Cable -- puchased at Amazon), and 2) monitor xen boot-up via serial port.

I was able to plug in and monitor using PuTTY on Windows, but when the initramfs kicked in, nothing appeared on my serial port.  I could see Grub, the EFI shell.  So I disengaged framebuffer support in my kernel (setting console display driver support-->framebuffer to empty) and recompile, then I started seeing the output of the initramfs.

My regular Linux kernel line (at https://pastebin.com/W3ASmFtv for 30 days)  is this:

        echo    'Loading Linux x86_64-4.19.23-gentoo ...'
        linux   /kernel-genkernel-x86_64-4.19.23-gentoo root=/dev/sda4 ro console=tty0 console=ttyS0,115200n8 showopts noquiet log_buf_len=10M print_fatal_signals=1 earlyprintk=vga,keep debug loglevel=8
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-genkernel-x86_64-4.19.23-gentoo

My xen kernel line is this:


multiboot       /xen.gz placeholder      vga=gfx-1920x1080x16    com1=115200,8n1,pci console=com1,vga console_timestamps console_to_ring conring_size=64         log_buf_len=16M         loglvl=all guest_loglvl=all sync_console=true sched_debug iommu=verbose apic_verbosity=verbose           ${xen_rm_opts}

        echo    'Loading Linux x86_64-4.19.23-gentoo ...'
        module  /kernel-genkernel-x86_64-4.19.23-gentoo placeholder root=/dev/sda4 ro softlevel=xen      video=vesa:off video=efifb:1024x768     xencons=xvc console=tty0 console=hvc0   showopts noquiet log_buf_len=10M print_fatal_signals=1  earlyprintk=xen,keep debug loglevel=8
        echo    'Loading initial ramdisk ...'

        module  --nounzip   /initramfs-genkernel-x86_64-4.19.23-gentoo

Select portion of my /etc/default/grub (full file at https://pastebin.com/Ctuug0xk for 30 days) are:

================== start =================

# Uncomment to disable graphical terminal (grub-pc only)
# 3/3/19 jlpoole: uncommented below; added "serial" as 2nd parameter
#
GRUB_TERMINAL="console serial"
#
# 3/3/19 jlpoole: added line below because running
#    grub-mkconfig -o /boot/grub/grub.cfg
# caused:
# Warning: Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.
#
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
...

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
# 3/3/19 jlpoole: uncommented below
GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
# 3/3/19 jlpoole: uncommented below
GRUB_DISABLE_RECOVERY=true
...

GRUB_CMDLINE_LINUX_XEN_REPLACE="softlevel=xen \
        video=vesa:off video=efifb:1024x768 \
        xencons=xvc console=tty0 console=hvc0 \
        showopts noquiet log_buf_len=10M print_fatal_signals=1 \
        earlyprintk=xen,keep debug loglevel=8 \
       "
GRUB_GFXMODE=auto
GRUB_GFXPAYLOAD_LINUX="keep"
GRUB_TERMINAL_INPUT="console serial"
GRUB_TERMINAL_OUTPUT="gfxterm serial"
GRUB_CMDLINE_XEN=" \
        vga=gfx-1920x1080x16 \
        com1=115200,8n1,pci console=com1,vga console_timestamps console_to_ring conring_size=64 \
        log_buf_len=16M  \
        loglvl=all guest_loglvl=all sync_console=true sched_debug iommu=verbose apic_verbosity=verbose \
       "zeta /home/jlpoole #
======================= end ======================

Observations:
-  I found that if I go into edit mode in Grub form the serial console running on Windows 7 using PuTTY, things go screwy.  I'm using 115200 baud.  If I want to edit grub at the commencement of a boot using the editor in grub, I have to do so with the keyboard and screen attached to the server. 
-  Under  the current setup, initramfs only shows up in the serial console, not on the screen connected to the server
- I see some doubling up of messages on the console before the initramfs output
- Sometimes the connection goes dead, I am using an extension cord, 10 feet?, from the server to my Windows box.
- The recent posting in this newsgroup of PGNet Dev on 2/27/2019, 5:29 AM was essential to my success, I was getting desperate, so I copied the values from that email and voila... I had my first successful boot to "login:"  (Thank you PGNet DEV!!!)
- using debug causes two drop-in shells where you have to type "exit" + enter to return to normal processing
- I've posted another topic on this forum entitled "Boot Sometimes Hangs At "masked EXTINT" (Varies)" and I'm not certain my problem is the kernel stopping, or my serial port.  I'm pretty sure it's the kernel.
- I spent well over 20 hours to get to this point
- the documentation on some of the xen helped give me insight: http://xenbits.xen.org/docs/unstable/misc/xen-command-line.html#dbgp but I found some explanations hard to understand (too concise?)

John

On 2/27/2019 3:50 AM, Enrique Sainz Baixauli wrote:
Thanks PGNet Dev and Mr. Poole for your answers.

So, it seems that console=vga,com1 is not enough to show the boot process output on screen and we need a serial cable to debug, is that correct? If so, I will wait for Mr. Poole's feedback. FWIW, I also tried console=vga (without com1) and the screen was as blank as before.

However, I am concerned about the different versions of "everything" we have, most importantly Xen. I am using 4.9 because that's what's being shipped with Ubuntu, but if PGNet Dev's issue is the same as mine, the issue exists at least in 4.9 and in 4.12. And I guess Mr. Poole is using gentoo's stable xen package, which is 4.10.2 (https://packages.gentoo.org/packages/app-emulation/xen).

What I mean is, has no one noticed this before or are we all doing something wrong? Or did this issue come with a kernel update instead of xen?

Again, thanks everyone for reading and adding whatever info you may find useful.

Cheers!

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users
--

John Laurence Poole
1566 Court ST NE
Salem OR 97301-4241
707-812-1323 office

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.