Bug 1102482

Summary: OSTree qcow2 image should enable serial console to log boot messages
Product: [Retired] Atomic Reporter: Kashyap Chamarthy <kchamart>
Component: ostreeAssignee: Colin Walters <walters>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jlebon, jzb, kbsingh, ljozsa, riehecky
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-19 20:53:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1147383    

Description Kashyap Chamarthy 2014-05-29 04:25:24 UTC
Description
-----------

Importing an OSTree qcow2 disk image into libvirt, and booting it via
serial console, boot messages are not logged to serial console -- as its
not enabled by default.


How reproducible: Consistently.


Steps to Reproduce
------------------

1. Get the image:

    $ wget -c \
    http://rpm-ostree.cloud.fedoraproject.org/project-atomic/images/f20/qemu/20140414.1.qcow2.xz

2. Uncompress it:

    $ xz -d 20140414.1.qcow2.xz

3. Import the image into libvirt via `virt-install`:

    $ virt-install --name atomic --ram 2048 --disk \
    path=/home/kashyapc/20140414.1.qcow2 --import


Actual results
--------------

Boot messages are not logged to serial console:

    $ virt-install --name atomic --ram 2048 --disk \
    path=/home/kashyapc/20140414.1.qcow2 --import
    Connected to domain atomic
    Escape character is ^]



Expected results
----------------

Serial console should be enabled, so that boot messages can be logged to
it.


Additional info
---------------

Examine the syslinux.cfg of OSTree to find the Kernel parameter:

    $ guestmount -a /home/kashyapc/20140414.1.qcow2 -m /dev/sda3:/ \
      -m /dev/sda1:/boot /mnt

    $ cat /mnt/boot/syslinux/syslinux.cfg
    TIMEOUT 20
    PROMPT 1

    DEFAULT ostree:project-atomic-controller:0 Generic 20 (Generic)
    LABEL ostree:project-atomic-controller:0 Generic 20 (Generic)
            KERNEL /ostree/project-atomic-controller-1047236d41809791839b433123d1d2c504c1080513afde32edb2595f4618e5f4/vmlinuz-3.13.9-200.fc20.x86_64
            INITRD /ostree/project-atomic-controller-1047236d41809791839b433123d1d2c504c1080513afde32edb2595f4618e5f4/initramfs-3.13.9-200.fc20.x86_64.img
            APPEND root=UUID=d230f7f0-99d3-4244-8bd9-665428054831 quiet ostree=/ostree/boot.1/project-atomic-controller/1047236d41809791839b433123d1d2c504c1080513afde32edb2595f4618e5f4/0

Comment 1 Jonathan Lebon 2016-02-19 20:53:21 UTC
This should work now. Using the latest Fedora Atomic 23 image
currently available at <https://getfedora.org>:

$ qemu-img create -f qcow2 -o backing_file="Fedora-Cloud-Atomic-23-20160127.2.x86_64.qcow2" f23-atomic-tmp.qcow2
$ virt-install --name f23-atomic-tmp --ram 2048 --disk path=f23-atomic-tmp.qcow2 --import --os-variant fedora21 --graphics none

Starting install...
Creating domain...                                                                            |    0 B  00:00:00     
Connected to domain f23-atomic-tmp
Escape character is ^]
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.3.3-301.fc23.x86_64 (mockbuild.fedoraproject.org) (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) ) #1 SMP Fri Jan 15 14:03:17 UTC 2016
[    0.000000] Command line: BOOT_IMAGE=/ostree/fedora-atomic-92beeb5919e16e90a70fa49466521cdaf19c7fb58e47bd6ab0465cc8999050c4/vmlinuz no_timer_check console=tty1 console=ttyS0,115200n8 console=ttyS1 rd.lvm.lv=atomicos/root root=/dev/mapp
er/atomicos-root ostree=/ostree/boot.0/fedora-atomic/92beeb5919e16e90a70fa49466521cdaf19c7fb58e47bd6ab0465cc8999050c4/0

<snip>

Welcome to Fedora 23 (Twenty Three)!

...