+ -
当前位置:首页 → 问答吧 → [求助]升级 openrc 系统出问题了。

[求助]升级 openrc 系统出问题了。

时间:2009-10-04

来源:互联网

刚刚装好KDE4.3,系统都设置好了,打算升级下OpenRC.结果就出问题了
升级的时候参考下面的网页
http://www.gentoo.org/doc/zh_cn/openrc-migration.xml
http://www.linuxsir.org/bbs/thread327354.html
我安装了LVM。
屏幕信息提示:
代码:
Failed to set user font
ERROR:consolefont failed to start


Filesystems couldn't be fixed
rc: Aborting!
fsck:caught SIGTERM,aborting
现在用户可以登录,cd ls 命令可以用,startx命令无效,emerge 命令无效

作者: zrael   发布时间: 2009-10-04

哈?是不是real_root沒有指定呀?

作者: 亞利艾爾   发布时间: 2009-10-04

谢谢,如何查看?

作者: zrael   发布时间: 2009-10-04

cat /proc
cat : /proc : is a directory

ls /usr 是空的

我的分区情况是
sda1 /boot
sda2 /
sda5 swap
sda6 lvm

lvm---包含目录
usr home opt var tmp

现在用 ls 查看只有 usr是空的,其他目录都有文件

作者: zrael   发布时间: 2009-10-04

可以用命令mount /dev/vd/usr /usr 挂载

作者: zrael   发布时间: 2009-10-04

。。。。。。发现挂载 /usr 之后 startx 可以进KDE了。但是进kde之后鼠标键盘用不了。请教下问题可能出在哪里?

作者: zrael   发布时间: 2009-10-04

滑鼠鍵盤用不了看faq……(這個問題不知道被問了多少遍了……)有好幾個方法。個人比較推薦用hal的那個方法。

還有,我不知道你是不是用lvm了(我是說rc-update add lvm boot && rc-update add device-mapper boot)。

作者: 亞利艾爾   发布时间: 2009-10-04

引用:
作者: 亞利艾爾
滑鼠鍵盤用不了看faq……(這個問題不知道被問了多少遍了……)有好幾個方法。個人比較推薦用hal的那個方法。

還有,我不知道你是不是用lvm了(我是說rc-update add lvm boot && rc-update add device-mapper boot)。
谢谢回复, rc-update show 看到有hald 在 default 级别启动,

rc-update show | grep lvm
代码:
lvm | boot
rc-update show | grep device-mapper
代码:
device-mapper | boot
我的usr hoem opt var tmp 都在LVM上面,偏偏就是usr没能自动挂载上,fstab 文件里面挂载这5个目录的顺序是usr home opt var tmp

作者: zrael   发布时间: 2009-10-04

/var/log/rc.log

代码:
rc shutdown logging started at Sun Oct 4 17:48:26 2009

* Stopping udevd...
 [ ok ]
* lvm uses addon code which is deprecated
* and may not be available in the future.
* Shutting down the Logical Volume Manager
* Shutting Down logical volume: /dev/vd/usr ...
 [ ok ]
* Finished Shutting down the Logical Volume Manager

rc shutdown logging stopped at Sun Oct 4 17:48:27 2009


rc boot logging started at Mon Oct 5 01:48:59 2009

* Setting system clock using the hardware clock [Local Time]...
 [ ok ]
* Checking root filesystem...
Reiserfs super block in block 16 on 0x802 of format 3.6 with standard journal
Blocks (total/free): 1050240/821746 by 4096 bytes
Filesystem is clean
Filesystem seems mounted read-only. Skipping journal replay.
Checking internal tree..finished
 [ ok ]
* Remounting root filesystem read/write...
 [ ok ]
* Updating modprobe.conf by hand...
 [ ok ]
* lvm uses addon code which is deprecated
* and may not be available in the future.
* Setting up the Logical Volume Manager...
 [ ok ]
* device-mapper uses addon code which is deprecated
* and may not be available in the future.
* checkfs uses addon code which is deprecated
* and may not be available in the future.
* Setting up dm-crypt mappings...
 [ ok ]
* Checking all filesystems...
/dev/sda1: clean, 38/16064 files, 17737/64228 blocks
Reiserfs super block in block 16 on 0xfe00 of format 3.6 with standard journal
Blocks (total/free): 2621440/1629937 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/usr' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe01 of format 3.6 with standard journal
Blocks (total/free): 5242880/4465153 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/home' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe02 of format 3.6 with standard journal
Blocks (total/free): 1310720/1269641 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/opt' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe03 of format 3.6 with standard journal
Blocks (total/free): 2621440/2578164 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/var' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe04 of format 3.6 with standard journal
Blocks (total/free): 524288/516023 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/tmp' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
 [ ok ]
* Mounting local filesystems...
 [ ok ]
* Mounting USB device filesystem (usbfs)...
/etc/init.d/localmount: line 30: getent: command not found
 [ ok ]
* Mounting misc binary format filesystem...
 [ ok ]
* Activating (possible) swap...
 [ ok ]
* localmount uses addon code which is deprecated
* and may not be available in the future.
* Setting up dm-crypt mappings...
 [ ok ]
* Setting hostname to GT...
 [ ok ]
* Configuring kernel parameters...
 [ ok ]
/etc/init.d/keymaps: line 22: is_uml_sys: command not found
/etc/init.d/keymaps: line 22: is_xenU_sys: command not found
/etc/init.d/keymaps: line 39: /usr/bin/kbd_mode: No such file or directory
* Loading key mappings...
cannot open file us
* Error loading key mappings
 [ !! ]
/etc/init.d/keymaps: line 60: dumpkeys: command not found
* Setting terminal encoding to UTF-8...
 [ ok ]
/etc/init.d/consolefont: line 12: is_uml_sys: command not found
/etc/init.d/consolefont: line 12: is_xenU_sys: command not found
* Setting user font...
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
* Failed to set user font
 [ !! ]
* ERROR: consolefont failed to start
* Checking local filesystems ...
/dev/sda1: clean, 38/16064 files, 17737/64228 blocks
Reiserfs super block in block 16 on 0xfe00 of format 3.6 with standard journal
Blocks (total/free): 2621440/1629937 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/usr' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe01 of format 3.6 with standard journal
Blocks (total/free): 5242880/4465153 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/home is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe02 of format 3.6 with standard journal
Blocks (total/free): 1310720/1269641 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/opt is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe03 of format 3.6 with standard journal
Blocks (total/free): 2621440/2578164 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/var is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe04 of format 3.6 with standard journal
Blocks (total/free): 524288/516023 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/tmp is mounted with write permissions, cannot check it
* Filesystems couldn't be fixed
 [ !! ]
* rc: Aborting!
* fsck: caught SIGTERM, aborting

rc boot logging stopped at Sun Oct 4 17:49:14 2009


rc default logging started at Sun Oct 4 17:49:14 2009

/etc/init.d/consolefont: line 12: is_uml_sys: command not found
/etc/init.d/consolefont: line 12: is_xenU_sys: command not found
* Setting user font...
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
Cannot open font file default8x16
* Failed to set user font
 [ !! ]
* ERROR: consolefont failed to start
* Checking local filesystems ...
/dev/sda1: clean, 38/16064 files, 17737/64228 blocks
Reiserfs super block in block 16 on 0xfe00 of format 3.6 with standard journal
Blocks (total/free): 2621440/1629937 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/usr' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe01 of format 3.6 with standard journal
Blocks (total/free): 5242880/4465153 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/home is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe02 of format 3.6 with standard journal
Blocks (total/free): 1310720/1269641 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/opt is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe03 of format 3.6 with standard journal
Blocks (total/free): 2621440/2578162 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/var is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe04 of format 3.6 with standard journal
Blocks (total/free): 524288/516023 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/tmp is mounted with write permissions, cannot check it
* Filesystems couldn't be fixed
 [ !! ]
* rc: Aborting!
* fsck: caught SIGTERM, aborting

rc default logging stopped at Sun Oct 4 17:49:15 2009

作者: zrael   发布时间: 2009-10-04

如果就是只有usr沒有掛上的話,你可能要檢查一下/etc/fstab中/usr那項寫的對不對了,仔細看看。而且好玩的是你的掛載發生在檢查之前。你是用genkernel的嗎?不是,把你的initramfs給看一下。我是說啟動的腳本。
  最後,hald在default還能滑鼠不動的話,看下INPUT_DEVICES……我說有hal的方法不只是hald在default。到FAQ把帖子看完吧……

作者: 亞利艾爾   发布时间: 2009-10-04

引用:
作者: 亞利艾爾
如果就是只有usr沒有掛上的話,你可能要檢查一下/etc/fstab中/usr那項寫的對不對了,仔細看看。而且好玩的是你的掛載發生在檢查之前。你是用genkernel的嗎?不是,把你的initramfs給看一下。我是說啟動的腳本。
  最後,hald在default還能滑鼠不動的話,看下INPUT_DEVICES……我說有hal的方法不只是hald在default。到FAQ把帖子看完吧……
/etc/fstab 里面的/usr 检查过没错的,而且在我升级openrc之前系统用了一天多,其中重启过好多遍都是正常的,内核不是genkernel编译的,是手动编译的,在升级openrc之前系统是一点问题都没有的。我进系统手动挂载 /usr 后root执行startx 进入桌面,但是鼠标键盘动不了,普通用户startx则不能启动闪一下就自动退出了(这个如果不是关键问题可以先不管),现在很痛苦的是/usr不能自己挂载,但是我有留意系统加载登录前的信息,/usr 是和其他目录一样有同过挂载的,到了登录系统那里就没有挂载就不知道原因了。
因为我刚刚接触gentoo,很多命令信息还不会看,还希望你能给出具体命令或者文件路径查看信息。谢谢~

作者: zrael   发布时间: 2009-10-04

我只能說OpenRC用戶搞LVM這裡出問題的人不少。問題也是各式各樣。你的是手動編譯的話,有沒有自己製作initramfs?如果有製作的話,把init腳本給大家看一下吧。如果沒有製作initramfs,強烈建議你用genkernel編譯一下內核吧,順帶製作下提供lvm的initramfs。關於genkernel的lvm設置,只能到http://www.gentoo-wiki.com上找了。官方有一個小的筆記。

http://www.gentoo.org/doc/zh_cn/lvm2.xml

  關於X目前先不說吧。你最好把你的emerge --info發下。普通用戶那個確實好像不是關鍵問題,我的也是這樣,好像設置下.xinitrc就沒有問題了。
  我從你的/var/log/rc.log沒有看到你/usr被掛載的信息。你把你看到的信息也給一下,另外把/etc/fstab也給一下,謝謝。

作者: 亞利艾爾   发布时间: 2009-10-04

手動編譯沒有製作initramfs,我一会试试genkernel
fstab
代码:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't 
# needed; notail increases performance of ReiserFS (at the expense of storage 
# efficiency). It's safe to drop the noatime options if you want and to 
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1 /boot ext2 noauto,noatime     1 2
/dev/sda2 / reiserfs    noatime 0 1
#/dev/sda5 none swap sw 0 0

#Logical volumes
/dev/vd/usr /usr reiserfs       noatime 0 2
/dev/vd/home /home reiserfs     noatime 0 2
/dev/vd/opt /opt reiserfs       noatime 0 2
/dev/vd/var /var reiserfs       noatime 0 2
/dev/vd/tmp /tmp reiserfs       noatime 0 2

#/dev/sda7 /mnt/sda7    ntfs-3g noatime 0 0
/dev/sda5 none swap sw 0 0
/dev/cdrom /mnt/cdrom   auto noauto,ro,user     0 0



# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)

shm /dev/shm    tmpfs nodev,nosuid,noexec       0 0
emerge --info
代码:
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r1-i686-Intel-R-_Core-TM-2_Duo_CPU_T5270_@_1.40GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 01 Oct 2009 07:45:01 +0000
app-shells/bash: 4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python: 2.6.2-r1
dev-util/cmake: 2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc: 0.4.3-r3
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.63-r1
sys-devel/automake: 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.kaist.ac.kr/pub/gentoo/"
LANG="zh_CN.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="zh_CN en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/gentoo-china"
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
USE="X a52 aac ac3 acl acpi alsa arts audiofile berkdb branding bzip2 cgi cjk cleartype cli cracklib crypt cups dbus dir dri dvd encode esd ffmpeg fftw flac fortran gd gdbm gif gpm hal hddtemp iconv isdnlog jpeg jpeg2k jpg kde kontact lame laptop mad mkv mng modplug modules mpeg mudflap musepack mysql nas ncurses nls nptl nptlonly opengl openmp oss pam pcre pdf perl png pppd python q qt3support qt4 rar readline reflection session shorten smp spl sql sse2 sse3 ssl startup-notification svg sysfs tcpd timidity unicode usb vcd vorbis wavpack webkit wifi win32codecs wma x86 xcb xft xorg xulrunner zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard synaptics mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN en" USERLAND="GNU" VIDEO_CARDS="i810 intel"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

作者: zrael   发布时间: 2009-10-05

既然OpenRC这么好为什么不把它整成默认的?

刚看了看,还是~x86呢。

作者: tomguy   发布时间: 2009-10-05

目前變化比較多,而且bug清理工作沒有到可以發佈的程度,所有目前OpenRC還不是穩定可用。要知道Gentoo的穩定分支更多的面向生產環境,這裡可不想因為OpenRC的開發問題而出錯。

作者: 亞利艾爾   发布时间: 2009-10-05

既然你沒有細看Faq我就說了吧,下次說要認真看文檔也要認真看FAQ。你把現在INPUT_DEVICES加上evdev,應該能解決你滑鼠和鍵盤的問題。

至於LVM我沒有想法。你再試試看。genkernel做initramfs不會影響你多少時間。不過我很關心你怎麼做到不做initramfs怎麼開lvm的……

作者: 亞利艾爾   发布时间: 2009-10-05

谢谢,昨天搜索资料的时候才发现有 INPUT_DEVICES加上evdev 这一项,以前浏览了一下FAQ,没仔细看。
/boot/grub/grub.conf
代码:
title=Gentoo (kernel-2.6-31-r1)
root (hd0,0)
kernel /boot/kernel-2.6.31-r1 root=/dev/sda2 video=vesafb vga=792
我是把lvm支持编进内核的,而且我的boot / 都不在lvm里面,是单独放了一个分区。我刚刚试过把usr这个逻辑卷删了重新建立格式化,问题还是一样,应该不是文件系统的问题导致不能自动挂载吧?

昨天本来想用genkernel,结果我装系统的时候没把这工具装上,现在进系统无线网卡又不能用(在宿舍只有无线),今天回公司接网线继续搞。。。

/etc/init.d/fsck start
代码:
/dev/sda1: clean, 38/16064 files, 17737/64228 blocks
Reiserfs super block in block 16 on 0xfe00 of format 3.6 with standard journal
Blocks (total/free): 2621440/1629937 by 4096 bytes
Filesystem is clean
Replaying journal..
Reiserfs journal '/dev/vd/usr' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Reiserfs super block in block 16 on 0xfe01 of format 3.6 with standard journal
Blocks (total/free): 5242880/4465153 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/home is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe02 of format 3.6 with standard journal
Blocks (total/free): 1310720/1269641 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/opt is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe03 of format 3.6 with standard journal
Blocks (total/free): 2621440/2578162 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/var is mounted with write permissions, cannot check it
Reiserfs super block in block 16 on 0xfe04 of format 3.6 with standard journal
Blocks (total/free): 524288/516023 by 4096 bytes
Filesystem is NOT clean
Partition /dev/vd/tmp is mounted with write permissions, cannot check it
* Filesystems couldn't be fixed
* ERROR: fsck failed to start

作者: zrael   发布时间: 2009-10-05

引用:
作者: 亞利艾爾
不過我很關心你怎麼做到不做initramfs怎麼開lvm的……
根目录没有在 lvm 上。

作者: SDE   发布时间: 2009-10-05