Monday, July 17, 2017

boot - Might have deleted kernel, but haven't shut off computer yet

My /boot was full and I couldn't update, so I tried to get rid of unnecessary files, but I think I might have deleted some things I shouldn't have. I don't know if grub or grub2 works, or whether or not I can still boot into windows. However, I haven't shut off my computer yet so I was hoping I could fix everything now. What can I do?


I used this command:



for akernel in $(dpkg -l 'linux-' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.)-([^0-9]+)/\1/")"'/d;s/^[^ ]* [^ ]* ([^ ])./\1/;/[0-9]/!d'); do sudo apt-get purge $akernel; done



uname -r



3.13.0-66-generic



ls -lhA /boot



total 29M


-rw-r--r-- 1 root root 1.2M Oct 7 12:34 abi-3.13.0-66-generic


-rw-r--r-- 1 root root 162K Oct 7 12:34 config-3.13.0-66-generic


drwxr-xr-x 5 root root 1.0K Dec 17 21:41 grub


-rw-r--r-- 1 root root 19M Oct 30 18:15 initrd.img-3.13.0-66-generic


drwx------ 2 root root 12K Feb 7 2015 lost+found


-rw-r--r-- 1 root root 173K Mar 12 2014 memtest86+.bin


-rw-r--r-- 1 root root 174K Mar 12 2014 memtest86+.elf


-rw-r--r-- 1 root root 175K Mar 12 2014 memtest86+_multiboot.bin


-rw------- 1 root root 3.3M Oct 7 12:34 System.map-3.13.0-66-generic


-rw------- 1 root root 5.6M Oct 7 12:34 vmlinuz-3.13.0-66-generic



du -h /boot



du: cannot read directory ‘/boot/lost+found’: Permission denied


12K /boot/lost+found


2.1M /boot/grub/i386-pc


9.0K /boot/grub/locale


2.3M /boot/grub/fonts


6.7M /boot/grub 36M /boot



df -h /boot



Filesystem Size Used Avail Use% Mounted on


/dev/sda3 361M 180M 159M 54% /boot


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...