[lfs-support] LFS-7.4 grub-install problem

Geoff Swan gswan3 at bigpond.net.au
Thu Sep 19 21:19:13 PDT 2013


I recently proceeded with the LFS-7.4 build, using a FC16 bootstrap
host, which built nicely all the way to the grub-install part in chapter
8.4.

The FC16 bootstrap OS is on sda and the new LFS build is on sdb, so
eventually sda can be removed and replaced with the LFS drive.

I have mounted the virtual kernel filesystems and performed the chroot
(6.66).
The chrooted /dev looks like this, which is expected.
root:/# ls -l /dev/sd*
brw-rw---- 1 root daemon 8,  0 Sep 20 13:33 /dev/sda
brw-rw---- 1 root daemon 8,  1 Sep 20 13:33 /dev/sda1
brw-rw---- 1 root daemon 8,  2 Sep 20 13:33 /dev/sda2
brw-rw---- 1 root daemon 8,  3 Sep 20 13:33 /dev/sda3
brw-rw---- 1 root daemon 8,  4 Sep 20 13:33 /dev/sda4
brw-rw---- 1 root daemon 8,  5 Sep 20 13:33 /dev/sda5
brw-rw---- 1 root daemon 8, 16 Sep 20 13:33 /dev/sdb
brw-rw---- 1 root daemon 8, 17 Sep 20 13:33 /dev/sdb1
brw-rw---- 1 root daemon 8, 18 Sep 20 13:33 /dev/sdb2
brw-rw---- 1 root daemon 8, 19 Sep 20 13:33 /dev/sdb3
brw-rw---- 1 root daemon 8, 20 Sep 20 13:33 /dev/sdb4
brw-rw---- 1 root daemon 8, 21 Sep 20 13:33 /dev/sdb5
brw-rw---- 1 root daemon 8, 22 Sep 20 13:33 /dev/sdb6
brw-rw---- 1 root daemon 8, 23 Sep 20 13:33 /dev/sdb7
brw-rw---- 1 root daemon 8, 24 Sep 20 13:33 /dev/sdb8
brw-rw---- 1 root daemon 8, 25 Sep 20 13:33 /dev/sdb9

However executing 'grub-install /dev/sdb' results in:
root:/# grub-install /dev/sdb
source_dir doesn't exist. Please specify --target or --directory

'df' gives a few errors, and, for some reason, /boot is now in /dev/sda2
instead of /dev/sdb2, as originally mounted.
root:/# df
df: '/sys/fs/cgroup/systemd': No such file or directory
df: '/sys/fs/cgroup/cpuset': No such file or directory
df: '/sys/fs/cgroup/cpu,cpuacct': No such file or directory
df: '/sys/fs/cgroup/memory': No such file or directory
df: '/sys/fs/cgroup/devices': No such file or directory
df: '/sys/fs/cgroup/freezer': No such file or directory
df: '/sys/fs/cgroup/net_cls': No such file or directory
df: '/sys/fs/cgroup/blkio': No such file or directory
df: '/sys/fs/cgroup/perf_event': No such file or directory
Filesystem      1K-blocks    Used Available Use% Mounted on
rootfs           51606140 2104720  46879980   5% /
devtmpfs          1854024       0   1854024   0% /dev
tmpfs             1863252       0   1863252   0% /dev/shm
/dev/sda4        51606140 2104720  46879980   5% /
/dev/sdb3        51606140 2104720  46879980   5% /
hugetlbfs         1854024       0   1854024   0% /dev/hugepages
/dev/sda2          495844   17134    453110   4% /boot
/dev/sda5         1032088   34052    945608   4% /home
/dev/sdb7         1032088   34052    945608   4% /home
/dev/sdb5        51606140  184200  48800500   1% /var
/dev/sdb6        10321208  158552   9638368   2% /tmp
/dev/sdb8        20642428  176064  19417788   1% /opt
/dev/sdb9        30963708 1727348  27663496   6% /sources
devtmpfs          1854024       0   1854024   0% /dev
shm               1863252       0   1863252   0% /dev/shm


The 'df' output from the un-chrooted system:
[root at localhost ~]# df
Filesystem      1K-blocks    Used Available Use% Mounted on
devtmpfs          1854024       0   1854024   0% /dev
tmpfs             1863252       0   1863252   0% /dev/shm
tmpfs             1863252     584   1862668   1% /run
/dev/sda4        50395844 2706628  45129216   6% /
tmpfs             1863252       0   1863252   0% /sys/fs/cgroup
tmpfs             1863252       0   1863252   0% /media
/dev/sda2          495844   31908    438336   7% /boot
/dev/sda5         1007896   17676    939020   2% /home
/dev/sda1          204580    8524    196056   5% /boot/efi
/dev/sdb3        51606140 2104720  46879980   5% /mnt/lfs
/dev/sdb2          495844   17134    453110   4% /mnt/lfs/boot
/dev/sdb5        51606140  184200  48800500   1% /mnt/lfs/var
/dev/sdb7         1032088   34052    945608   4% /mnt/lfs/home
/dev/sdb6        10321208  158552   9638368   2% /mnt/lfs/tmp
/dev/sdb8        20642428  176064  19417788   1% /mnt/lfs/opt
/dev/sdb9        30963708 1727348  27663496   6% /mnt/lfs/sources
shm               1863252       0   1863252   0% /mnt/lfs/dev/shm










More information about the lfs-support mailing list