Bug 1202320

Summary: [atomic] BootLoaderError: failed to write bootloader configuration
Product: Red Hat Enterprise Linux 7 Reporter: Alexander Todorov <atodorov>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: walters
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2d4428cfd3000eed227c719ab6fc662ddc637be5064123cadbe29b71a3726251
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-01 18:50:46 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
File: anaconda-tb
none
File: anaconda.log
none
File: environ
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: syslog
none
File: ifcfg.log
none
1) atomic installer reproducer
none
2) reproducer with rhel installer
none
2) reproducer with rhel installer
none
3) default lvm configuration with atomic installer none

Description Alexander Todorov 2015-03-16 11:50:56 UTC
Version-Release number of selected component:
anaconda-19.31.79-1

The following was filed automatically by anaconda:
anaconda 19.31.79-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 1570, in write_config
    raise BootLoaderError("failed to write bootloader configuration")
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 1609, in write
    self.write_config()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 2376, in writeBootLoaderFinal
    storage.bootloader.write()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 2403, in writeBootLoader
    writeBootLoaderFinal(storage, payload, instClass, ksdata)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 204, in doInstall
    writeBootLoader(storage, payload, instClass, ksdata)
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 211, in run
    threading.Thread.run(self, *args, **kwargs)
BootLoaderError: failed to write bootloader configuration

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   method=http://download.eng.bos.redhat.com/rel-eng/Atomic/7/trees/GA.brew/images/20150217.0/installer/ fips=1
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.10.0-229.el7.x86_64
product:        Red Hat Enterprise Linux 7"
release:        Red Hat Enterprise Linux ComputeNode release 7.1 (Maipo)
type:           anaconda
version:        Red Hat Enterprise Linux ComputeNode"

Comment 1 Alexander Todorov 2015-03-16 11:50:58 UTC
Created attachment 1002216 [details]
File: anaconda-tb

Comment 2 Alexander Todorov 2015-03-16 11:50:59 UTC
Created attachment 1002217 [details]
File: anaconda.log

Comment 3 Alexander Todorov 2015-03-16 11:51:00 UTC
Created attachment 1002218 [details]
File: environ

Comment 4 Alexander Todorov 2015-03-16 11:51:01 UTC
Created attachment 1002219 [details]
File: lsblk_output

Comment 5 Alexander Todorov 2015-03-16 11:51:02 UTC
Created attachment 1002220 [details]
File: nmcli_dev_list

Comment 6 Alexander Todorov 2015-03-16 11:51:03 UTC
Created attachment 1002221 [details]
File: os_info

Comment 7 Alexander Todorov 2015-03-16 11:51:04 UTC
Created attachment 1002222 [details]
File: program.log

Comment 8 Alexander Todorov 2015-03-16 11:51:05 UTC
Created attachment 1002223 [details]
File: storage.log

Comment 9 Alexander Todorov 2015-03-16 11:51:06 UTC
Created attachment 1002224 [details]
File: syslog

Comment 10 Alexander Todorov 2015-03-16 11:51:07 UTC
Created attachment 1002225 [details]
File: ifcfg.log

Comment 11 Alexander Todorov 2015-03-16 11:53:59 UTC
I'm not exactly sure what caused this problem. Initially I've had some partitions on disk which I managed to delete and created the default LVM configuration. Then I've changed the root mount point from LVM to BTRFS, IIRC and proceeded with the install. At the end of the installation I got this traceback. 


Before going into the installation UI I've also zeroed out the 1st MB of the vda disk using dd.

Comment 12 Brian Lane 2015-03-18 23:52:10 UTC
10:44:05,800 INFO program: Running... grub2-mkconfig -o /boot/grub2/grub.cfg
10:44:05,840 INFO program: /usr/sbin/grub2-probe: error: cannot find a device for / (is /dev mounted?).

Looks like it doesn't like the btrfs / for some reason.

Comment 13 Radek Vykydal 2015-07-15 13:31:19 UTC
I doubt this bug should be on InstallPrio list.
Colin, is / on btrfs something we should care about much for Atomic?

Comment 14 Colin Walters 2015-07-15 13:49:57 UTC
(In reply to Radek Vykydal from comment #13)
> I doubt this bug should be on InstallPrio list.
> Colin, is / on btrfs something we should care about much for Atomic?

Well...btrfs has nicer management than the LVM stack in some cases, so I can imagine some people wanting to use it.

But long term I think for Atomic Host/docker, overlayfs is a primary focus.

It's OK by me if we just leave this bug open, it's not a priority indeed right now.

Comment 15 Radek Vykydal 2015-07-16 10:14:54 UTC
The reproducer is to create default partitioning in custom partitioning spoke and change '/' to BTRFS.

grub2-probe fails to find device '/' is mounted on. I'll post /proc/self/mountinfo of 

1) reproducer with atomic installer - fails with the traceback
2) reproducer with rhel installer - doesn't traceback
3) default lvm configuration with atomic installer - doesn't traceback, not sure why

The root cause seems to be that grub2-probe in 1) is run in ostree deployment chroot, where physical target root device (the one probe is looking for?) is mounted to /sysroot whereas the probe looks for / and nothing is actually mounted to / in the chroot at the time of grub2-probe (<- grub2-mkconfig <- bootloader.write_config() <- writeBootLoader())? 

See the mounting before writeBootLoader

https://github.com/rhinstaller/anaconda/blob/atomic-rhel-7.1/pyanaconda/install.py#L175

Comment 16 Radek Vykydal 2015-07-16 10:26:38 UTC
Created attachment 1052633 [details]
1) atomic installer reproducer

# /usr/sbin/grub2-probe -v --target=device /
(run in deployment chroot)

