On 19.10.2014 11:00, Pierre Labastie wrote:
Hi,
beginning atop just to tell that I answer inside your message.
Le 18/10/2014 20:06, Andrei Banu a écrit :
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.
This error means there mkinitramfs does not find any kernel module in:
/lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib}
/lib/modules/$KERNEL_VERSION/kernel/drivers{block,ata,md,firewire}
/lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio}
/lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage}
If you are sure it is true, then building no-kmods is OK.
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.
What you can do is:
ls /dev/mapper (to check whether something exists there)
ls /dev/dm* (to check whether there are lvm volumes)
If there are no lvm volumes, it most probably shows that some option is
missing in the kernel configuration. You should reveiw those, as explained in
another post, and rebuild th initramfs.
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_lfs
rd_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
This is very complicated. I usually just have:
linux /vmlinuz-XXX root=/dev/mapper/<volume group>-<logical volume>
initrd /initrd.img-XXX
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?
As told above, no-kmods has nothing to do with LVM, it has to do with the
presence of kernel modules in /lib/modules. One thing to check: haven't you
forgotten the "make modules_install" command after compiling the kernel?
Anyway, if you have to rebuild the kernel, I'd suggest making it non modular
(when the new system starts OK, then you'll be able to work on modules) and
using no-kmods.
regards
Pierre
Hi Pierre,
This is what I have in /lib/modules/3.16.2:
root:/lib/modules/3.16.2/kernel# ls -R
.:
arch drivers net
./arch:
x86
./arch/x86:
kernel
./arch/x86/kernel:
iosf_mbi.ko
./drivers:
thermal
./drivers/thermal:
x86_pkg_temp_thermal.ko
./net:
ipv4 netfilter
./net/ipv4:
netfilter
./net/ipv4/netfilter:
iptable_nat.ko ipt_MASQUERADE.ko nf_nat_ipv4.ko
./net/netfilter:
nf_nat_ftp.ko nf_nat_irc.ko nf_nat.ko nf_nat_sip.ko xt_LOG.ko
xt_mark.ko xt_nat.ko
In /dev/mapper after boot into LFS, I have practically nothing. And I
did try to recompile
the kernel, made sure that the "Device mapper support" is built into the
kernel, I did try
mkinitramfs again, with the same result.
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