Quantcast
Channel: プログラム の個人的なメモ
Viewing all articles
Browse latest Browse all 860

【トラブル】 VirtualBox でのトラブルシューティング

$
0
0

■ CentOS7インストール時に、画面が真っ黒

Windows10上のVirtualBoxでCentOS7のインストールを開始したところ、
画面が真っ黒になり、インストールが一切進まなくなった。

エラー内容

なし(これがやっかい)

原因

 * 仮想マシン作成の際、OSのバージョンに「Red Hat(32-bit)」を選択していたため

解決策

仮想マシンのOSバージョンを「Red Hat(64-bit)」に変更

参考文献

http://heppoen.seesaa.net/article/441709839.html

■ CentOS7で、yum upgrade して再起動したらKernel panic

3.10.0-327.el.x86_64
から
3.10.0-693.21.1.el7.x86_64
にあげたら、以下の「エラー内容」が表示されて起動できなくなった

なお、解決には、以下のサイトが非常に役立った。感謝。
http://vild.hatenablog.com/entry/2016/08/19/233547

エラー内容

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID 1 Comm: swapper/0 Not tainted 3.10.0-693.21.1.el7.x86_64 #1
Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Call Trace:
...
Kernel Offset disabled

原因

 * 新しいカーネル(3.10.0-693.21.1.el7.x86_64)のinitramfsが生成されていないため

解決策

[1] 古いカーネルで起動
[2] 以下のコマンドを実行
~~~~~~~~~~~~~
ls -l /boot | grep initramfs
# 「3.10.0-693.21.1.el7.x86_64.img」がないことを確認

sudo depmod 3.10.0-693.21.1.el7.x86_64
# initrdイメージの作成するためにmkinitrdコマンドを実行
sudo mkinitrd /boot/initramfs-3.10.0-693.21.1.el7.x86_64.img 3.10.0-693.21.1.el7.x86_64

ls -l /boot | grep initramfs
# 「3.10.0-693.21.1.el7.x86_64.img」が存在することを確認
~~~~~~~~~~~~~
[3] /boot/grub2/grub.cfgに、以下のように「initrd16 /initramfs-3.10.0-693.21.1.el7.x86_64.img」を追記

sudo vi /boot/grub2/grub.cfg
~~~~~~~~~~~~~
menuentry 'CentOS Linux (3.10.0-693.21.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod xfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
        else
          search --no-floppy --fs-uuid --set=root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
        fi
        linux16 /vmlinuz-3.10.0-693.21.1.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=ja_JP.UTF-8
        # !!! ADD !!! 
        initrd16 /initramfs-3.10.0-693.21.1.el7.x86_64.img
~~~~~~~~~~~~~

[4] OS再起動(sudo reboot)

参考文献

http://vild.hatenablog.com/entry/2016/08/19/233547
http://blog.seiglab.com/linux/post-440.html

関連記事

VirtualBox のインストール

https://blogs.yahoo.co.jp/dk521123/31186721.html

Viewing all articles
Browse latest Browse all 860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>