Bug 198310

Summary: buildinstall generates bad keymaps when run on machine with serial console
Product: [Fedora] Fedora Reporter: Alexander Dupuy <alex.dupuy>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-11 00:58:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for readmap.c in anaconda source none

Description Alexander Dupuy 2006-07-11 00:32:16 UTC
Description of problem:

If you attempt to update the installation second-stage boot images on a machine
that has a serial port as the system console, the /usr/lib/anaconda-runtime
readmap program tries to read the current keymap with a KDGKBENT ioctl on
/dev/console.  While that will work when the system console is a VGA+KBD tty, it
fails when the system console is a serial port (like /dev/ttyS0).  As a result,
the second stage boot images will not work correctly, and an attempt to install
them will fail with an error message like "Failed to read keymap info: Success"

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

anaconda-11.0.5-1

How reproducible:

Every time

Steps to Reproduce:
1.set GRUB configuration to boot with serial console "console=ttyS0" and reboot
2.install anaconda and ISO contents; run buildinstall and update install stage2
3.try installation using VGA+KBD console
  
Actual results:

installation displays error message in dialog box

    Failed to read keymap info: Success

(however, after clicking on OK button and continuing, installation appears to
complete successfully

Expected results:

No strange and confusing error message, just the installation screens.

Additional info:

The following patch eliminates this problem (also attached):

--- anaconda-11.0.5/utils/readmap.c.keymaps     2004-05-20 15:00:00.000000000 -
0400
+++ anaconda-11.0.5/utils/readmap.c     2006-07-10 19:45:35.000000000 -0400
@@ -31,9 +31,9 @@

     memset(keymaps, 0, sizeof(keymaps));

-    console = open("/dev/console", O_RDWR);
+    console = open("/dev/tty0", O_RDWR);
     if (console < 0) {
-       perror("open console");
+       perror("open VGA+KBD console");
        exit(1);
     }

Comment 1 Alexander Dupuy 2006-07-11 00:32:16 UTC
Created attachment 132213 [details]
patch for readmap.c in anaconda source

Comment 2 Jeremy Katz 2006-07-11 00:58:06 UTC
Committed to CVS, thanks