Path `/tmp/antos/boot/grub' is not readable by GRUB on boot.
Posted: Mon Nov 11, 2013 7:39 pm
Hi, guys. I am developing a 32 bit os and plan to port it to x86-64. Grub2 works very good as bootloader for my 32-bit os. Last week I tried to install grub2 to a harddisk image file created with dd and fdisk on x64 ubuntu 12.04.2, but failed like this:
I added the "--debug" option to grub-install, and got this:
"/tmp/antos" was the mount point of the first partition:
Then I tried grub-probe like above:
I have read more than 10 pages of google search result, and tried a lot, spent about 20 hours. But still failed.
I need some help or hint, thanks in advance!
Here is the information of my harddisk image:
The information of my x64 ubuntu:
The grub2 was built from source code from ftp.gnu.org:
I have also tried the trunk source code, it reports the same error message.
Thanks!
Code: Select all
root@x64:~# grub-install --no-floppy --modules="biosdisk part_msdos ext2 configfile normal multiboot" --root-directory=/tmp/antos /dev/loop0
Path `/tmp/antos/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
Code: Select all
+ /usr/local/sbin/grub-probe -t fs /tmp/antos/boot/grub
+ return 1
+ gettext_printf Path `%s' is not readable by GRUB on boot. Installation is impossible. Aborting.\n /tmp/antos/boot/grub
Code: Select all
kpartx -av ./antos.img
mke2fs -b1024 /dev/mapper/loop0p1
mount -text2 /dev/mapper/loop0p1 /tmp/antos
Code: Select all
root@ubuntu:~# /usr/local/sbin/grub-probe -t fs /tmp/antos/boot/grub
/usr/local/sbin/grub-probe: error: disk `lvm/loop0p1' not found.
I need some help or hint, thanks in advance!
Here is the information of my harddisk image:
Code: Select all
root@ubuntu:~# fdisk -l
...
Disk /dev/mapper/loop0p1: 19 MB, 19595264 bytes
255 heads, 63 sectors/track, 2 cylinders, total 38272 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
Disk identifier: 0x00000000
Disk /dev/mapper/loop0p1 doesn't contain a valid partition table
Code: Select all
root@ubuntu:~# parted -l
...
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/loop0p1: 19.6MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 19.6MB 19.6MB ext2
Code: Select all
root@ubuntu:~# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 80 Nov 11 08:50 ./
drwxr-xr-x 15 root root 4120 Nov 11 08:50 ../
crw------- 1 root root 10, 236 Nov 1 08:58 control
lrwxrwxrwx 1 root root 7 Nov 12 09:23 loop0p1 -> ../dm-0
root@ubuntu:~# uname -a
Linux ubuntu 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Code: Select all
root@ubuntu:~# grub-install --version
grub-install (GRUB) 2.00
Thanks!