Bug 28153 - Live installer can't install bootloader packages if user has enabled remote repos with newer packages available and has no internet connection
Summary: Live installer can't install bootloader packages if user has enabled remote r...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: Mageia 9
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-18 00:14 CET by Morgan Leijström
Modified: 2021-01-20 12:10 CET (History)
1 user (show)

See Also:
Source RPM: draklive-install
CVE:
Status comment:


Attachments
report.bug.xz per comment 2, right when installer say it can not install grub2 (63.96 KB, application/x-xz)
2021-01-19 21:16 CET, Morgan Leijström
Details

Description Morgan Leijström 2021-01-18 00:14:16 CET
Description of problem:
Live installer should be able to work without internet access.
For that, F2FS packages was added in bug 27887

Version-Release: Second round Mageia 8 RC Xfce live i586

Steps to Reproduce:
0. Do not configure network connection
1. Perform live install from desktop.....
2. ....at end of install: message "Could not install grub2 package"
3. Click OK or Abort (In both cased installer is back at boot manager configuration)
4. Enable network
5. Try again: same error!  Click OK
6. In terminal: # urpmi grub2  (successful including deps)
7. Try again: same error!
Wait.. now i have two different dialogues saying it could not install grub2 package; one new with only a OK button, and one of first type with bot Abort and OK...
??????????
Some internal logic error...
But adding grub2 to Live may workaround that bug.

Not sure if to set bug to installer, package, or release media.
Morgan Leijström 2021-01-18 00:16:28 CET

Priority: Normal => release_blocker
Assignee: bugsquad => mageiatools

Comment 1 Morgan Leijström 2021-01-18 01:26:57 CET
It works if grub2 with deps are installed before launching Live installer.

Target Milestone: --- => Mageia 8
CC: (none) => mageia
Severity: normal => major

Comment 2 Martin Whitaker 2021-01-18 19:47:00 CET
Please repeat the test and when you get the error message, open a terminal window and run

  su -
  drakbug_report | xz > report.bug.xz

and attach the report.bug.xz here.
Comment 3 Morgan Leijström 2021-01-19 00:41:41 CET
Interesting.
With a fresh persistence i could not repeat.  Same ISO, I only replaced mgalive-persist partition (now Btrfs), and the only thing i have done to it before installing, was removing unused locales.  I also in custom partitioning only selected clear, auto allocate, and moved on - and it just worked :)

I saw in a transient window that it was installing grub2 (without any internet configured, so it was obviously from internal repo)

I wonder if i may have disabled internal repo earlier in some of the many tests and forgot about it.
( but regardless of that i dont understand point 7. on comment 0. )

But I did also see this earlier; https://bugs.mageia.org/show_bug.cgi?id=27887#c5

The other attempts was after full updates and more programs.

Will try more later.
Comment 4 Morgan Leijström 2021-01-19 21:16:38 CET
Created attachment 12235 [details]
report.bug.xz per comment 2, right when installer say it can not install grub2

Got it: Only change since last test is configuring network, configure repos, disable updates repos (as this is cauldron) and do a full update.
Then close internet connection and started Live.
Comment 5 Martin Whitaker 2021-01-19 22:40:10 CET
(In reply to Morgan Leijström from comment #4)
> Then close internet connection...

There's your problem. There is a newer version of one of the packages that needs to be installed, so urpmi tries to fetch it from the remote repository, and fails because you have disabled your internet connection.

If you run draklive-install from the command line, you'll see the error message. Annoyingly it's not being written to any of the logs. I've been trying to improve the logging in draklive-install, but there's still a way to go.

So the answer is, if you've enabled remote media, don't disable your internet connection.

Before you say it, yes, a more informative error message would be good here.
Comment 6 Morgan Leijström 2021-01-20 09:03:12 CET
You are correct.

However this is a normal use of Live with persistence:
Update, add software... later run Live installer
Sometimes, i.e depending on location in house, there is no internet connection.


Strange it does not work after i click OK (back to previous screen), enable internet connection, and try again?  Installer have to be run from start to work.


Workaround for no internet connection: Disabled internet repos


Suggestion: make grub2 a dependency of live installer.  And on the live ISO included as installed instead of the Live Core repo (so no additional ISO size).  Then it would be updated when user updates system.
Comment 7 Martin Whitaker 2021-01-20 10:44:08 CET
If you are using legacy boot, the grub2 package needs to be installed. If you are using UEFI boot, either the grub2-efi package or the refind package needs to be installed, depending on what the user chooses. So we would have to pre-install all three. Originally it wasn't possible to install both grub2 and grub2-efi - they conflicted. That has since been fixed, but I'd still want to remove the unwanted packages from the installed system.

Changing this to an enhancement request, because it works out of the box.

Hardware: i586 => All
Source RPM: (none) => draklive-install
Summary: Mageia 8RC Live installer need grub2 package - but still fail when provided then. => Live installer can't install bootloader packages if user has enabled remote repos with newer packages available and has no internet connection
Priority: release_blocker => Normal
Target Milestone: Mageia 8 => Mageia 9
Severity: major => enhancement

Comment 8 Morgan Leijström 2021-01-20 12:10:10 CET
I agree we can improve this later.


Summing it up for future work:


1) Yes better error message would be good



2) Fix that it fail to install packages also after user did see error message and did estabilsh internet connection.



3) About including all dependencies:

  o ISO would be about same size if packages are included as installed in the compressed filesystem, or in the Live repo. We only save on size of not included in either.

  o Non issue for Non-Live systems ( do not install Live installer )

  o Updating the Live, there will be maybe up to 50 MB used if these three deps are updated.  Too much or not is the question. (we alredy have added f2fs recently)

   o Other reasons not to have them installed? (possible future conflicts?)


This also triggers the question, are there other packages it may need install sometimes?  If so try to meed 1) and 2) for such cases.

Note You need to log in before you can comment on or make changes to this bug.