Bug 2022757

Summary: anaconda appending console= is problematic
Product: [Fedora] Fedora Reporter: Dennis Gilmore <dennis>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: anaconda-maint-list, davdunc, dgilmore, jonathan, kellin, ngompa13, pbrobinson, pwhalen, tom.rini, vanmeeuwen+fedora, vponcova, w
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-08 14:08:38 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: 245418    

Description Dennis Gilmore 2021-11-12 14:19:24 UTC
Description of problem:
anaconda in a recent release started appending a console= line to grub boot arguments,  this is highly problematic in some use cases, particularly in the armhfp and AArch64 images that fedora provides. It is problematic because all arm systems have console information built into the devicetree files and ACPI tables that will set up serial consoles as well as framebuffer when it exists. some systems will never boot due to the lack of a framebuffer, others the user wants to use over the serial console and adding a console line excluding the serial console disables it.  Anaconda should not be adding a console= line to the default bootargs

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ben Cotton 2022-02-08 21:28:14 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Vendula Poncova 2022-02-11 11:16:09 UTC
Please, attach all files with installation logs, especially the file named syslog. You can find them during the installation in /tmp or on the installed system in /var/log/anaconda/.

Comment 3 Dennis Gilmore 2022-02-15 18:15:25 UTC
if you want to poke at an install you can get a disk image from https://dl.fedoraproject.org/pub/fedora/linux/development/36/Spins/aarch64/images/ the images are produced in Virtual Machines during the Release compose process. they are designed to be run on any machine after install. I can not attach the syslog file as it is too big

Comment 4 Dennis Gilmore 2022-02-15 18:19:05 UTC
grep console /mnt/var/log/anaconda/syslog 
18:39:27,288 INFO kernel:ACPI: SPCR: console: pl011,mmio,0x9000000,9600
18:39:27,289 NOTICE kernel:Kernel command line: inst.method=https://kojipkgs.fedoraproject.org/compose/branched/Fedora-36-20220214.n.1/compose/Everything/aarch64/os/ inst.ks=file:/ks.cfg console=ttyAMA0 console=tty0 initrd=initrd
18:39:27,290 INFO kernel:printk: console [tty0] enabled
18:39:27,291 INFO kernel:fbcon: Taking over console
18:39:27,292 INFO kernel:printk: console [ttyAMA0] enabled
18:39:27,377 INFO systemd:Starting systemd-vconsole-setup.service - Setup Virtual Console...
18:39:27,410 INFO systemd:Finished systemd-vconsole-setup.service - Setup Virtual Console.
18:39:27,412 NOTICE audit:SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-vconsole-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
18:39:27,419 NOTICE kernel:audit: type=1130 audit(1644863967.400:4): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-vconsole-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
18:39:27,512 INFO dracut-cmdline:Using kernel command line parameters:  rd.driver.pre=btrfs   inst.method=https://kojipkgs.fedoraproject.org/compose/branched/Fedora-36-20220214.n.1/compose/Everything/aarch64/os/ inst.ks=file:/ks.cfg console=ttyAMA0 console=tty0 initrd=initrd
18:39:33,285 INFO systemd:systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch was skipped because of a failed condition check (ConditionPathExists=!/run/plymouth/pid).
18:39:56,878 INFO systemd:systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch was skipped because of a failed condition check (ConditionPathExists=!/run/plymouth/pid).
18:40:18,238 WARNING org.fedoraproject.Anaconda.Modules.Localization:DEBUG:anaconda.modules.localization.localization:Virtual console keymap is set to .
18:40:18,327 WARNING org.fedoraproject.Anaconda.Modules.Localization:DEBUG:anaconda.modules.localization.localization:Virtual console keymap is set to us.
18:40:18,628 WARNING org.fedoraproject.Anaconda.Modules.Localization:DEBUG:anaconda.modules.localization.localization:Virtual console keymap is set to us.
18:41:55,014 WARNING org.fedoraproject.Anaconda.Modules.Localization:DEBUG:anaconda.modules.localization.localization:Virtual console keymap is set to us.
18:46:21,758 WARNING org.fedoraproject.Anaconda.Modules.Storage:INFO:anaconda.modules.storage.bootloader.grub2:bootloader.py: used boot args: rhgb quiet console=tty0

Comment 5 Dennis Gilmore 2022-02-15 18:35:08 UTC
https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/modules/storage/bootloader/base.py#L955-L965 is the problematic code. 

/mnt/var/log/anaconda/syslog:18:40:23,090 WARNING org.fedoraproject.Anaconda.Modules.Storage:DEBUG:anaconda.modules.storage.bootloader.base:Console is set to tty0 with options ''
/mnt/var/log/anaconda/journal.log:Feb 14 18:40:23 fedora org.fedoraproject.Anaconda.Modules.Storage[1896]: DEBUG:anaconda.modules.storage.bootloader.base:Console is set to tty0 with options ''
/mnt/var/log/anaconda/storage.log:DEBUG:anaconda.modules.storage.bootloader.base:Console is set to tty0 with options ''

is the output logged from that code, however, adding any for of console= option is broken

Comment 6 Vendula Poncova 2022-02-22 14:26:37 UTC
Hi, Anaconda propagates the `console` option that was specified during the boot of the boot.iso. We haven't touched this code, so I guess someone changed the boot options of the boot.iso and added the `console=ttyAMA0 console=tty0` options.

Comment 7 Vendula Poncova 2022-03-08 14:08:38 UTC
I am closing the bug based on the comment 6.