On Wed, Nov 05, 2014 at 08:52:57AM +0000, Anthony Price wrote:
> 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.
> 
 That is correct - the start of userspace.  At that prompt you are
root, but on a read-only filesystem.  Root can then run through the
bootscripts *in order* i.e. from /etc/rcS.d/ S00mountvirtfs,
S05modules, etc and after all of those, I suppose, the scripts in
rc3.d if hte error has not shown up.

> 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.
> 

 OK, it does look correct.

> 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.
> 

 OK, it sounds like something from a gentoo-variant, or perhaps
slackware.

> 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

 I'm not sure what you are trying to do.  On my systems I have a
separate /boot partition, and from there the concept of /mnt/lfs does
not make sense [ /mnt/lfs would be meaningful on a root filesystem,
but only if whatever was intended to be at /mnt/lfs had been mounted
before you tried to access it ].

 You are referencing the LFS kernel in /boot, which is presumably a
directory on the xubuntu root filesystem (I think you said that
earlier, but here I am just deconstructing what you posted here).

 We know that grub finds a kernel by that name, all you need to do
to force init=/bin/sh (if you still want to do that) is
temporarily add that to the end of the existing commands.
> 
> 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 try to avoid running update-grub, or at least save the existing
grub.cfg first, becasue in LFS we do not set things up for
update-grub, we prefer to edit grub.cfg.

 BUT, that does imply that your LFS kernel is NOT in xubuntu's /boot
directory.

 If you are still able to boot the LFS system at all, can you run
'uname -a' ?  I would expect it to show the details for the LFS
kernel, but things really do not add up at the moment.

 Possibly, you need to reinstate the LFS details in grub.cfg - but
check that your LFS kernel really is where you are telling grub to
look.

 Perhaps your LFS kernel is in /boot on the LFS system ?  In that
case, grub.cfg would need a different set root= line for LFS only,
but ISTR that was discussed at the beginning of hte thread.

> 
> I'm frankly out of my depth with this.
> 
> Possibly, it may be best to write off a duff build and start again.
> 
> AP.

 Possibly.  But in general, it is best to extract as much
information as possible about what went wrong, so that you can
(hopefully) understand the errors and learn from them.  You have
spent several hours (or more probably days/weeks) getting to here,
and we do not yet know if there is something catastrophically wrong
with the build (e.g. programs linked to libraries in /tools), or
just an odd difference which nobody has seen before.

 Sometimes, starting again solves the problem, and nobody is any
wiser about what went wrong the first time, so we put it down to
user error.  Other times, the problem remains after a fresh build.

 Good luck.

ĸen
-- 
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
-- 
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