menu.lst备份

pjq@localhost ~ $ cat /media/sda11/boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

gfxmenu (hd0,10)/boot/message.cristal
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify ‘saved’ instead of a number. In this case, the default entry
# is the entry saved with the command ‘savedefault’.
# WARNING: If you are using dmraid do not use ‘savedefault’ or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password [‘–md5’] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command ‘lock’
# e.g. password topsecret
# password –md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

## ## End Default Options ##

title Gentoo-2.6.24-r8
root (hd0,7)
kernel /boot/kernel-2.6.24-r8 root=/dev/sda9 plash=silent,fadein,theme:gentoo vga=791 CONSOLE=/dev/tty1 ramdisk=8192
boot

title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

title Debian GNU/Linux, kernel 2.6.22-14-386
root (hd0,9)
kernel /boot/vmlinuz-2.6.22-14-386 root=UUID=310fe277-4520-4f33-99cc-53308864bc4a ro quiet splash
initrd /boot/initrd.img-2.6.22-14-386
boot

title Debian GNU/Linux, kernel 2.6.22-14-386 (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.22-14-386 root=UUID=310fe277-4520-4f33-99cc-53308864bc4a ro single
initrd /boot/initrd.img-2.6.22-14-386
boot

title Debian GNU/Linux, kernel 2.6.22-14-generic
root (hd0,9)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=310fe277-4520-4f33-99cc-53308864bc4a ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Debian GNU/Linux, kernel 2.6.22-14-generic (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=310fe277-4520-4f33-99cc-53308864bc4a ro single
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Debian GNU/Linux, kernel memtest86+
root (hd0,9)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:
#root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda8.
#title Debian GNU/Linux, kernel 2.6.22-14-generic (on /dev/sda8)
#root (hd0,7)
#kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda8 ro
#initrd /boot/initrd.img-2.6.22-14-generic
#savedefault
#boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda8.
#title Debian GNU/Linux, kernel 2.6.22-14-generic (recovery mode) (on /dev/sda8)
#root (hd0,7)
#kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda8 ro single
#initrd /boot/initrd.img-2.6.22-14-generic
#savedefault
#boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda8.
#title Debian GNU/Linux, kernel memtest86+ (on /dev/sda8)
#root (hd0,7)
#kernel /boot/memtest86+.bin
#savedefault
#boot
title Gentoo-2.6.24
ioot (hd0,7)
kernel /boot/kernel-2.6.24 root=/dev/sda9 splash quiet
boot
#title Gentoo Alsa Sound
#root (hd0,7)
#kernel /boot/kernel-gen root=/dev/sda9 splash quiet
#boot

#
#title Gentoo-gen
#root (hd0,7)
#kernel /boot/kernel-gen root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda9 udev splash quiet
#initrd /boot/initrd-gen

#title Gentoo install
#root (hd0,6)
#kernel /isolinux/gentoo root=/dev/ram0 init=/linuxrc acpi=ht looptype=squashfs loop=/image.squashfs udev nodevfs cdroot=/dev/hda7 doscsi vga=791 dokeymap splash=silent,theme:livecd-2007.0
#initrd /isolinux/gentoo.igz
#boot
title gentoo install
root (hd0,6)
kernel /isolinux/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz vga=791 splash=silent,theme:livecd-2006.1 CONSOLE=/dev/tty1 quiet
initrd /isolinux/gentoo.igz
boot

pjq@localhost ~ $ cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

#gfxmenu (hd0,10)/boot/message.cristal
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
default 0

timeout 4

title Gentoo-2.6.24-r8
root (hd0,7)
kernel /boot/kernel-2.6.24-r8 root=/dev/sda9 plash=silent,fadein,theme:gentoo vga=791 CONSOLE=/dev/tty1 ramdisk=8192
boot

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,10)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=310fe277-4520-4f33-99cc-53308864bc4a ro
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,10)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=310fe277-4520-4f33-99cc-53308864bc4a ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,10)
kernel /boot/memtest86+.bin
quiet

title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda8.
#title Debian GNU/Linux, kernel 2.6.22-14-generic (on /dev/sda8)
#root (hd0,7)
#kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda8 ro
#initrd /boot/initrd.img-2.6.22-14-generic
#savedefault
#boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda8.
#title Debian GNU/Linux, kernel 2.6.22-14-generic (recovery mode) (on /dev/sda8)
#root (hd0,7)
#kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda8 ro single
#initrd /boot/initrd.img-2.6.22-14-generic
#savedefault
#boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda8.
#title Debian GNU/Linux, kernel memtest86+ (on /dev/sda8)
#root (hd0,7)
#kernel /boot/memtest86+.bin
#savedefault
#boot
title Gentoo-2.6.24
ioot (hd0,7)
kernel /boot/kernel-2.6.24 root=/dev/sda9 splash quiet
boot
#title Gentoo Alsa Sound
#root (hd0,7)
#kernel /boot/kernel-gen root=/dev/sda9 splash quiet
#boot

#
#title Gentoo-gen
#root (hd0,7)
#kernel /boot/kernel-gen root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda9 udev splash quiet
#initrd /boot/initrd-gen

#title Gentoo install
#root (hd0,6)
#kernel /isolinux/gentoo root=/dev/ram0 init=/linuxrc acpi=ht looptype=squashfs loop=/image.squashfs udev nodevfs cdroot=/dev/hda7 doscsi vga=791 dokeymap splash=silent,theme:livecd-2007.0
#initrd /isolinux/gentoo.igz
#boot
title gentoo install
root (hd0,6)
kernel /isolinux/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz vga=791 splash=silent,theme:livecd-2006.1 CONSOLE=/dev/tty1 quiet
initrd /isolinux/gentoo.igz
boot

Gentoo修改文件默认编辑器

Gentoo修改文件默认编辑器
 
 
需要修改/etc/rc.conf文件:

#EDITOR=”/bin/nano”
EDITOR=”/usr/bin/vim”
#EDITOR=”/usr/bin/emacs”

选择自己的习惯的编辑器

照这样做了,用crontab -e测试了一下,好像没改过来,

然后用set|grep EDITOR看了一下

EDITOR=/bin/nano

想想修改.bashrc应该可以的吧

就将 EDITOR=/usr/bin/vim

添加到.bashrc里,重启一个终端,

crontab -e

是用vim 打开的

[Gentoo]Clean up world file

[Gentoo]Clean up world file
 
 
let me name it “reverse approach”.

You first make a back up and empty your world file:
1) gentoo ~ #cp /var/lib/portage/world ~/ && >/var/lib/portage/world
and then build it again:
2) gentoo ~ #regenworld

“regenworld” will put some packages which it thinks belong to the world
list.
Now check what portage finds to be useless when the world set is almost
empty:
3) gentoo ~ #emerge –depclean –pretend

From the list shown by the above command you chose the program packages
you *want* to have installed and put them in the world file. One “atom”
(“category-name/package-name”, without version numbers) per line.
Now do as “emerge –depclean” recommends:

4) gentoo ~ #emerge –update –newuse –deep world

Repeat the steps from (2) to (4) until (3) shows only packages that are
not familiar to you and (4) doesn’t want to install anything.

Next. Check if there are no system packages in the list (3) shows:
5) gentoo ~ #emerge -pve system

It should not happen that (3) wants to remove system packages but its
better to be sure.

Now “cross your fingers” and execute emerge –deplcean for real (without
–pretend).
6) emerge –deplcean
Immediately after (6) finishes you *must* do:
7) emerge -DuN world
8) revdep-rebuild

When (8) is successfully finished you should have a “clean” world set
within a healthy system.
If something goes wrong you can bring back your working “world” and
recheck all packages:

#cp ~/world /var/lib/portage/world
#emerge -DuN world
#revdep-rebuild