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

來源:互聯網
上載者:User

標籤:des   style   blog   http   color   strong   

問題:平台:Oralce VM Virtualbox的虛擬機器Opensuse11.4匯出該機器的OVA檔案後,把該OVA檔案匯入虛擬機器,開機啟動時報如下錯誤:
Trying manual resume from /dev/disk/by-id/ata-TOSHIBA-MK1246GSX-28FGTI70T-part1resume 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-part1resume 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)yWaiting 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/fstabsudo 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 2proc /proc proc defaults 0 0sysfs /sys sysfs noauto 0 0debugfs /sys/kernel/debug debugfs noauto 0 0usbfs /proc/bus/usb usbfs noauto 0 0devpts /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 2proc /proc proc defaults 0 0sysfs /sys sysfs noauto 0 0debugfs /sys/kernel/debug debugfs noauto 0 0usbfs /proc/bus/usb usbfs noauto 0 0devpts /dev/pts devpts mode=0620,gid=5 0 0
sudo vi /boot/grub/menu.lstBEFORE# 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/bootloaderdefault 0timeout 8##YaST - generic_mbrgfxmenu (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-defaultAFTER# 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/bootloaderdefault 0timeout 8##YaST - generic_mbrgfxmenu (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
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.