Bug 826612

Summary: Problems editing the commands
Product: [Fedora] Fedora Reporter: Piotr Golonka <piotr>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: bcl, dennis, mads, pjones, stanley.king, stephent98
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: 2013-08-01 08:53:18 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:
Attachments:
Description Flags
grub.cfg for which the problem persisits
none
screenshot showing typed characters one line above cursor none

Description Piotr Golonka 2012-05-30 15:37:19 UTC
Description of problem:
When trying to edit the commands (parameters) for the boot of my previous installation (Fedora 16, in another partition), the cursor behaves in a "strange" way when trying to edit a line with a long list of parameters: the cursor jumps to the next line (while still the new characters go to the previous), etc. Ultimately, pressing the backspace at the end of the very long line makes GRUB2 freeze (need a reboot - does not react to ESC or Ctrl-x, or F10, or anything else)


Version-Release number of selected component (if applicable):
GNU GRUB version 2.00~beta64

How reproducible:
in the main grub menu, select a line, press the "e" (to enter the command-editing mode), and start to navigate using cursor keys. Go to the end of the long line, and press the "Backspace" key...

Steps to Reproduce:
(see above)
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
A screen with 1920x1280 resolution;

Comment 1 Mads Kiilerich 2012-05-30 18:58:46 UTC
Please show the output of 'rpm -q grub2', and please make sure that you see the same problem after 'grub2-install /dev/sdX' and 'grub2-mkconfig -o /boot/grub2/grub.cfg'.

Does it make any difference which entries you are editing?

Comment 2 Piotr Golonka 2012-05-31 06:57:57 UTC
Hi there,

rpm -q grub2
gives grub2-2.0-0.25.beta4.fc17.x86_64

grub2-mkconfig did not really affect /boot/grub2/grub.cfg (I preserved the previous version, and then made a diff - all it did was to remove my Windows boot).

Obviously I did grub2-install as well.

I also tried to edit the grub.cfg so that to "shorten" the line where the editing fails - it did not help either...

I checked that the problem occurs on practically all entries that I have in my menu...

I will try to attach my grub.conf

Comment 3 Piotr Golonka 2012-05-31 07:09:46 UTC
Created attachment 587954 [details]
grub.cfg for which the problem persisits

Comment 4 Mads Kiilerich 2012-05-31 12:05:16 UTC
Confirmed. Small problems in text mode, bigger and fatal problems in video mode.

Comment 5 Vladimir Serbinenko 2012-06-01 11:59:00 UTC
It's fixed by following 2 commits together:
------------------------------------------------------------
revno: 4212
committer: Vladimir 'phcoder' Serbinenko <phcoder>
branch nick: grub
timestamp: Sat 2012-04-07 20:11:04 +0200
message:
        * grub-core/normal/charset.c (grub_ucs4_to_utf8): Return number of
        written bytes.
        (grub_get_num_of_utf8_bytes): New function.
        (grub_ucs4_to_utf8_alloc): Use grub_get_num_of_utf8_bytes.
        * grub-core/normal/menu_entry.c (run): Convert entry to UTF-8 before
        executing it.
        * include/grub/charset.h (grub_get_num_of_utf8_bytes): New proto.
        (grub_ucs4_to_utf8): Change return type.
------------------------------------------------------------
revno: 4184
committer: Vladimir 'phcoder' Serbinenko <phcoder>
branch nick: grub
timestamp: Tue 2012-03-27 17:07:26 +0200
message:
        Fix tab and wide character handling in editor and menu.
  
        * grub-core/normal/charset.c (grub_unicode_aglomerate_comb): Don't
        agglomerate control characters with combining marks.
        (bidi_line_wrap): Allow break on tab.
        (grub_unicode_get_comb_start): New function.
        * grub-core/normal/menu_entry.c: Restructure to handle wide characters
        and tab correctly.
        * grub-core/normal/menu_text.c (print_entry): Replace \n, \r, \b and \e
        with a space.
        * grub-core/normal/term.c (print_ucs4_terminal): New argument
        fixed_tab_size. All users updated.
        * include/grub/term.h (GRUB_TERM_TAB_WIDTH): New const.
        (grub_term_getcharwidth): Handle \t.
        * include/grub/unicode.h (grub_unicode_glyph_dup): Fix allocation
        and copy.

Comment 6 Mads Kiilerich 2012-06-03 15:08:27 UTC
These patches are included in the unofficial beta6 scratch build on http://koji.fedoraproject.org/koji/taskinfo?taskID=4121699

Please give it a try and see if it solves your problem.
Install grub2 and grub2-tools rpms,
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg

Comment 7 Piotr Golonka 2012-06-04 14:25:07 UTC
It does not help - sorry...
I tried the x86_64 taken from the x86_64 subtask ie.
http://koji.fedoraproject.org/koji/taskinfo?taskID=4121701

the symptoms are still the same.

I tried with the config file that was freshly generated by grub2-mkconfig as well as with my manually-edited /boot/grub2/grub.cfg , and the config file that I originally submitted as the attachment 587954 [details] .

Please, let me know if you had something new to test. I will try to check the new version once it is available...

kind regards,
 Piotr

Comment 8 Vladimir Serbinenko 2012-06-04 14:27:19 UTC
Following 4 commits should help:

revno: 4410
committer: Vladimir 'phcoder' Serbinenko <phcoder>
branch nick: grub
timestamp: Sat 2012-06-02 14:46:22 +0200
message:
        * grub-core/normal/menu_entry.c (print_line): Fix off-by-one error which
        resulted in \\ at the end of the line.
------------------------------------------------------------
revno: 4409
committer: Vladimir 'phcoder' Serbinenko <phcoder>
branch nick: grub
timestamp: Sat 2012-06-02 14:39:35 +0200
message:
        * grub-core/kern/parser.c (grub_parser_state_transitions): Handle \t.
        (grub_parser_cmdline_state): Likewise.
        (grub_parser_split_cmdline): Likewise.

revno: 4407
committer: Vladimir 'phcoder' Serbinenko <phcoder>
branch nick: grub
timestamp: Sat 2012-06-02 14:30:52 +0200
message:
        * grub-core/normal/menu_entry.c (update_screen): Fix loop condition to
        fix partially stale display.
------------------------------------------------------------
revno: 4406
committer: Vladimir 'phcoder' Serbinenko <phcoder>
branch nick: grub
timestamp: Sat 2012-06-02 14:28:12 +0200
message:
        * grub-core/normal/menu_entry.c (backward_char): Use right line for
        substraction.

Comment 9 Mads Kiilerich 2012-06-12 13:09:20 UTC
This fix can be tested with an unofficial scratch build with a snapshot from bzr: grub2-2.0-0.37.beta6.4462.fc17 at http://koji.fedoraproject.org/koji/taskinfo?taskID=4152623 - please test and report back.

Comment 10 Steve Tyler 2012-09-10 21:43:17 UTC
Created attachment 611593 [details]
screenshot showing typed characters one line above cursor

This bug still occurs with:
grub2-2.0-0.38.beta6.fc17.x86_64

The attached screenshot shows an example.

Procedure:
1. In a VM, do a clean install from the F17 DVD image.
2. After rebooting and configuring, run:
   yum update grub2
   grub2-install /dev/sda
   grub2-mkconfig -o /boot/grub2/grub.cfg
3. Reboot and at the grub menu press "e".
4. Use the down-arrow to go to the line beginning "linux ..."
5. Type "xxx".
   The characters "xxx" are displayed one line above the line with the cursor.

Comment 11 Fedora End Of Life 2013-07-04 02:37:18 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2013-08-01 08:53:28 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.