Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub-mkconfig: attempt to read or write outside of partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
gordonp
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2005
Posts: 102

PostPosted: Thu Jul 22, 2021 9:49 pm    Post subject: grub-mkconfig: attempt to read or write outside of partition Reply with quote

Suddenly now, after a decade or so, I have three QEMU Virtual Machines giving me this same error!!!

Code:
# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
Found linux image: /boot/vmlinuz-5.10.52-gentoo-x86_64
Found initrd image: /boot/initramfs-5.10.52-gentoo-x86_64.img
Found linux image: /boot/vmlinuz-5.10.27-gentoo-x86_64
Found initrd image: /boot/initramfs-5.10.27-gentoo-x86_64.img
Found linux image: /boot/vmlinuz-5.10.27-gentoo-x86_64.old
Found initrd image: /boot/initramfs-5.10.27-gentoo-x86_64.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done


All three VMs do not use systemd. All VMs were successfully rebooted prior to this error, about a week ago:
Code:
# uptime
 14:36:20 up 8 days,  6:02,  1 user,  load average: 0.02, 0.05, 0.64


During the week since I rebooted, there have been a lot of Perl-induced updates, a new kernel, and I rebuilt the entire world (--emptytree).

I am running kernel linux-5.10.27-gentoo; I just compiled the freshest linux-5.10.52-gentoo

I'm afraid to attempt a reboot; I'm trying to keep everything running until I can sort this out!

Here's more about the system (which hasn't changed for many, many years):

Code:
# df -h
Filesystem      Size  Used Avail Use% Mounted on
none           1000M  460K 1000M   1% /run
udev             10M     0   10M   0% /dev
tmpfs          1000M     0 1000M   0% /dev/shm
/dev/vda4        26G  9.9G   17G  39% /
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
/dev/vda2       124M   46M   72M  39% /boot



Code:
# fdisk /dev/vda

Welcome to fdisk (util-linux 2.36.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/vda: 30 GiB, 32212258816 bytes, 62914568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D4B1FDC6-A1A0-4AA9-8F5E-2513FE7B1B4C

Device       Start      End  Sectors  Size Type
/dev/vda1     2048     6143     4096    2M BIOS boot
/dev/vda2     6144   268287   262144  128M Linux filesystem
/dev/vda3   268288  8460287  8192000  3.9G Linux filesystem
/dev/vda4  8460288 62912511 54452224   26G Linux filesystem


Code:
# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom 
vda    254:0    0   30G  0 disk
├─vda1 254:1    0    2M  0 part
├─vda2 254:2    0  128M  0 part /boot
├─vda3 254:3    0  3.9G  0 part [SWAP]
└─vda4 254:4    0   26G  0 part /


Code:
# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=255044,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/vda4 on / type xfs (rw,noatime,nodiratime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc)
none on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/vda2 on /boot type ext2 (rw,noatime,errors=continue,user_xattr)


To try to localize the issue, I run and see this:

Code:
# bash -x grub-mkconfig -o /boot/grub/grub.cfg
+ set -e
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=/usr/share
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/sbin
+ bindir=/usr/bin
+ sysconfdir=/etc
+ PACKAGE_NAME=GRUB
+ PACKAGE_VERSION=2.06
+ host_os=linux-gnu
+ datadir=/usr/share
+ '[' x = x ']'
+ pkgdatadir=/usr/share/grub
+ export pkgdatadir
+ grub_cfg=
+ grub_mkconfig_dir=/etc/grub.d
++ basename grub-mkconfig

<<snippety-do>>

+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/00_header
+ test -f /etc/grub.d/00_header
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/00_header
+ echo
+ echo '### BEGIN /etc/grub.d/00_header ###'
+ /etc/grub.d/00_header
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
error: attempt to read or write outside of partition.
+ echo '### END /etc/grub.d/00_header ###'
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/10_linux
+ test -f /etc/grub.d/10_linux
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/10_linux
+ echo
+ echo '### BEGIN /etc/grub.d/10_linux ###'
+ /etc/grub.d/10_linux
Found linux image: /boot/vmlinuz-5.10.52-gentoo-x86_64
Found initrd image: /boot/initramfs-5.10.52-gentoo-x86_64.img
Found linux image: /boot/vmlinuz-5.10.27-gentoo-x86_64
Found initrd image: /boot/initramfs-5.10.27-gentoo-x86_64.img
Found linux image: /boot/vmlinuz-5.10.27-gentoo-x86_64.old
Found initrd image: /boot/initramfs-5.10.27-gentoo-x86_64.img
+ echo '### END /etc/grub.d/10_linux ###'

<<chopped>>


I use genkernel.
I use initramfs.
My /etc/genkernel.conf file is exactly the same as used on my workstations and the kvm/QEMU host, where grub-mkconfig -o works fine (same fresh kernel, same Perl-massive-updates, same grub. Just real, physical hardware though).

Any suggestions? Thanks in advance!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum