From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [ANNOUNCE] clean-boot.pl version 0.1 - Simple utility to clean up /boot and /lib/modules
Date: Fri, 02 Dec 2005 20:30:15 -0500 [thread overview]
Message-ID: <1133573415.32583.108.camel@localhost.localdomain> (raw)
I'm not sure if this has been done already or not (let me know if it
has), but I've just noticed that after playing with several
developmental kernels I had about 30 to 40 different versions of
vmlinuz, initrd.img, config, and System.maps in my /boot directory, not
to mention all the modules loaded in /lib/modules.
So I wrote this perl script that let me pick and choose what I wanted to
clean up. Be careful, this must be run as root, and although the
default is to do nothing, if you hit a "y" in the wrong place, you can
lose that kernel.
The script is here:
http://www.kihontech.com/code/clean-boot.pl
Here's the usage:
# ./clean-boot.pl -h
usage: clean-boot.pl [-b boot_dir] [-m module_dir]
(version 0.1)
default boot_dir = /boot
default module_dir = /lib/modules
It's run like the following:
---
#./clean-boot.pl
List of versions found:
2.6.12-1-386 2.6.14 2.6.14-2-386
2.6.14-2-k7-smp 2.6.14-kthrt2 2.6.14-rt13
2.6.14-rt13-logdev1 2.6.14-rt15 2.6.14-rt20
2.6.15-rc3
Remove files for version 2.6.12-1-386 [y/N/l/q/?]: ?
y - remove files from boot and modules
n [default] - skip this version
l - list the found versions again
q - quit
? - display this message
Remove files for version 2.6.12-1-386 [y/N/l/q/?]: q
---
If you hit "y" (or yes or ye, case is ignored), it will then remove any
of the vmlinuz, initrd.img, config and System.map files for version
2.6.12-1-386 in /boot and the directory /lib/modules/2.6.12-1-386.
This is under just a public license, no warranty, so just be careful not
to delete too much.
Also remember to update lilo or grub, since this doesn't handle that.
Comments?
-- Steve
next reply other threads:[~2005-12-03 1:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-03 1:30 Steven Rostedt [this message]
2005-12-03 8:57 ` Willy Tarreau
2005-12-06 17:01 ` Patrick McLean
2005-12-06 22:12 ` Willy Tarreau
2005-12-04 0:30 ` Peter Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1133573415.32583.108.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome