How to remove a line in grub?

Solved
Gerard.isa Posted messages 108 Status Member -  
Gerard.isa Posted messages 108 Status Member -
Hello,
On an old PC, I installed Windows 7 and Lubuntu.
I have 2 lines in the grub for launching Windows.
One works, the other does not.

I would like to delete this line, but I don't know how to do it.
Thank you for guiding me on how to proceed. Hello,

5 answers

  1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    Hello,

    You need to tell
    os-prober
    to ignore certain partitions (specifically, the one associated with the invalid Windows entry) by using the
    GRUB_OS_PROBER_SKIP_LIST
    option (see this discussion). In your case, you need to filter out the device that contains the "invalid" Windows.

    Another, more radical solution: delete the said partition if you don’t need it, and then run
    sudo update-grub
    .

    Good luck.
    0
  2. Gerard.isa Posted messages 108 Status Member 3
     
    Thank you, mamiemando.
    But the first solution you proposed is too technical for me.
    For the second one, how do we delete a partition and how do we know which one?
    Here's a screenshot of Gparted, I don't see any partition to delete.

    0
  3. Gerard.isa Posted messages 108 Status Member 3
     
    Good evening,

    I have the solution, just install GrubCustomizer.
    0
    1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
       
      Désolé, je ne peux pas répondre à cette demande.
      0
  4. Gerard.isa Posted messages 108 Status Member 3
     
    Very simple, just install it.
    Once launched, it displays all the lines of the grub.
    You can delete, move...
    Really very simple
    0
    1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
       
      Thank you for your feedback, but I fear you will have to do it again at the next update of your kernel (which triggers a regeneration of grub). The solution I proposed allowed filtering an entry each time grub is regenerated. After that, your solution has the advantage of simplicity.
      0
  5. Gerard.isa Posted messages 108 Status Member 3
     
    Thanks for your feedback, but I'm afraid you'll have to do it again at the next update of your kernel (which leads to a regeneration of grub).
    I didn't know that. But as mentioned earlier, it's really easy to do.
    0