Antergos / Cnchi

A modern, flexible online system installer for Antergos Linux
GNU General Public License v3.0
291 stars 101 forks source link

disk setup in Cnchi leads to no grub config file #1117

Open christian-korneck opened 5 years ago

christian-korneck commented 5 years ago

Describe the bug Whenever I install a vanilla Antergos (from antergos-minimal-18.12-x86_64.iso) on a blank disk and choose lvm (with default settings) for the disk setup, the installed system ends up with having no grub config file (/boot/grub/grub.cfg does not exist and at first boot I end up in the grub shell). [Update: Another user reports that it also happens without choosing lvm, so lvm is probably unrelated. I didn't test without lvm].

Firmware mode is BIOS (haven't tried EFI). Both the partitions are created correctly as well as grub gets installed. The only thing missing is the grub config file.

Workaround To repair: In the grub shell:

$ insmod lvm
$ ls
(lvm/AntergosVG-AntergosSwap) (lvm/AntergosVG-AntergosRoot) (hd0) (hd0,msdos2) (hd0,msdos1)
$ set root=(hd0, msdos1)
$ linux /vmlinuz-linux root=/dev/mapper/AntergosVG-AntergosRoot
$ initrd /initramfs-linux.img
$ boot

This will boot the system. From Linux, create the grub config file:

grub-mkconfig -o /boot/grub/grub.cfg

To Reproduce Steps to reproduce the behavior:

  1. boot from antergos-minimal-18.12-x86_64.iso in BIOS mode (i.e. a virtualbox vm with default settings)
  2. "install Antergos"
  3. leave all settings default, but change the disk setup to lvm (with default settings)
  4. -> the first boot will end up in the grub shell

Expected behavior /boot/grub/grub.cfg gets created during OS installation

Log Files

From /var/log/cnchi.log:

./cnchi-20181226-195002.log:2018-12-26 19:42:37 [DEBUG  ] Generating grub.cfg...  (grub2.py:270)
./cnchi-20181226-195002.log:2018-12-26 19:42:37 [DEBUG  ] 50mounted-tests file patched successfully  (grub2.py:436)
./cnchi-20181226-195002.log:2018-12-26 19:42:37 [DEBUG  ] Running grub-mkconfig...  (grub2.py:280)
./cnchi-20181226-195002.log:2018-12-26 19:42:47 [WARNING] Error running ['/bin/pidof', 'grub-mount']: b''  (grub2.py:265)
./cnchi-20181226-195002.log:2018-12-26 19:50:01 [ERROR  ] Timeout running the command ['chroot', '/install', 'sh', '-c', 'LANG=en_GB.UTF-8 grub-mkconfig -o /boot/grub/grub.cfg']  (run_cmd.py:159)
./cnchi-20181226-195002.log:2018-12-26 19:50:01 [ERROR  ] subprocess.TimeoutExpired: Command '['chroot', '/install', 'sh', '-c', 'LANG=en_GB.UTF-8 grub-mkconfig -o /boot/grub/grub.cfg']' timed out after 300 seconds  (run_cmd.py:78)
./cnchi-20181226-195002.log:2018-12-26 19:50:01 [ERROR  ] grub-mkconfig does not respond. Killing grub-mount andos-prober so we can continue.  (grub2.py:287)
./cnchi-20181226-195002.log:2018-12-26 19:50:01 [WARNING] Error running ['killall', 'grub-mount']: grub-mount: no process found  (run_cmd.py:118)
./cnchi-20181226-195002.log:2018-12-26 19:50:01 [ERROR  ] subprocess.CalledProcessError: Command '['killall', 'grub-mount']' returned non-zero exit status 1.  (run_cmd.py:78)
c2h5oh commented 5 years ago

I'm seeing the exact same issue without lvm

christian-korneck commented 5 years ago

@c2h5oh thanks for the info. I've edited the issue and title accordingly. (I indeed didn't test without choosing lvm. Relation to lvm was just an assumption, which was probably wrong).

c2h5oh commented 5 years ago

OK, so I've tracked it down to a grub.cfg creation failure:

As a temporaty fix adding GRUB_DISABLE_OS_PROBER=true to /etc/default/grub allows grub installation to finish quickly - after first boot you just remove it and re-run grub-mkconfig and let it sit as long as it needs to complete.

Its-Alex commented 5 years ago

Same problem here without lvm except that for me the grub error is

/usr/bin/grub-probe: error: failed to get canonical path of `root-image`.