0

Laptop battery of my Lenovo Ideapad S205 ran out of power while upgrading to 14.10. I connected it and powered it up as usual, but forgot about resuming the upgrade. Then I put it to hibernate, and since then it's stuck in a boot loop whenever I turn it on.

The BIOS screen will load and the fan go on, but then it will turn black and the fan goes off. Then it does the same again, on and on.

I can boot from live USB fine. I have chrooted and resumed the upgrade from here (dpkg --configure -a, then apt-get upgrade again) and configured Grub to show the boot menu (edited /etc/default/grub, then update-grub && grub-install /dev/sda). But the boot loop remains. I guess it never gets to the point where Grub takes over.

Could it be that the hibernated session is broken and is preventing the boot procedure? Can I "clear" it? Edit: I tried to clear it with mkwap as suggested, but had no success. Btw the root and swap partitions are LVM, but the /boot partition is ext2.

What else could cause this behaviour?

Arild
  • 455
  • my clue would be to boot Super Grub2 Disk (iso) and boot the OS first..SG2D booted anything when grub was ruined. If more conveniant, maybe you can boot the ISO from your phone, check my instructions here The user interface allow you to download 99% of any Linux distros directly from the app. – Zbunjeni Nov 25 '14 at 23:19
  • I decided to solve my problem by reinstalling Ubuntu and then upgrading to 14.10 again. Turns out that it's actually the upgrade that causes this problem, because now I cannot boot into the fresh install either. – Arild Nov 29 '14 at 22:43

3 Answers3

1

You can clear the hibernated session by cleaning the swap partition (if isn't cleaned)

you can know what is your swap partition by running:

lsblk -f | grep swap
├─sda5 swap         81ede0e2-2b07-4986-9a98-cea7a5b22556 [SWAP]

Then, you can clear it:

mkswap /dev/YOUR-SWAP-PARTITION 
  • I just tried that but it didn't make any difference unfortunately. Good answer to one of my subquestions though. – Arild Nov 26 '14 at 17:31
0

May be your grub installation is corrupted. I would try to reinstall grub2:

apt-get --reinstall install grub2

If I can add, would not rule it took to check the integrity of fs in the partition in question.

fsck /dev/sdaX

Edit: Did you fsck /boot partition? In this case (separate /boot partition) the correct grub-install command is grub-install --boot-directory=<mnt>/boot /dev/sda , where <mnt> is the mount point of your previously mounted /boot partition.

bolichep
  • 418
  • 4
  • 5
  • Not working like so, he can't boot to desktop – Zbunjeni Nov 25 '14 at 23:14
  • @Zbunjeni He booted live and chrooted and resumed the upgrade...etc... – bolichep Nov 25 '14 at 23:18
  • Thanks. I reinstalled Grub2 and did update-grub and grub-install again, but no success. Fsck gave no useful messages either... – Arild Nov 26 '14 at 18:26
  • Load of hibernate image from swap partition is a kernel job, so no way (imho) can be the problem. I edited my answer with my thoughts. – bolichep Nov 27 '14 at 19:48
  • In response to the edit: Yes, I fscked both /dev/sda1 (/boot) and /dev/ubuntu-vg/root (/). I mount the root partition on /mnt and the boot partition on /mnt/boot, then I chroot into /mnt, so pwd is /, and I run the grub commands from there. Surely I don't want to instruct Grub2 to install itself to /boot/boot? Man page says it uses boot/grub by default (which, if relative to pwd, is /boot/grub) which seems correct to me. – Arild Nov 28 '14 at 19:54
  • @Arild You are right, the command you used is correct. – bolichep Nov 29 '14 at 07:38
0

I gave up, so I made a backup of my home directory using a LiveUSB and chroot, and then I reinstalled Ubuntu 14.04.

After that I upgraded the system again, only to find that it was actually the 14.10 upgrade that broke the system. I suspect that this bug might be the culprit, but I'm not sure, as I couldn't really reproduce the efibootmgr steps (/sys/firmware/efi did not exist).

In the end I reinstalled the system again, and will simply avoid upgrading.

Arild
  • 455