[lfs-support] Boot message log location

Ken Moffat zarniwhoop at ntlworld.com
Thu Aug 30 12:57:34 PDT 2012


On Thu, Aug 30, 2012 at 07:05:29PM +0000, Mikie wrote:
> Hello all,
> 
> After completing the 7.1 book thru chapter 9 I reboot but get several fail messages.
> 
> The last one is fatal and refers to file system errors that must be fixed.
> 
> The only option is to press enter and reboot.
> 
> I can't read the boot messages so I need to look thru the log file.
> 
> I can't find it at /var/log ... as I have in other Linux distro's.
> 
> Where is this log kept in LFS?
> 
> Thanks.
> 
> 
 In a system where everything has come up ok, the log is at
/var/log/sys.log and everything (that fits) is available by running
dmesg.  But your system hasn't got that far.

 It's possible you really do have filesystem errors, but that
message might be provoked by other errors.  To begin with, you could
try running fsck from the host system on the LFS partition(s).

1. In your kernel .config, ensure you have enabled devtmpfs in your
kernel.  Also, of course, the filesystem(s) you are using, and the
device driver(s) for your disk controller(s).  And Magic-SysRQ, to
help with cleaner reboots if you have to continue debugging the
boot.

2. Review /etc/fstab - it's possible that errors in the contents can
cause fsck to fail.

3. Try booting, and watch to see if you can spot the first error
message from the bootscripts.  When that appears, the old Ctrl-S (to
stop the console scrolling) might work.  If you can read the gist of
the message, and what script it came from, you will be on the way
towards sorting it out.  If Ctrl-S does work, Ctrl-Q probably
resumes console output.  But rebooting after the first critical
error is probably the way to go: Magic SysRQ is at Alt-PrintScreen,
there is various documentation, but for boot (or shutdown!) issues
it's usually adequate to do Alt SysRQ s [ sync, if anything is
mounted - wait a few seconds ], Alt SysRQ u [ to unmount, again if
anything is mounted - wait for a message that drives have been
remounted R/O ]. and then Alt SysRQ b to boot.

4. Go back to the host, mount the lfs partition at /mnt/lfs, fix the
first error.  Perhaps just a missing mkdir or creating/editing a
config file which root can do - with care, root on the host can also
trash the host system - or if a missing package you will need to
chroot and then build it.  Rinse, repeat from step 3 for any further
errors.

5. If you can't capture the first message, try booting with
init=/bin/bash.  That isn't a nice place to work (nothing is
writable until mountfs has run, and that comes after checkfs), but
you can step through the scripts (in numeric order) in rcS.d with an
argument of 'start' to find what breaks.

 If you fix the error(s) there, but it still fails to come up in
runlevel 3, bring it up in runlevel 1 and then try the scripts in
runlevel 3.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the lfs-support mailing list