LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2014, 09:24 AM   #1
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Rep: Reputation: 13
I Did Something Stupid - Trying to Free Disk Space - Linux Kernel Question


I ran out of hard drive space on my computer and reading around removing old kernel's seemed like a good idea.

I following this guide and entered this code
Code:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
and quickly saw my current version of the kernel about to be removed (and was presented with a warning too) and hit control-c. This appears to have stopped it.

I quickly reinstalled my current kernel "linux-image-3.11-2-amd64".

At the moment,
Code:
sudo aptitude show linux-image-3.11-2-amd64
displays the following
Code:
ip  linux-image-3.11-2-amd64                                               - Linux 3.11 for 64-bit PCs
.

I dare not reboot my computer. What do I need to do to try and ensure that nothing has been removed that shouldn't be and ensure my computer will still boot next time?

Thanks and yes, I know I'm an idiot.
 
Old 09-28-2014, 10:01 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
Check in /boot or /boot/efi if kernel file is present, also kernel modules in /lib/modules and your bootloader config file, see if all is consistent
 
1 members found this post helpful.
Old 09-28-2014, 10:19 AM   #3
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13
ls /boot
Code:
$ls /boot
config-3.11-2-amd64  extlinux  grub  initrd.img-3.11-2-amd64  memtest86+.bin  memtest86+_multiboot.bin  System.map-3.11-2-amd64  vmlinuz-3.11-2-amd64
ls /lib/modules
Code:
ls  /lib/modules
2.6.32-5-amd64  2.6.39-2-amd64  3.11-2-amd64  3.2.0-2-amd64
Those two look fine, I'm unsure what my bootloader config is exactly, but according to this: https://wiki.debian.org/Grub
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
which I can't tell much from.

Does it look all ok to you?
 
Old 09-28-2014, 10:34 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
Look fine, look into /boot/grub/grub.cfg file, see if the boot entry matches the kernel filename
 
1 members found this post helpful.
Old 09-28-2014, 10:49 AM   #5
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 348

Original Poster
Rep: Reputation: 13
That's a much larger file, I won't paste it here as it's quite large, but needless to say it all appears to be there.

Thank you very much!
 
Old 09-28-2014, 10:57 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Run update-grub it will show the kernel & add to the grub menu.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 01:57 PM
linux partion is not shoing the proper free disk space rajini23 Linux - Desktop 4 02-01-2012 02:36 AM
how to know how much disk space is free on linux through programming payal_shah Linux - Hardware 3 12-12-2004 03:49 PM
Urgen:how to free the disk space in linux tejpatil Linux - Newbie 3 02-11-2004 06:27 AM


All times are GMT -5. The time now is 10:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration