LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 11-30-2005, 12:49 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 73
Question /boot dir?


I was checking out some directories I don't usually access in my Debian system and came across the /boot directory. When I go to this dir, I can see: screenshot.

or

Code:
login as: carlos
Using keyboard-interactive authentication.
Password:
Linux stricom 2.6.14-2-k7 #1 Sat Nov 26 14:04:05 UTC 2005 i686 GNU/Linux

Welcome to the Stricom Linux server. All actions | commands | history is monitored by the linux administrator.

Last login: Wed Nov 30 12:07:04 2005 from .mil
carlos@stricom:~$ cd /boot/
carlos@stricom:/boot$ ls
config-2.6.14-2-k7  initrd.img-2.6.14-2-k7  System.map-2.6.8-2-386
config-2.6.8-2-386  initrd.img-2.6.8-2-386  vmlinuz-2.6.14-2-k7
grub                System.map-2.6.14-2-k7  vmlinuz-2.6.8-2-386
My question is wondering if I am able to clean some of this up? The new kernel I downloaded and installed 2.6.14-2-k7 is fine. What can I remove from this /boot/ dir?

Last edited by carlosinfl; 11-30-2005 at 01:09 PM.
 
Old 11-30-2005, 01:06 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
You could remove your old 2.6.8 kernel files if you won't ever be using these again. You'll probably only save 6-7Mb however. If you delete the old kernel you might want to go to your grub subdirectory, edit menu.lst, and remove the sections that point to the removed kernel as well. Won't hurt to leave the old grub references in place, but they won't work after you remove the kernel so some cleanup would be good.
 
Old 11-30-2005, 01:07 PM   #3
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
Code:
apt-get remove kernel-image-2.6.8-2-386 --purge
 
Old 11-30-2005, 01:08 PM   #4
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 73
So how would I first go about cleaning up the /boot dir?

#rm ?
 
Old 11-30-2005, 01:18 PM   #5
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
See my above post. It will remove anything related to the old kernel. Do not start manually removing things from /boot
 
Old 11-30-2005, 01:31 PM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Quote:
Originally posted by dastrike
...It will remove anything related to the old kernel...
Now this seems so obvious I can't believe I've been manually doing things in the past! Does the apt-get command also remove stuff under /lib/modules etc? From your description, this sounds like what will happen. I would have to admit - much simpler and better than manual removal!
 
Old 11-30-2005, 01:35 PM   #7
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 73
Awesome!
 
Old 11-30-2005, 01:46 PM   #8
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
Yes. All the files provided by the package (except certain configuration files) will be removed when you remove the package with apt-get (or dpkg). Using the --purge option removes even any configuration files provided with the package.

To see a list of the files provided with a certain package, execute
Code:
dpkg -L packagename
If you want to find out what package a certain file belongs to, execute
Code:
dpkg -S filename

Last edited by dastrike; 11-30-2005 at 01:47 PM.
 
Old 11-30-2005, 02:10 PM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Quote:
Originally posted by dastrike
Yes. All the files provided by the package...
Thanks. I've used 'apt-get remove' often for other packages but for some reason it never clicked that I should do this to remove unused kernels. A short in the logic circuit of my brain I guess.
 
Old 11-30-2005, 05:09 PM   #10
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 771

Rep: Reputation: 32
If I can ask a supplementary question?

When I installed Debian I installed the 2.6.8 kernel. I'm now up to 2.6.14 with 2.6.12 as "LinuxOld".

Playing it safe, I haven't purged 2.6.8 since it was the "base" installation. Is it safe to do so?
 
Old 12-02-2005, 09:32 AM   #11
eplanamente
LQ Newbie
 
Registered: Dec 2004
Location: Switzerland
Distribution: Debian Sarge
Posts: 15

Rep: Reputation: 0
Yes, you can safely remove your 2.6.8 kernel.

Take just in mind the following thigs:
  • kernel 2.6.8 is the stable version, all the following are not! (this does not mean they don't work!)
  • keep always at least 2 working kernel on your system. If you brake the main one, you can use the second to still boot and solve the problem

Ciao
Emidio
 
Old 12-02-2005, 09:43 AM   #12
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
apt = advanced packaging tool
It really is!

I would consider removing the entry from GRUB if it bothers you, but unless you're running low on space in a /boot partition (assuming it is in its own partition), is there really a good reason to remove the stable kernel? Seems to me that in this case "cleaning up" means cutting off a branch you might later want to stand on.
 
Old 12-02-2005, 11:14 AM   #13
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 771

Rep: Reputation: 32
Point taken, It stays.
 
  


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
files in /boot dir djgerbavore Slackware 5 02-15-2005 11:29 AM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 08:54 PM
krecipes and ./configure -with-qt-dir=DIR disco rugby Linux - Software 4 06-13-2004 10:06 PM
Swap Dir..... Lost_linux_Noob Linux - Newbie 2 10-08-2003 12:32 AM
dir to ls loganwva Linux - General 7 04-22-2002 11:14 PM


All times are GMT -5. The time now is 11:37 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration