dropping to debug shell
sh:can't access tty:control turned off
问题是在什么情况下出现的?是否可以重现?
不太明白楼主的问题,所以不能确定是否和贴出来的
一大段内容是否有关。
huanzu 于 2011-12-11 16:36:18发表:
我查到相关信息 但是 但不懂 有高人 帮我看看吗?
http://fedoraproject.org/wiki/How_to_debug_Dracut_problems (上面写的有我出现的问题 不过看不懂)
Foreword
If you are experiencing a problem with system initialization due to Dracut, please see the common bugs document before filing a bug. Some easy configuration tweaks that fix a wide range of issues may be listed there. If the problem you are seeing is not listed there or none of the workarounds seem to help, please consider filing a bug to help us make Fedora run better on your hardware.
Be prepared to include some information (logs) about your system as well. These should be complete (no snippets please), not in an archive, uncompressed, with MIME type set as text/plain.
Contents [hide]
1 Identifying your problem area
2 Information to include in your report
2.1 All bug reports
2.2 Logical Volume Management related problems
2.3 Software RAID related problems
2.4 Network root device related problems
3 Debugging dracut
3.1 Configure a serial console
3.2 Using the dracut shell
3.3 Accessing the root volume from the dracut shell
3.4 Additional dracut boot parameters
Identifying your problem area
Remove rhgb and quiet from the kernel command line
Add rdshell to the kernel command line. This will present a shell should dracut be unable to locate your root device
Add rdshell rdinitdebug to the kernel command line so that dracut shell commands are printed as they are executed
Inspect the debug output generated by the rdinitdebug boot argument with the following commands:
# less /init.log
# dmesg | less
Information to include in your report
All bug reports
In all cases, the following should be mentioned and attached to your bug report:
The exact kernel command-line used. Typically from the bootloader configuration file (e.g. /etc/grub.conf) or from /proc/cmdline
A copy of your disk partition information from /etc/fstab
A device listing from device-mapper. This can be obtained by running the command dmsetup ls --tree
A list of block device attributes including vol_id compatible mode. This can be obtained by running the commands blkid and blkid -o udev
Turn on dracut debugging (see the 'debugging dracut' section), and attach all relevant information from the boot log. This can be obtained by running the command dmesg|grep dracut.
If you use a dracut configuration file, please include /etc/dracut.conf
Logical Volume Management related problems
As well as the information from the 'all bug reports' section, include the following information:
Include physical volume information by running the command: lvm pvdisplay
Include volume group information by running the command: lvm vgdisplay
Include logical volume information by running the command: lvm lvdisplay
Software RAID related problems
As well as the information from the 'all bug reports' section, include the following information:
If using software RAID disk partitions, please include the output of /proc/mdstat
Network root device related problems
This section details information to include when experiencing problems on a system whose root device is located on a network attached volume (e.g. iSCSI, NFS or NBD). As well as the information from the 'all bug reports' section, include the following information:
Please include the output of ip addr show
Debugging dracut
Configure a serial console
Successfully debugging dracut will require some form of console logging during the system boot. This section documents configuring a serial console connection to record boot messages. To enable serial console output for both the kernel and the bootloader, follow the procedure below.
Open the file /etc/grub.conf for editing. Below the line timeout=5, add the following:
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
Also in /etc/grub.conf, add the following boot arguemnts to the kernel line:
console=tty0 console=ttyS0,9600
When finished, the /etc/grub.conf file should look similar to the example below.
default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
initrd /dracut-2.6.29.5-191.fc11.x86_64.img
More detailed information on how to configure the kernel for console output can be found at [1].
Redirecting non-interactive output
You can redirect all non-interactive output to /dev/kmsg and the kernel will put it out on the console when it reaches the kernel buffer by doing
exec >/dev/kmsg 2>&1 Using the dracut shell
Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell:
Add the boot parameter rdshell to your bootloader configuration file (e.g. /etc/grub.conf
Remove the boot arguments rhgb and quiet
A sample /etc/grub.conf bootloader configuration file is listed below.
default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rdshell
initrd /dracut-2.6.29.5-191.fc11.x86_64.img
If system boot fails, you will be dropped into a shell as seen in the example below.
No root device found
Dropping to debug shell.
sh: can't access tty; job control turned off
#
Use this shell prompt to gather the information requested above (see the 'all bug reports' section).
Accessing the root volume from the dracut shell
From the dracut debug shell, you can manually perform the task of locating and preparing your root volume for boot. The required steps will depend on how your root volume is configured. Common scenarios include:
A block device (e.g. /dev/sda7)
A LVM logical volume (e.g. /dev/VolGroup00/LogVol00)
An encrypted device (e.g. /dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83)
A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all)
The exact method for locating and preparing will vary. However, to continue with a successful boot, the objective is to locate your root volume and create a symlink /dev/root which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume.
Inspect your partitions using parted
# parted /dev/sda -s p
Model: ATA HTS541060G9AT00 (scsi)
Disk /dev/sda: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 10.8GB 107MB primary ext4 boot
2 10.8GB 55.6GB 44.7GB logical lvm
You recall that your root volume was a LVM logical volume. Scan and activate any logical volumes
# lvm vgscan
# lvm vgchange -ay
You should see any logical volumes now using the command blkid:
# blkid
/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
From the output above, you recall that your root volume exists on an encrypted block device. Following the guidance disk encryption guidance from the Fedora 16 Installation Guide, you unlock your encrypted root volume.
UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
Enter passphrase for /dev/mapper/linux-root:
Key slot 0 unlocked.
Next, make a symbolic link to the unlocked root volume
ln -s /dev/mapper/luks-$UUID /dev/root
With the root volume available, you may continue booting the system by exiting the dracut shell
exit
Additional dracut boot parameters
The following boot parameters are also available to further assist with debugging boot issues.
rdshell
Drop to a shell, if the initramfs fails.
rdinitdebug
set -x for the dracut shell.
rdbreak=[pre-udev|pre-mount|mount|pre-pivot|]
drop the shell on defined breakpoint
rdudevinfo
set udev to loglevel info
rdudevdebug
set udev to loglevel debug
rdnetdebug
debug network scripts in dracut. Output is written to /tmp
huanzu 于 2011-12-16 15:17:55发表:
12# alick
光盘验证过 在别的机器可以安装成功 (环境是没有windows的)
没有做 LVM 和RAID
alick 于 2011-12-16 13:03:29发表:
麻烦楼主耐心一下,把情况说清楚。
现在总算是知道了光盘安装时出现的问题。但是,
1. 光盘是否是好的。
光盘是CD还是DVD,是否自己刻的,自己刻录前对iso文件是否做了校验,光盘安装时
有没有一个检测光盘的界面是否做了检测?是不是同样的光盘在别人电脑上就正常?
2. 自己的硬件设置。
自己的硬盘上做了LVM,或者RAID了吗?
huanzu 于 2011-12-16 10:03:15发表:
8# alick
插入关盘 没有进入安装界面 没有进gnome 出现这些 (心急 为叙述清楚 不好意思)
yang224940 于 2011-12-14 14:22:40发表:
安个金山词霸,先看看英文自己学学吧
johnysqlinux 于 2011-12-14 13:07:09发表:
8# alick
硬盘安装的吗
alick 于 2011-12-13 19:41:00发表:
??? 这是什么意思?
问题是在什么情况下出现的?是否可以重现?
不太明白楼主的问题,所以不能确定是否和贴出来的
一大段内容是否有关。
huanzu 于 2011-12-11 16:36:18发表:
我查到相关信息 但是 但不懂 有高人 帮我看看吗?
http://fedoraproject.org/wiki/How_to_debug_Dracut_problems (上面写的有我出现的问题 不过看不懂)
Foreword
If you are experiencing a problem with system initialization due to Dracut, please see the common bugs document before filing a bug. Some easy configuration tweaks that fix a wide range of issues may be listed there. If the problem you are seeing is not listed there or none of the workarounds seem to help, please consider filing a bug to help us make Fedora run better on your hardware.
Be prepared to include some information (logs) about your system as well. These should be complete (no snippets please), not in an archive, uncompressed, with MIME type set as text/plain.
Contents [hide]
1 Identifying your problem area
2 Information to include in your report
2.1 All bug reports
2.2 Logical Volume Management related problems
2.3 Software RAID related problems
2.4 Network root device related problems
3 Debugging dracut
3.1 Configure a serial console
3.2 Using the dracut shell
3.3 Accessing the root volume from the dracut shell
3.4 Additional dracut boot parameters
Identifying your problem area
Remove rhgb and quiet from the kernel command line
Add rdshell to the kernel command line. This will present a shell should dracut be unable to locate your root device
Add rdshell rdinitdebug to the kernel command line so that dracut shell commands are printed as they are executed
Inspect the debug output generated by the rdinitdebug boot argument with the following commands:
# less /init.log
# dmesg | less
Information to include in your report
All bug reports
In all cases, the following should be mentioned and attached to your bug report:
The exact kernel command-line used. Typically from the bootloader configuration file (e.g. /etc/grub.conf) or from /proc/cmdline
A copy of your disk partition information from /etc/fstab
A device listing from device-mapper. This can be obtained by running the command dmsetup ls --tree
A list of block device attributes including vol_id compatible mode. This can be obtained by running the commands blkid and blkid -o udev
Turn on dracut debugging (see the 'debugging dracut' section), and attach all relevant information from the boot log. This can be obtained by running the command dmesg|grep dracut.
If you use a dracut configuration file, please include /etc/dracut.conf
Logical Volume Management related problems
As well as the information from the 'all bug reports' section, include the following information:
Include physical volume information by running the command: lvm pvdisplay
Include volume group information by running the command: lvm vgdisplay
Include logical volume information by running the command: lvm lvdisplay
Software RAID related problems
As well as the information from the 'all bug reports' section, include the following information:
If using software RAID disk partitions, please include the output of /proc/mdstat
Network root device related problems
This section details information to include when experiencing problems on a system whose root device is located on a network attached volume (e.g. iSCSI, NFS or NBD). As well as the information from the 'all bug reports' section, include the following information:
Please include the output of ip addr show
Debugging dracut
Configure a serial console
Successfully debugging dracut will require some form of console logging during the system boot. This section documents configuring a serial console connection to record boot messages. To enable serial console output for both the kernel and the bootloader, follow the procedure below.
Open the file /etc/grub.conf for editing. Below the line timeout=5, add the following:
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
Also in /etc/grub.conf, add the following boot arguemnts to the kernel line:
console=tty0 console=ttyS0,9600
When finished, the /etc/grub.conf file should look similar to the example below.
default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
initrd /dracut-2.6.29.5-191.fc11.x86_64.img
More detailed information on how to configure the kernel for console output can be found at [1].
Redirecting non-interactive output
You can redirect all non-interactive output to /dev/kmsg and the kernel will put it out on the console when it reaches the kernel buffer by doing
exec >/dev/kmsg 2>&1 Using the dracut shell
Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell:
Add the boot parameter rdshell to your bootloader configuration file (e.g. /etc/grub.conf
Remove the boot arguments rhgb and quiet
A sample /etc/grub.conf bootloader configuration file is listed below.
default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rdshell
initrd /dracut-2.6.29.5-191.fc11.x86_64.img
If system boot fails, you will be dropped into a shell as seen in the example below.
No root device found
Dropping to debug shell.
sh: can't access tty; job control turned off
#
Use this shell prompt to gather the information requested above (see the 'all bug reports' section).
Accessing the root volume from the dracut shell
From the dracut debug shell, you can manually perform the task of locating and preparing your root volume for boot. The required steps will depend on how your root volume is configured. Common scenarios include:
A block device (e.g. /dev/sda7)
A LVM logical volume (e.g. /dev/VolGroup00/LogVol00)
An encrypted device (e.g. /dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83)
A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all)
The exact method for locating and preparing will vary. However, to continue with a successful boot, the objective is to locate your root volume and create a symlink /dev/root which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume.
Inspect your partitions using parted
# parted /dev/sda -s p
Model: ATA HTS541060G9AT00 (scsi)
Disk /dev/sda: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 10.8GB 107MB primary ext4 boot
2 10.8GB 55.6GB 44.7GB logical lvm
You recall that your root volume was a LVM logical volume. Scan and activate any logical volumes
# lvm vgscan
# lvm vgchange -ay
You should see any logical volumes now using the command blkid:
# blkid
/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
From the output above, you recall that your root volume exists on an encrypted block device. Following the guidance disk encryption guidance from the Fedora 16 Installation Guide, you unlock your encrypted root volume.
UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
Enter passphrase for /dev/mapper/linux-root:
Key slot 0 unlocked.
Next, make a symbolic link to the unlocked root volume
ln -s /dev/mapper/luks-$UUID /dev/root
With the root volume available, you may continue booting the system by exiting the dracut shell
exit
Additional dracut boot parameters
The following boot parameters are also available to further assist with debugging boot issues.
rdshell
Drop to a shell, if the initramfs fails.
rdinitdebug
set -x for the dracut shell.
rdbreak=[pre-udev|pre-mount|mount|pre-pivot|]
drop the shell on defined breakpoint
rdudevinfo
set udev to loglevel info
rdudevdebug
set udev to loglevel debug
rdnetdebug
debug network scripts in dracut. Output is written to /tmp
davemac 于 2011-11-23 09:13:18发表:
{:2_97:}
佳音1 于 2011-11-22 21:53:05发表:
fschk -y
huanzu 于 2011-11-22 15:24:39发表:
3# zyh0724
怎么调啊 我不会调
zyh0724 于 2011-11-21 16:51:20发表:
应该是grub出来问题,你把引导调一下吧
ainilinux 于 2011-11-21 15:34:25发表:
我是新手 不会 不好意思