On 18.10.2014 21:53, Dan McGhee wrote:
On Oct 18, 2014, at 13:06, Andrei Banu <andrei.b...@redhost.ro> wrote:

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_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
First of all, I know nothing about LVM, and, therefore, my remarks might be out in 
“left field."  I’m assuming that your LFS exists on a *real* hard drive in a 
*real* partition.  LFS, in and of itself, does not need an initrd.img to boot.  If 
your LFS is on a real partition on a real hard drive, then you should be able to 
boot the kernel from grub.  When I’ve been dumped to a shell “sh-4.3” with the same 
error message, it was the result of the kernel trying to use the wrong partition for 
/.

I believe that when you are in a grub shell using the command line before boot 
the correct command is:

set root=(hdx, <some partion name>y)


I recommend using the grub completion ability if you don’t know exactly where 
your LFS is.

Try this from the grub command line:

set root=(hd  [then hit TAB to get your choices] , then
set root=(hd <whatever you selected when you hit TAB above>, [hit TAB again to 
see the partitions].

Keep doing this until you get a complete “set root=“ command then

linux /boot/vmlinuz3.16.2-lfs-7.6 ro root=/dev/<whatever device there is>  [the 
/dev/ device where your kernel is]
boot

I see what I think are two errors in your “grub commands” : it should be set 
root=<something> and there is no /boot/vmlinux….in your linux command.

The format for these commands can be *slightly* different on the command line 
compared to what you use in grub.cfg.

Hope this helps.
Dan
Hi Dan,

To be honest, I also didn't know anything about LVM before LFS (I avoided it at all cost before but now I let CentOS make the file systems and I head the bad luck to end up with LVM and I've noticed too late) and now I read some things to get familiar with this. The physical partition you are talking about (/dev/sda2) is a LVM2 partition on which I have a volume group with 4 logical volumes: lv_root (the initial host /), lv_swap (that I am using for a swap for both the host and LFS OS), lv_home (/home of the host Linux) and one created by myself called lfs used for building LFS.

So, my LFS being on a LVM logical volume, I believe I need LVM support.

You are right about the grub syntax regarding the set root=(hd0,1). It's not like a stated it above root(hd0,1). I was not careful when I typed it above. However in grub I give it correctly. And I do use the auto-completion feature of grub.

Thanks!
--
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

Reply via email to