Boot problem

Discussion in 'Linux' started by ratsalad, May 17, 2019.

  1. ratsalad

    ratsalad MDL Novice

    Feb 27, 2010
    40
    3
    0
    After updating/upgrading debian my hd won't boot
    It works fine if not updated/upgraded.

    Any fix or just wait for the next kernel release?

    Thanks.
     
  2. John Sutherland

    John Sutherland MDL Addicted

    Oct 15, 2014
    867
    1,388
    30
    #2 John Sutherland, May 17, 2019
    Last edited: May 17, 2019
    Hello @ratsalad - It could be any number of reasons why your system doesn't boot, but since you mentioned it occurs after an update/upgrade, I'm going to ask a couple of questions about what I suspect might be the problem.

    1.) Do you have a separate partition for boot (the /boot directory)?

    2.) How many times have you updated the linux kernel since you installed the system?

    I ask because every time you update the kernel, a new config file and a new initrd.img file are created and written to /boot. If you keep doing this without purging any of the older kernels, sooner or later the boot partition is full and cannot accept any new config or initrd.img files, meaning you cannot boot the latest kernel. Have you tried purging any of the older kernels?

    Try this: Press your power-on button, and immediately after the bios splash screen disappears, hold down the left shift key. This will bring up the boot menu. Find "Advanced Options" and select the oldest kernel you find, then proceed with boot. If you're successful and get the the desktop, purge every kernel except the one you're running. Then install the latest kernel. This is what I do, I only keep the oldest kernel from the original installation and the latest kernel, and purge everything else.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    #3 Yen, May 19, 2019
    Last edited: May 19, 2019
    You might need some commands:

    After you have successfully booted the oldest kernel:

    This one shows your current kernel
    Code:
    uname -r
    This one lists all your installed kernel images:
    Code:
    dpkg --list | grep linux-image
    And the headers:
    Code:
    dpkg --list | grep linux-headers
    To purge then chosen ones: (Never try to purge the current one, replace XXX and repeat command for each version to be purged. Purge all them except the current = oldest.)
    Code:
    sudo apt-get --purge remove linux-image-XXX
    And finally update grub (boot loader) to reflect the changes:
    Code:
    sudo update-grub2
    Reboot.
    Debian update should then offer again the latest kernel to be installed.
    Sometimes if /boot is really full not even apt does work anymore.
    I guess John is right. Either the latest kernel has issues or your /boot is full.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. ratsalad

    ratsalad MDL Novice

    Feb 27, 2010
    40
    3
    0
    The only thing that worked was to boot from a grub flash drive.
     
  5. edizgeorgi

    edizgeorgi MDL Novice

    May 31, 2019
    4
    2
    0
    You can save the CD from the repair option. It seems difficult to recover otherwise