Hello!
I am trying to do a drive migration and have encountered an error that
I've never seen before, and has me confused:
root@myhost# grub-install /dev/disk/by-id/ata-WDC_WD3003FZEX-xxxxxxxxxxxx
Installing for i386-pc platform.
grub-install: error: unaligned device size.
Googling for "grub-install: error: unaligned device size." came up with
nothing at all.
I would assume grub is complaining about some partition being unaligned,
but that's not the case as far as I can see.
Environment here is a typical PC, Debian Unstable with grub packages
2.02~beta3-5 and standard Debian kernel 4.9.0-2-amd64.
The key factor causing this problems seems to be that I am running
grub-install from a chroot environment on top of a bcache-backed filesystem.
Note that when I talk about bcache here, I'm talking about the old
bcache type, not the new bcachefs.
If I copy my grub boot directory to another non-bcache filesystem
location, it works fine.
I tried various overrides like --force and -s without success.
Here's what the end of grub-install with -v looks like:
grub-install: info: copying `/usr/share/grub/unicode.pf2' ->
`/boot/grub/fonts/unicode.pf2'.
grub-install: info: /dev/bcache0 is not present.
grub-install: info: Looking for /dev/bcache0.
grub-install: info: /dev/bcache0 is a parent of /dev/bcache0.
grub-install: info: /dev/bcache0 is present.
grub-install: info: Looking for /dev/bcache0.
grub-install: info: /dev/bcache0 is a parent of /dev/bcache0.
grub-install: info: /dev/bcache0 is present.
grub-install: info: Looking for /dev/bcache0.
grub-install: info: /dev/bcache0 is a parent of /dev/bcache0.
grub-install: info: drive = 0.
grub-install: error: unaligned device size.
I am guessing that the grub-install process is doing some kind of sanity
check to make sure that the /boot part is going to be accessible to the
stage1 bootloader found in the MBR/bios-boot-part. The info messages
above seem to indicate that grub-install trips up recursively on the
bcache device. In this case, I was using a /boot grub install that was
on a bcache-backed ext4 filesystem.
My workaround is to just copy the files to a temporary non-bcached
location and run "grub-install --boot-directory=/mnt/new-bcache-boot/
/dev/disk/by-id/ata-WDC_WD3003FZEX-xxxxxxxxxxx", but it seems kinda
silly that I need to do this.
Please advise.
_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub