Bug 44595 - Boot partition cannot be configured
Boot partition cannot be configured
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCS Installer
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3-1
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-15 12:27 CEST by Nico Gulden
Modified: 2018-06-15 08:05 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.343
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number: 2017050621000294, 2018031421001271, 2018022721001159, 2017120121000762, 2018040121000632
Bug group (optional): External feedback, Workaround is available
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Gulden univentionstaff 2017-05-15 12:27:47 CEST
Customer feedback at Ticket#2017050621000294 

During installation I installed UCS onto /dev/sdd, but when the installer attempted to setup GRUB, it defaulted to /dev/sda and failed (as it should).  There was no good way to configure grub to install on /dev/sdd.

The feedback furthermore talks about 

Webfrontend error: The specified request is unknown.

The path '/management/umcFeedbackUrl' was not found.
Webfrontend error: The specified request is unknown.


UCS Version: 4.2-0 errata10 (Lesum)
Comment 1 Florian Best univentionstaff 2017-05-16 13:59:37 CEST
Bug #44381
Comment 2 Nico Gulden univentionstaff 2018-03-15 13:42:31 CET
Occurred again at Ticket#2018031421001271
Comment 3 Nico Gulden univentionstaff 2018-03-15 13:48:48 CET
Occurred again at Ticket#2018022721001159
Comment 4 Stefan Zimmermann 2018-03-15 22:05:21 CET
This is the same for UCS 4.3-0 where my boot disk is /dev/sdc.

Workaround:

- Go to console (Alt+F2)
- chroot /target /bin/bash
- grub-install /dev/sdc
Comment 5 Stefan Gohmann univentionstaff 2018-03-16 06:05:12 CET
Thanks for the workaround description.

What happens without the workaround? I guess, the system doesn't boot, right?
Comment 6 Stefan Zimmermann 2018-03-16 22:59:22 CET
(In reply to Stefan Gohmann from comment #5)
> Thanks for the workaround description.
> 
> What happens without the workaround? I guess, the system doesn't boot, right?

I didn't try to be honest and my system is already configured for my purposes, so I don't want to re-install. But I'd assume so, as there's no bootloader installed.
Comment 7 Philipp Hahn univentionstaff 2018-04-28 10:11:45 CEST
Run D-I with "verbose DEBCONF_DEBUG=5"

Currently we preseed these setting:
235 »···»···»···# Install GRUB in MBR by default on new systems
236 »···»···»···d-i grub-installer/only_debian boolean true
237 »···»···»···d-i grub-installer/bootdev string default
238 »···»···»···grub-pc grub-pc/install_devices multiselect
239 »···»···»···grub-pc grub-pc/install_devices_empty boolean true

As soon as "grub-installer/bootdev" is set, `grub-installer` will never ask for any question.

So we have to patch `grub-installer` to implement our own login , probably something like this:
- fetch all HD
- ignore installation media (USB stick)
- iff only one left, use it by default
- otherwise ask user to decide

Bonus points to add a unit test for this:
- install on clean HD
- install on HD containing previous OS
- install on system with multiple HD
Comment 8 Philipp Hahn univentionstaff 2018-05-23 10:30:35 CEST
repo_admin.py --cherrypick -r 4.3 --releasedest 4.3 --dest errata4.3-0 -p grub-installer

r18129 | Bug #44595: Improve GRUB device selection
r18134 | Bug #44595: Improve GRUB device selection 2

Package: grub-installer
Version: 1.140+deb9u1A~4.3.0.201805221239
Version: 1.140+deb9u1A~4.3.0.201805230725
Branch: ucs_4.3-0
Scope: errata4.3-0

[4.2] b09e8026 Bug #44595 DVD: Select better GRUB device
 build-cd/build-cd-ucs4 | 1 -
 debian/changelog       | 3 ++-

repo_admin.py --cherrypick -r 4.3 --releasedest 4.3 --dest errata4.3-0 -p debian-installer

build-cd-ucs4 -r 4.3-0 -s errata4.3-0 -i '/var/univention/buildsystem2/apt/ucs_4.3-0-errata4.3-0' --no-link --no-content-list-update # --keep-installer --skip-dists

isotests/ucs_4.3-0-20180523-091855-dvd-amd64.iso

No YAML as releasing it to errata/ will NOT fix anything; we need to build a new DVD which will be done earliest with UCS-4.3-1; the following needs to be added to the changelog-4.3-1.xml:

  <listitem><simpara>The <package>grub-installer</package> will explicitly ask for the installation device of GRUB if more than one hard disk exists (<u:bug>44595</u:bug>)</simpara></listitem>
Comment 9 Philipp Hahn univentionstaff 2018-05-23 10:31:33 CEST
QA: I successfully tested the following scenarios:
- single HD
- double HD with boot from 2nd
- double HD with boot from 1st
Comment 10 Erik Damrose univentionstaff 2018-06-04 16:35:49 CEST
(In reply to Philipp Hahn from comment #9)
> - single HD
> - double HD with boot from 2nd
> - double HD with boot from 1st

Worked in my tests as well. Before setting it to verified i will recheck with the 4.3-1 DVD if the package has been copied and check the 4.3-1 changelog when it exists.
Comment 11 Erik Damrose univentionstaff 2018-06-10 20:11:43 CEST
Verified, works with the UCS 4.3-1 DVD. I added a changelog in 4d584cc
Comment 12 Stefan Gohmann univentionstaff 2018-06-14 19:47:28 CEST
(In reply to Erik Damrose from comment #11)
> Verified, works with the UCS 4.3-1 DVD. I added a changelog in 4d584cc

The issue can be closed? I guess the target milestone is wrong.