On 18.10.2014 21:47, David Brodie wrote:
On 18/10/14 19:06, Andrei Banu wrote:
Hello,
I have covered the entire LFS 7.6 but upon final reboot
it is not restarting. Grub normal shell (not rescue) appears.
I have tried to restart it manually but it doesn't boot properly.
I suppose the reason for this is the fact that I've built LFS over
LVM. I read that I shouldn't use LVM but unfortunately I was
already into it so I continued.
I found the page from BLFS for building an initramfs so I did
it (after installing cpio of course).
However when I run mkinitramfs with the version optional
argument I get a number of errors:
root:/lib/modules# ls
3.16.2
root:/lib/modules# cd /root
root:~# mkinitramfs 3.16.2
Creating initrd.img-3.16.2... cp: target
,,/tmp/initrd-work.RascqxUlRx/lib/modules/3.16.2" not a folder
depmod: ERROR: could not open directory
/tmp/initrd-work.RascqxUlRx/lib/modules/3.16.2: No such file or
directory
depmod: FATAL: could not search modules: No such file or directory
done.
So I built the no-kmods version but I get this error when I try to
boot:
The device /dev/mapper/vg_i5linux-lv_lfs which is supposed to
contain the root file system, does not exist.
+++
Please fix this problem and exit this shell.
Encountered a problem!
Dropping you to a shell.
sh-4.3: cannot set terminal process group (-1).
Inappropriate ioctl for device.
+++
And I end up with a disfunctional system resulted only from the
initrd with just a handful of binaries.
The commands I give in the grub prompt are these:
root (hd0,1)
linux /vmlinuz-3.16.2-lfs-7.6 ro
root=/dev/mapper/vg_i5linux-lv_lfsrd_NO_LUKS LANG=en_US.UTF-8
rd_LVM_LV=vg_i5linux/lv_swap
rd_LVM_LV=vg_i5linux/lv_lfs rd_NO_MD
initrd /initrd.img-no-kmods
boot
What do you think is the problem? I should have compiled the kernel
differently? Or the no-kmods initrd is not suitable for LVM? Or I've
done
a different mistake along the way?
Kind regards!
I think that the errors you are getting from mkinitramfs are because
it neglects to make the $WDIR/lib/modules directory - that is easily
fixed. But have you configured in Device Mapper Support into the
kernel which you built for LFS?
Device Drivers -->
Multiple Devices -->
Device Mapper Support
And if you did, did you specify that it should be built as a module
(in which case of course you will need the initramfs with kmods)?
David
Hi,
Thank you for your answer. Just to make sure (I was not 100% certain), I
have recompiled the kernel and made sure that Device Mapper Support is
built-in (not as a module). However I have the same problems:
- mkinitramfs returns the same errors
- when I boot with no-kmod initrd, it gives the same error ("...root
file system does not exist") and in /dev/mapper there is only one char
device called control but no vg_i5linux-lfs and no vg_i5linux-lv_swap.
And without initrd it ends with a panic.
I am not sure: is the kernel meant to create the /dev/mapper LVM logical
volumes or it's the initrd's job?
And how can I fix the mkinitramfs errors?
Thanks a lot!
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style