Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 14268  / 1 Year ago, sat, november 12, 2022, 7:29:50

Because I wanted to get more free space on my HDD, I deleted old kernels (dont ask me why I was so mad.). I accidentally deleted the active kernel too (3.2.0-27 on Ubuntu 12.04).



First I couldn't boot. I installed the kernels 3.2.0-23 and 3.2.0-27 via a live system (see here).



Now, when I start my system now, I only get these lines:



mountall: Event failed
fsck from util-linux 2.20.1
/dev/sda1: clean, 832254/40099840 files, 21092083/160394239 blocks
* Stopping Flush boot log to disk
* Stopping Enabling additional executable binary formats
* Starting bluetooth daemon


Other PC specs:




  • Intel i5 2500K 4x 3.3 GHz

  • 8 GB RAM

  • /dev/sda1 is Ubuntu, about 1400GB

  • Zotac Nvidia GTX 560

  • ASRock Z68 Pro3



Thank you in advance!



EDIT: Here you can find some log files from /var/log: kern.log boot.log


More From » boot

 Answers
7

An option is a manual recovery:



Files are the easiest part. You can do what Ramchandra suggested, but if you want to preserve your apps you should avoid reinstalling (as that would, as you've seen, remove the apps.) If you want to avoid uninstalling the boot with a missing kernel:




  1. Boot to LiveCD.


  2. Using nautilus, open up the broken partition.


  3. Navigate to /home/myusernamehere. All your files will be there.




Some other files you might want to save:




  • /etc/apt/sources.list, if you have any manual repos.



After you are done with this, stick it onto a flash drive or email it to yourself.



Apps is a trickier part. I have come up with a somewhat roundabout solution that will take some time (most of it without you actively participating), but this should recover your apps (without settings/configurations)




  1. Stick around LiveCD.


  2. Navigate to /usr/lib. (It may take a while to load.)


  3. Woah! Huge amount of folders. Open up gedit in liveCD.


  4. Type this in gedit:



    #!/bin/sh



    sudo apt-get install folder1 folder2 folder3




...Where folder1 folder2 folder3 are the names of the folders.



These are all the programs you have installed on ubuntu (I think). Some of these (about 50%, maybe more) come with the system, so the arent necessary, but a safe bet is just put everything.



Another place to look for apps is /etc and /etc/alternatives. (Update me if I am missing any spots, internet!)



Save the file as .sh and email or flash drive it.



Now, when you first start up your computer (after total reinstall) you can run this script to sudo apt-get all your programs that you previously had. They'll be good as new!


[#36766] Saturday, November 12, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enefiama

Total Points: 43
Total Questions: 125
Total Answers: 102

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
enefiama questions
;