
Ubuntu日本語フォーラム

ログインしていません。
wubiでubuntuを使っているのですが、ubuntuをインストールしていたパーティションにあったWindowsがクラッシュしたため再インストールしました。その際に /ubuntu/disks/ にあったroot.disc をそのまま別パーティションにバックアップしておき、windows再インストール後にもう一度インストールしたwubiに、root.discファイルを書き戻し、ubuntuを起動したのですが、grubメニューで起動OSを選択した後に "error: You need to load the kernel first"と表示されてしまい、その先に進むことができません。
どうすれば起動できるようになるのでしょうか?
オフライン
grub.cfgの内容と実際のデバイスの位置が違った場合にも同じエラーが出る様です。
ライブCDで起動してWindowsのインストールされている、もしくはwubiをインストールしたドライブのデバイスファイル名を調べて結果を下さい。
$ sudo fdisk -l
wubiは/dev/sda1 に有ると仮定して進めていきます。
$ mkdir ./win
$ sudo mount /dev/sda1 ./win
$ sudo mount -o loop ./win/ubuntu/disks/root.disk /mnt
$ gedit /mnt/boot/grub/grub.cfg
テキストエディタにgrub.cfgが表示されますので、先のfdisk -l の結果と一緒に教えて下さい。
取り急ぎ救出必要なデータ類が在りましたら
$ sudo nautilus /mnt
でwubiのシステムファイルが開けますので、USBメモリかWindows等のパーティションに移して下さい。
オフライン
$ sudo fdisk -lと、wubiファイルのcfgファイルを調べたところ、以下のようになりました。
$ sudo fdisk -l
[sudo] password for ouroboros:
ディスク /dev/sda: 320.1 GB, 320072933376 バイト
ヘッド 255, セクタ 63, シリンダ 38913
Units = シリンダ数 of 16065 * 512 = 8225280 バイト
Disk identifier: 0x569da048
デバイス ブート 始点 終点 ブロック Id システム
/dev/sda1 1 192 1536000 27 不明
パーティション 1 は、シリンダ境界で終わっていません。
/dev/sda2 * 192 31014 247582931 7 HPFS/NTFS
/dev/sda3 31028 37555 52428800 f W95 拡張領域 (LBA)
/dev/sda4 37555 38914 10912768 17 隠し HPFS/NTFS
/dev/sda5 31028 37555 52427776 7 HPFS/NTFS
ディスク /dev/sdb: 8019 MB, 8019509248 バイト
ヘッド 255, セクタ 63, シリンダ 974
Units = シリンダ数 of 16065 * 512 = 8225280 バイト
Disk identifier: 0xc3072e18
デバイス ブート 始点 終点 ブロック Id システム
/dev/sdb1 * 1 335 2690871+ c W95 FAT32 (LBA)
領域 1 は異なった物理/論理開始位置になっています(Linux では無い?):
物理=(0, 1, 1) 論理=(0, 0, 33)
/dev/sdb2 336 348 104422+ 82 Linux スワップ / Solaris
/dev/sdb3 349 974 5028345 83 Linuxwubiのcfgファイルの内容
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="2"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.31-22-generic" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set a048787d487853ce
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.31-22-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.31-22-generic
}
menuentry "Ubuntu, Linux 2.6.31-22-generic (recovery mode)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set a048787d487853ce
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.31-22-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.31-22-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set a048787d487853ce
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set a048787d487853ce
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_lupin ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda2)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set a048787d487853ce
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda4)" {
insmod ntfs
set root=(hd0,4)
search --no-floppy --fs-uuid --set c6dee5e4dee5ccad
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###オフライン
OS選択画面で[E]キーを押して
search --no-floppy --fs-uuid --set a048787d487853ce
の行を削除して [ctrl] + [X] で同でしょうか。
オフライン
教えていただいた方法で試してみたところ、正常に起動しました!
本当にありがとうございました。
オフライン