bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub-install after system imaging fails


From: Chris Wilson
Subject: grub-install after system imaging fails
Date: Mon, 19 Sep 2011 14:03:05 +0200 (CAT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Dear GRUB developers,

I'm manually reinstalling grub on a system which has just been re-imaged (formatted and / extracted from a tarball) to make it bootable, and getting the following errors:

address@hidden:~# chroot /mnt/target grub-install --recheck /dev/sda
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

address@hidden:~# mount
[...]
/dev/sda2 on /mnt/target type ext4 (rw,relatime,barrier=1,data=ordered)
none on /mnt/target/dev type devtmpfs (rw,relatime,size=504704k,nr_inodes=126176,mode=755)
none on /mnt/target/proc type proc (rw,nosuid,nodev,noexec,relatime)

address@hidden:~# chroot /mnt/target grub-probe --device /dev/sda2 --target=abstraction grub-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map.

address@hidden:~# ls -la /dev/sda*
brw-rw---- 1 root disk 8, 0 Sep 19 13:02 /dev/sda
brw-rw---- 1 root disk 8, 1 Sep 19 13:02 /dev/sda1
brw-rw---- 1 root disk 8, 2 Sep 19 13:02 /dev/sda2

address@hidden:~# chroot /mnt/target strace grub-probe --device /dev/sda2 --target=abstraction
[...]
open("/boot/grub/device.map", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
getcwd("/", 4098)                       = 2
[...]
stat64("/dev/sda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0 stat64("/boot/grub/device.map", 0xbfbaddec) = -1 ENOENT (No such file or directory) stat64("/dev/sda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0
lstat64("/dev", {st_mode=S_IFDIR|0755, st_size=2940, ...}) = 0
lstat64("/dev/sda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0
lstat64("/dev", {st_mode=S_IFDIR|0755, st_size=2940, ...}) = 0
lstat64("/dev/sda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0 stat64("/dev/sda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 2), ...}) = 0
uname({sys="Linux", node="system-imager", ...}) = 0
open("/proc/devices", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb74ec000
read(3, "Character devices:\n  1 mem\n  4 /"..., 1024) = 363
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xb74ec000, 4096)                = 0
open("/dev/sda2", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, 0x301, 0xbfbadc50)             = 0
close(3)                                = 0
getcwd("/", 4098)                       = 2
getcwd("/", 4098)                       = 2
open("/dev/sda", O_RDONLY|O_LARGEFILE)  = 3
fstat64(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
ioctl(3, BLKGETSIZE64, 0xbfbadc08)      = 0
close(3)                                = 0
gettimeofday({1316439853, 690559}, NULL) = 0
open("/dev/sda", O_RDONLY|O_SYNC|O_LARGEFILE) = 3
ioctl(3, BLKFLSBUF, 0)                  = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "\353c\220\20\216\320\274\0\260\270\0\0\216\330\216\300\373\276\0|\277\0\6\271\0\2\363\244\352!\6\0"..., 512) = 512 read(3, "R\350(\1t\10V\2763\201\350L\1^\277\364\201f\213-\203}\10\0\17\204\351\0\200|\377\0"..., 3584) = 3584
getcwd("/", 4098)                       = 2
getcwd("/", 4098)                       = 2
getcwd("/", 4098)                       = 2
close(3)                                = 0
gettimeofday({1316439853, 691890}, NULL) = 0
getcwd("/", 4098)                       = 2
getcwd("/", 4098)                       = 2
write(2, "grub-probe: error:", 18grub-probe: error:)      = 18
write(2, " ", 1 )                        = 1
write(2, "cannot find a GRUB drive for /de"..., 62cannot find a GRUB drive for /dev/sda2. Check your device.map) = 62
write(2, ".\n", 2.
)                      = 2
exit_group(1)                           = ?

The filesystem was formatted with: mkfs.ext4 -I 128 -E lazy_itable_init=1 /dev/sda2. If I format with ext3 instead (using all the default settings) I get no errors from grub-install or update-grub. After that I tried again with mkfs.ext4 and it worked! So this seems to be some kind of heisenbug.

Any ideas? Could the error message be more helpful?

Thanks in advance,

Chris Wilson.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]