I'm getting "unknown command hwmatch" message on each boot after I installed Ubuntu 16.04 following this steps: https://gist.github.com/umpirsky/6ee1f870e759815333c8 in order to setup RAID0.
Special attention to apt-get install -y grub-efi-amd64
part https://gist.github.com/umpirsky/6ee1f870e759815333c8#file-ubuntu-raid-sh-L40
For some reason I couldn't use apt-get, so I installed it manually downloading deb and using dpkg -i.
There is a bug report related with this error https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/733836.
System boots normally, but I would like to fix this error. Is there any way to update config and fix it?
UPDATE: After one month of using the system, one day it just failed to boot with this error, ending up in initramfs prompt, I restored it from clonezilla backup, but I'm afraid it can happen again. The worst thing is, I don't know why it happened.
UPDATE:
It happened again, and again, often after force shutdown or running out of batterx. I booted live USB and run fsck:
sudo fsck /dev/sda1
fsck from util-linux 2.20.1
fsck.fat 3.0.26 (2014-03-07)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 2
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
Looks like some data are left inconsistent when laptop runs out of battery or force shutdown.
Also:
sudo fsck /dev/md0
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/md0
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
But e2fsck does not fix it:
sudo e2fsck -b 8193 /dev/md0
e2fsck 1.42.9 (4-Feb-2014)
e2fsck: Bad magic number in super-block while trying to open /dev/md0
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Thanks.
Note from comments: I cannot reproduce this since restoring from a Clonezilla backup.
sudo dpkg-reconfigure grub-efi-amd64
, don't do the force question if prompted (default is no