Waiting for device dev/disk/by-id/ata-...-part2 to appear

问题:

平台:Oralce VM Virtualbox的虚拟机Opensuse11.4

导出该机器的OVA文件后,把该OVA文件导入虚拟机,开机启动时报如下错误:

Trying manual resume from /dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part1
resume device dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part1 not found (ignoring)
Trying manual resume from /dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part1
resume device dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part1 not found (ignoring)
Waiting for device dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part2 to appear : ........................ Could not find dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part2 .
Want me to fall back to dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part2 ? (Y/N)
y
Waiting for device dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part2 to appear : ...............not found -- exiting to /bin/sh

分析:

原因是Opensuse的一个新的默认设置,从10Sp1版本开始,存储设备(硬盘)由原来的名称相关变为ID相关。
说明:

以前的硬盘描述为sda、sdb等,硬盘的分区描述为sda1、sda2、sda3等;

而如今硬盘与分区的新描述,例如:

/dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T

/dev/disk/by-id/ata-ST380013AS_4MR2NSD8

其分区描述,例如:

/dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FTTI70T-part1

/dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FTTI70T-part2

问题在于,在虚拟机Opensuse机器上硬盘是用ID来描述在配置文件做相关记录的,而目标机器(即存放OVA文件的物理机)硬盘是不一样的,会有不一样的ID记录名称,所以导入后的机器才无法找到硬盘而不能启动成功。

解决:

只需在原来的Opensuse机器上修改两个配置文件即可。这两个文件是
/etc/fstab
/boot/grub/menu.lst
在这两个文件中,我们需要找出每一个类似下面例子的名称,例子如下:
/dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part1

然后把它们改成
/dev/sda1
注意分区名称对应如下:
-part1  ->  sda1
-part2  ->  sda2

步骤如下:
确保有权限修改文件,打开文件,修改完毕后,按ESC退出输入模式,然后输入:wq保存修改。

sudo vi /etc/fstab
sudo vi /boot/grub/menu.lst

重启电脑确认一切照常,然后就可以导出OVA文件了。

举例:

以下是这两个文件修改前后的内容变化:

sudo vi /etc/fstab
BEFORE
/dev/disk/by-id/ata-ST380013AS_4MR2NSD8-part1 swap                 swap       defaults             0 0
/dev/disk/by-id/ata-ST380013AS_4MR2NSD8-part2 /                    ext4       acl,user_xattr       1 1
/dev/disk/by-id/ata-ST380013AS_4MR2NSD8-part3 /home                ext4       acl,user_xattr       1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

AFTER
/dev/sda1 swap                 swap       defaults              0 0
/dev/sda2 /                    ext4       acl,user_xattr        1 1
/dev/sda3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
sudo vi /boot/grub/menu.lst

BEFORE
# Modified by YaST2. Last modification on Fri Nov 25 21:23:32 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don‘t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 12.1 - 3.1.0-1.2
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.0-1.2-default root=/dev/disk/by-id/ata-ST380013AS_4MR2NSD8-part2 resume=/dev/disk/by-id/ata-ST380013AS_4MR2NSD8-part1 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-3.1.0-1.2-default

###Don‘t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1 - 3.1.0-1.2
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.0-1.2-default root=/dev/disk/by-id/ata-ST380013AS_4MR2NSD8-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
    initrd /boot/initrd-3.1.0-1.2-default

AFTER
# Modified by YaST2. Last modification on Fri Nov 25 21:23:32 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don‘t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 12.1 - 3.1.0-1.2
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.0-1.2-default root=/dev/sda2 resume=/dev/sda1 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-3.1.0-1.2-default

###Don‘t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1 - 3.1.0-1.2
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.0-1.2-default root=/dev/sda2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
    initrd /boot/initrd-3.1.0-1.2-default

原文转自:http://diggerpage.blogspot.com/2011/11/cannot-boot-opensuse-12-after-cloning.html

Waiting for device dev/disk/by-id/ata-...-part2 to appear

时间: 2024-10-27 11:17:57

