Le 05/11/2014 09:52, Anthony Price a écrit :
On 04/11/14 18:04, Ken Moffat wrote:
On Tue, Nov 04, 2014 at 11:30:04AM -0600, Bruce Dubbs wrote:
Anthony Price wrote:
cat /etc/lfs-release shows 7.6
findmnt gives the error message can't read /proc/mounts
Hmm. /proc is not mounted. That happens in the very first boot
script.
I wonder if it would be useful to go back to the book 7.2 and
reinstall
the bootscripts..
Well you could do that or edit /etc/sysconfig/rc.site to uncomment
#IPROMPT="yes" # Whether to display the interactive boot prompt
#itime="3" # The ammount of time (in seconds) to display the prompt
And then go through the boot scripts one at a time to see what is
happening.
-- Bruce
In the past I have sometimes had odd failures between the kernel
handing over to init and getting a prompt. In those cases I add
"init=/bin/sh" to the grub command line, then do as Bruce suggests
and step through the bootscripts - although, since we know that the
first bootscript is failing, it probably won't make a difference
here (unless something is seriously broken).
But the reference to rc.shutdown worries me - like Bruce, I have
never seen it mentioned on an LFS system, and strings /sbin/shutdown
does not find any reference to it. It sounds like something from a
different distro.
Is it possible that you have got a bogus "root= " entry in your
grub.cfg, which starts the LFS kernel, but tells it to use some
other filesystem (on which you have had another distro) as '/' ?
Or, alternatively, things from a previous distro are scattered on
the LFS-7.6 partition ? Yes, I see that you have set
/etc/lfs-release on that partition, but something is VERY odd here.
ĸen
Appending init=/bin/sh doesn't help. It merely dumps me at a prompt
where I can't even log in.
grub.cfg appears to be correct - the lfs install is on /dev/sda8 and
grub.cfg reads:
<>
set default=0
set timeout=5
insmod ext2
set root=(hd0,8)
menuentry "GNU/Linux, Linux 3.16.2-lfs-7.6" {
linux /boot/vmlinuz-3.16.2-lfs-7.6 root=/dev/sda8 ro
</>
This partition was created and formatted immediately before starting
the lfs build.
The other distro in use is xubuntu 14.10 - this does not use
rc.shutdown and there is no file of that name anywhere on the system.
At the grub startup screen the e(dit) option shows the lfs kernel but
the c option does not.
Using the c option's completion feature I can establish a path
/mnt/lfs/ but there is no kernel listed
Another oddity which may give (someone) a clue is that running
update-grub from the host lists actual kernels from the host distro
but not the lfs installation. The output is:
<>
Found linux image: /boot/vmlinuz-3.16.0-24-generic
Found initrd image: /boot/initrd.img-3.16.0-24-generic
Found linux image: /boot/vmlinuz-3.16.0-23-generic
Found initrd image: /boot/initrd.img-3.16.0-23-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Linux From Scratch (7.6) on /dev/sda8
</>
I'm frankly out of my depth with this.
Possibly, it may be best to write off a duff build and start again.
AP.
Hi Anthony,
Sorry to be direct (I am not a native English speaker and it is not easy
to find the right words, so please do not be hurt by what I'll write),
but it seems to me that there are several misconceptions here:
- First about init=/bin/sh. It is good news that you get a prompt! Since
the kernel launches the /bin/sh shell, it is exactly what should happen.
Now, nothing else is initialized (especially the PATH variable), so you
only have access to buitin commands in the shell. One good test is to
type "echo /*". You should see the list of files in the root directory.
- About grub: e(dit) allows you to edit the menu entries before booting.
It is useful for example if there is a typo in the menu entry, that you
just need to correct for booting. (c)command brings up a shell, which
allow you to type commands. So when you type "c", you are given a
prompt, not a menu entry.
- About /mnt/lfs: this is a directory on the host (that is, the Ubuntu
system here), which is empty normally, but where you _mount_ the
filesystem lying on /dev/sda8 during the LFS build, so the file
hierarchy on that filesystem becomes visible starting at /mnt/lfs. Now,
when you reboot, you want to access directly the filesystem itself, so
you strip the "/mnt/lfs" part. Your kernel image is either in the /boot
directory on /dev/sda8, or on another partition if you mounted that
partition on /mnt/lfs/boot, and followed the book instructions for
installing the kernel. I assume in the following it is on /dev/sda8. In
that case, you should find the kernel at (hd0,msdos8)/boot/vmlinuz...
- About update-grub: It _does_ find your LFS system: see the "Found
Linux From Scratch (7.6) on /dev/sda8" line, so you should have an entry
in the host's /boot/grub/grub.cfg for LFS. You may have to edit that
entry, though (after the line "### BEGIN /etc/grub.d/30_os-prober).
--
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