/usr/sbin/grub2-probe: info: adding `hd0' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: adding `hd1' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: changing current directory to /dev.
/usr/sbin/grub2-probe: info: changing current directory to rah.
/usr/sbin/grub2-probe: info: changing current directory to virtio-ports.
/usr/sbin/grub2-probe: info: changing current directory to snd.
/usr/sbin/grub2-probe: info: changing current directory to vfio.
/usr/sbin/grub2-probe: info: changing current directory to mqueue.
/usr/sbin/grub2-probe: info: changing current directory to hugepages.
/usr/sbin/grub2-probe: info: changing current directory to bsg.
/usr/sbin/grub2-probe: info: changing current directory to disk.
/usr/sbin/grub2-probe: info: changing current directory to by-label.
/usr/sbin/grub2-probe: info: changing current directory to by-uuid.
/usr/sbin/grub2-probe: info: changing current directory to by-id.
/usr/sbin/grub2-probe: info: changing current directory to block.
/usr/sbin/grub2-probe: info: changing current directory to char.
/usr/sbin/grub2-probe: info: changing current directory to net.
/usr/sbin/grub2-probe: info: changing current directory to mapper.
/usr/sbin/grub2-probe: info: changing current directory to pts.
/usr/sbin/grub2-probe: info: changing current directory to shm.
/usr/sbin/grub2-probe: info: changing current directory to input.
/usr/sbin/grub2-probe: info: changing current directory to by-path.
/usr/sbin/grub2-probe: info: changing current directory to by-id.
/usr/sbin/grub2-probe: info: changing current directory to bus.
/usr/sbin/grub2-probe: info: changing current directory to usb.
/usr/sbin/grub2-probe: info: changing current directory to 001.
/usr/sbin/grub2-probe: info: changing current directory to raw.
/usr/sbin/grub2-probe: info: changing current directory to cpu.
/usr/sbin/grub2-probe: info: changing current directory to 0.
/usr/sbin/grub2-probe: error: cannot find a device for / (is /dev mounted?).

# /usr/sbin/grub2-probe -v --target=device /sysroot

/usr/sbin/grub2-probe: info: adding `hd0' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: adding `hd1' -> `/dev/vda' from device.map.
/dev/vda3

Comment 17 Radek Vykydal 2015-07-16 10:29:49 UTC
Created attachment 1052635 [details]
2) reproducer with rhel installer

# /usr/sbin/grub2-probe -v --target=device /
(run in physical target chroot - /mnt/sysimage)

/usr/sbin/grub2-probe: info: adding `hd0' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: adding `hd1' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: changing current directory to /dev.
/usr/sbin/grub2-probe: info: changing current directory to rah_office88.
/usr/sbin/grub2-probe: info: changing current directory to virtio-ports.
/usr/sbin/grub2-probe: info: changing current directory to snd.
/usr/sbin/grub2-probe: info: changing current directory to vfio.
/usr/sbin/grub2-probe: info: changing current directory to mqueue.
/usr/sbin/grub2-probe: info: changing current directory to hugepages.
/usr/sbin/grub2-probe: info: changing current directory to bsg.
/usr/sbin/grub2-probe: info: changing current directory to disk.
/usr/sbin/grub2-probe: info: changing current directory to by-label.
/usr/sbin/grub2-probe: info: changing current directory to by-uuid.
/usr/sbin/grub2-probe: info: changing current directory to by-id.
/usr/sbin/grub2-probe: info: changing current directory to block.
/usr/sbin/grub2-probe: info: changing current directory to char.
/usr/sbin/grub2-probe: info: changing current directory to net.
/usr/sbin/grub2-probe: info: changing current directory to mapper.
/dev/mapper/rah_office88-root

Comment 18 Radek Vykydal 2015-07-16 10:34:11 UTC
Created attachment 1052637 [details]
2) reproducer with rhel installer

Pleas disregard comment #17

# /usr/sbin/grub2-probe -v --target=device /
(run in physical target chroot - /mnt/sysimage)

/usr/sbin/grub2-probe: info: adding `hd0' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: adding `hd1' -> `/dev/vda' from device.map.
/dev/vda3

Comment 19 Radek Vykydal 2015-07-16 10:35:49 UTC
Created attachment 1052638 [details]
3) default lvm configuration with atomic installer

# /usr/sbin/grub2-probe -v --target=device /
(run in deployment chroot)

/usr/sbin/grub2-probe: info: adding `hd0' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: adding `hd1' -> `/dev/vda' from device.map.
/usr/sbin/grub2-probe: info: changing current directory to /dev.
/usr/sbin/grub2-probe: info: changing current directory to rah_office88.
/usr/sbin/grub2-probe: info: changing current directory to virtio-ports.
/usr/sbin/grub2-probe: info: changing current directory to snd.
/usr/sbin/grub2-probe: info: changing current directory to vfio.
/usr/sbin/grub2-probe: info: changing current directory to mqueue.
/usr/sbin/grub2-probe: info: changing current directory to hugepages.
/usr/sbin/grub2-probe: info: changing current directory to bsg.
/usr/sbin/grub2-probe: info: changing current directory to disk.
/usr/sbin/grub2-probe: info: changing current directory to by-label.
/usr/sbin/grub2-probe: info: changing current directory to by-uuid.
/usr/sbin/grub2-probe: info: changing current directory to by-id.
/usr/sbin/grub2-probe: info: changing current directory to block.
/usr/sbin/grub2-probe: info: changing current directory to char.
/usr/sbin/grub2-probe: info: changing current directory to net.
/usr/sbin/grub2-probe: info: changing current directory to mapper.
/dev/mapper/rah_office88-root

Comment 20 Colin Walters 2015-10-01 18:50:46 UTC

*** This bug has been marked as a duplicate of bug 1267860 ***