Waiting for device dev/disk/by-id/ata-...-part2 to appear的相关文章

linux kernel 卡在提示信息Waiting for root device /dev/mmcblk0p1...处

一.背景 1.1 移植linux-4.14内核的过程中,此时使用的是ext4文件系统,并且将根文件系统存储在sd卡的第一个分区上 1.2 内核打印完Waiting for root device /dev/mmcblk0p1...这一句信息之后并没有panic,而且串口还可以回应 二.分析 既然处在一直等待根文件系统挂载,那么可以去扒一下内核代码,请看 /* * Prepare the namespace - decide what/where to mount, load ramdisks,

Device /dev/sdb not found (or ignored by filtering

最近想将服务器的本地硬盘通过LVM来灵活管理,具体问题如下: [[email protected] ~]# pvcreate /dev/sdb Device /dev/sdb not found (or ignored by filtering). [[email protected] ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTnvme0n1 259:0 0 2.9T 0 disksda 8:0 0 744.1G 0 disk├─sda1 8

Device "/dev/sdg" is not a partition【再续】

之前创建asm磁盘的时候总结过一下错误:http://blog.csdn.net/rhys_oracle/article/details/17029333 当今天情况是这样的.如下: 在使用openfiler通过iSCSI映射到本地,发现将整个磁盘创建为asm提示如下错误: [[email protected] iscsi]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdh Marking disk "VOL1" as an ASM dis

mount: block device /dev/cdrom is write-protected, mounting read-only 解决方法

[[email protected] ~]# mount /dev/cdrom /mnt/cdrom/ mount: block device /dev/sr0 is write-protected, mounting read-only 虚拟机挂着光驱光驱时提示只读,用以下命令可解决该报错, mount -o remount,rw /dev/cdrom /mnt/cdrom 参考网址:http://blog.chinaunix.net/uid-30645967-id-5701870.html

使用华为U8860测试时出现“Unable to open log device '/dev/log/main': No such file or directory”

这是因为华为默认禁掉了log输出, 解决办法: 拨号: *#*#2846579#*#* 会显示工程菜单, Go to "ProjectMenu" -> "Background Setting" -> "Log Setting" Open "Log switch" and set it to ON. Open "Log level setting" and set the log level yo

RMAN备份失败之:mount: block device /dev/emcpowerc1 is write-protected, mounting read-only

今天再做巡检的时候发现有一台服务器的RMAN备份不正常,有一段时间没能正常备份了.检查了一下脚本,正常,定时任务列表也正常,再检查一下/var/log/cron的内容,也没有问题.尝试在该挂载点上创建一个1.txt文件的时候,发现有异常报出来了.内容为:mount: block device /dev/emcpowerc1 is write-protected, mounting read-only.原来是因为磁盘为只读状态,不可写入,导致了备份失败. 解决办法: umount /dev/emc

SYMBDSNAP_SDK[3943]: Failed to open device: /dev/symbdsnapctl, errno: 2

在Linux的日志/var/log/message里面看到下面错误信息: Oct 26 09:48:42 xxxxxxx SYMBDSNAP_SDK[3943]: Failed to open device: /dev/symbdsnapctl, errno: 2. Google搜索了一下,发现出现这个错误的原因: Advanced Open File Option for Linux (AOFO-L) is not supported for the use with the kernel v

logcat 提示 Unable to open log device '/dev/log/main': No such file or directory

解决办法: Open: /system/etc/init.d/××× (not the same file on different ROMs, find the right file) Find the line that says: rm /dev/log/main Change the line to: # rm /dev/log/main (comments out the line, rm = remove, in case you were wondering) Save and r

iphone手机连接USB时出现需要Mobile device setup disk上的usbaapl.sys文件

问题: iphone5 手机连接USB出现如下弹框 解决方法: 定位到C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers\usbaapl.sys, 完后安装usbaapl.sys就可以解决问题了. iphone手机连接USB时出现需要Mobile device setup disk上的usbaapl.sys文件,布布扣,bubuko.com