Results 1 to 9 of 9

Thread: irregular crashes -- need early boot messages

  1. #1
    Join Date
    May 2006
    Location
    Poona
    Beans
    71
    Distro
    Ubuntu 12.04 Precise Pangolin

    irregular crashes -- need early boot messages

    My machine crashes once in a while at boot. That is after grub a few messages flash by -- the last one usually is starting kernel -- and then it hangs.

    This happens once every 5 to 10 boots so it may be a h/w problem.

    /var/log/messages and dmesg dont show anything strange (on the next boot)

    So is there some way of turning on early-boot messages?

  2. #2
    Join Date
    Sep 2012
    Location
    12o4/14o4
    Beans
    Hidden!

  3. #3
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    7,520
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: irregular crashes -- need early boot messages

    rpm13; Hi !

    The short answer is no, with the implementation of upstart, there is no method available to log the startup messages. However one may see the boot messages. In 12.04 I do it like this:
    Edit /etc/default/grub (make a backup copy first, Murphy's law applies to computers too)
    Code:
    sudo cp /etc/default/grub /etc/default/grub-orig
    gksudo gedit /etc/default/grub
    Change these lines to this:
    GRUB_CMDLINE_LINUX_DEFAULT=""

    GRUB_GFXMODE=text
    Save and exit
    update grub:
    Code:
    sudo update-grub
    On boot; ctl-s will pause, ctl-o resume boot (maybe). Might try the scroll lock key.
    Other means: after booted to the gui, start a terminal and stop lightdm:
    Code:
    sudo service lightdm stop
    Then ctl-alt-f7 will have boot messages on what was the GUI interface.
    Code:
    sudo service lightdm start
    to restart the desktop.
    just try'n to help
    Last edited by Bashing-om; January 21st, 2013 at 07:39 PM. Reason: missplaced addend

  4. #4
    Join Date
    May 2006
    Location
    Poona
    Beans
    71
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: irregular crashes -- need early boot messages

    Quote Originally Posted by Bashing-om View Post
    rpm13; Hi !

    The short answer is no, with the implementation of upstart, there is no method available to log the startup messages.
    Yes as you've predicted bootlogd does not work. I get an (almost) empty file containing these 2 lines:

    Code:
    (Nothing has been logged yet.)
    Tue Jan 22 00:16:47 2013: INIT: Switching to runlevel: 6

    However one may see the boot messages. In 12.04 I do it like this:
    Edit /etc/default/grub (make a backup copy first, Murphy's law applies to computers too)
    Code:
    sudo cp /etc/default/grub /etc/default/grub-orig
    gksudo gedit /etc/default/grub
    Change these lines to this:
    Save and exit
    update grub:
    Code:
    sudo update-grub
    On boot; ctl-s will pause, ctl-o resume boot (maybe). Might try the scroll lock key.
    Other means: after booted to the gui, start a terminal and stop lightdm:
    Code:
    sudo service lightdm stop
    Then ctl-alt-f7 will have boot messages on what was the GUI interface.
    Code:
    sudo service lightdm start
    to restart the desktop.
    just try'n to help
    No crash from my question. So dont have any new data yet.

    I was contemplating a BIOS reflash. Seems quite risky though…
    Last edited by rpm13; January 22nd, 2013 at 09:57 AM.

  5. #5
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    7,520
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: irregular crashes -- need early boot messages

    rpm13;

    I also am somewhat hesitant about messing around with a bios update by flashing it. It can be done, I have contemplated such before I got all my hitchs worked out on my primary system. The conclusion I reached at that time was to purchase a up-to-date bios chip (my boards are AMD based) the chip is cheap. Then in the event the new bios introduced other problems I could easily revert back to the old chip.

    On the subject of intermittent crashes, might keep an eye on the .xsessions-errors log in your home directory, and of course look at /var/log/Xorg.0.log. A likely candidate is xserver seeing a difficulty at times.

    my 2 pints worth

  6. #6
    Join Date
    May 2006
    Location
    Poona
    Beans
    71
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: irregular crashes -- need early boot messages

    Quote Originally Posted by Bashing-om View Post
    rpm13;

    I also am somewhat hesitant about messing around with a bios update by flashing it. It can be done, I have contemplated such before I got all my hitchs worked out on my primary system. The conclusion I reached at that time was to purchase a up-to-date bios chip (my boards are AMD based) the chip is cheap. Then in the event the new bios introduced other problems I could easily revert back to the old chip.

    On the subject of intermittent crashes, might keep an eye on the .xsessions-errors log in your home directory, and of course look at /var/log/Xorg.0.log. A likely candidate is xserver seeing a difficulty at times.

    my 2 pints worth
    Ok heres a crash picture.
    Note its long before X starts --probably before filesystems are mounted.
    Its just after grub starts loading the OS.

    Since Ive no success in capturing a log file, here is some hand copied stuff from the console when the system hung. Note nn means some number that I did not copy.
    Code:
    Pid 63 comm: udevd Tainted G
    n n panic/n
    n n oops/n
    n n no_context/n
    n n __bad_no_semaphore/n
    etc
    do_page_fault
    do_page_fault
    do_page_fault
    bad_area_no_semaphore
    error_code
    io_read
    ata_sff_data_xfer
    ata_pio_sector
    ata_pio_sectors
    ata<something>
    ata<something>
    common_interrupt
    <bottom of screen>
    Last edited by rpm13; January 23rd, 2013 at 05:37 AM.

  7. #7
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    7,520
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: irregular crashes -- need early boot messages

    rpm13;

    It does look like the error appears early on in the boot process. A stab at this, rebuild the initramfs:
    Code:
    sudo update-initramfs -u
    If that still results in problems, next is to re-write /boot/initrd.img

    update-initramfs: failed for /boot/initrd.img… error message. Some have success with the following commands, so you can try them first:
    Code:
    sudo dpkg --configure -a
    sudo apt-get update
    But don’t be surprised to find yourself back where you started, but here is a trick that seems rather unlikely, but has worked before: move or delete initrd.img. If that file is corrupted, you would think it would just get overwritten in the update, yet deleting (or moving, if you want to play it safe) initrd.img has made all the difference in some instances.

    It’s probably safer just to move the file, since if a replacement is successfully generated, you can delete it later. To move it to your home folder, enter the following command, remembering to replace the kernel number with the one you’re moving:

    Code:
    sudo mv /boot/initrd.img-2.6.32-22-generic ~/
    poke'n see what results

  8. #8
    Join Date
    May 2006
    Location
    Poona
    Beans
    71
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: irregular crashes -- need early boot messages

    Quote Originally Posted by Bashing-om View Post
    rpm13;

    It does look like the error appears early on in the boot process. A stab at this, rebuild the initramfs:
    <snipped>
    Hi Bashing-om.

    Thanks for your thoughts and comments.

    Ran:
    Code:
    $ sudo update-initramfs -u
    update-initramfs: Generating /boot/initrd.img-2.6.32-5-686
    WARNING: could not open /var/tmp/mkinitramfs_OOAKgx/lib/modules/2.6.32-5-686/modules.builtin: No such file or directory
    Now this looks like this bug which Ive been seeing for a while but did not take to seriously.

    After that Im getting parsing errors with your instructions.
    [It seems you meant to say something but there was a slip of the editor]

  9. #9
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    7,520
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: irregular crashes -- need early boot messages

    rpm13;
    Did you replace the kernel number with the kernel number you are presently running?
    (the example number I provided is an old one)
    Code:
    uname -r
    will generate the current kernel number.

    Rerun the update-initramfs command with the appropriate kernel number, see what haps.
    In the mean time- I will look at the reference you provided.
    puzzles have solutions

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •