Hi every body
I have same error as
this error . I build LFS-7.1 on VM mashin with same specifications as omar's mashin with below differences:
I use VMware installed Ubuntu 12.04 on a virtual disk of 20G. Before beginning, I add another 10G virtual disk to VM and mount it in the Ubuntu manually. So the first disk with Ubuntu displays sda in /dev/ and the second which is mounted newly displays sdb in /dev/. Following the book I install LFS
7.1 on the sdb1 which is formatted with ext3 on the sdb and given only one partition.
in chapter 8.4.3 I run cmd as grub-install /dev/sda and in
chapter 8.4.4 I save grub.cfg as follows.
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd1,1)
menuentry "GNU/Linux, Linux 3.2.6-lfs-7.1" {
linux /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sdb1 ro
}
I want to fix errors according above link .
I use from ubuntu-12.04-dvd-i386 iso file and mount /dev/sdb1 on /mnt/lfs and my LFS system be available .
but when running "grub-install" this error occur:
root@ubuntu:/# grub-install /dev/sda
/usr/sbin/grub-probe : error: can not find a device for /boot/grub(is /dev mounted)
is it necessary to mount /dev ? I see dev directory in root of iso file .
these are iso's fstab and mtab files and fdisk command:
fdisk :
root@ubuntu:/# fdisk -l
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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: 0x000bc5ba
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 37750783 18874368 83 Linux
/dev/sda2 37752830 41940991 2094081 5 Extended
/dev/sda5 37752832 41940991 2094080 82 Linux swap / Solaris
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 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: 0x5e672529
Device Boot Start End Blocks Id System
/dev/sdb1 63 20971519 10485728+ 83 Linux
root@ubuntu:/#
fstab:
overlayfs / overlayfs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/sda5 swap swap defaults 0 0
mtab:
/cow / overlayfs rw 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
/dev/sr0 /cdrom iso9660 ro,noatime 0 0
/dev/loop0 /rofs squashfs ro,noatime 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
gvfs-fuse-daemon /home/ubuntu/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=ubuntu 0 0
/dev/sdb1 /mnt/lfs ext3 rw 0 0
/dev /mnt/lfs/dev none rw,bind 0 0
devpts /mnt/lfs/dev/pts devpts rw 0 0
shm /run/shm tmpfs rw 0 0
proc /mnt/lfs/proc proc rw 0 0
sysfs /mnt/lfs/sys sysfs rw 0 0