
私は実験的なオペレーティングシステムとして使用する古いコンピュータを持っていますが、約1ヶ月前にGRUB2をブートローダとして使用してGentooをインストールしました。すべてがうまく機能しますが、起動するたびに、いくつかのエラー(無効なスーパーブロック、無効なfsタイプなど...)が原因で失敗した/ dev / sda2(私のgrubブートパーティション)のエラーが表示されます。インストールしてください。
編集:パーティションの順序(再パーティション 化 のため)は次のとおりです。/dev/sda2(/boot)/dev/sda1(/)/dev/sda3(swap
)
昨日私はe2fsck /dev/sda2
。間違った点がたくさんありましたが、すべてではなくても多くのinodeが重複しているため、e2fsckにその操作を実行させ、Enterキーを押してすべてをスキップすることにしました。
結局、奇妙なことは起こりませんでした。それはおそらく、どのように多くの問題が解決されたかを述べたからです。
その後、正しいドライバでカーネルを再コンパイルし、サウンドの動作を試みながら再起動を試みました。起動時に一般的なBIOS起動画面(ロードバーを含む)が表示され、続行するには常にF1を押す必要がある一般的なテキスト画面が表示されます。時間(2004))。 「Grub loading」というテキストが表示され、再起動して無限ループに入ります(そうでない場合は、起動順序ごとにF1を押す必要がありました)。まだこの問題を解決できませんでした。
Gentooインストールディスクを使用してGRUB2を起動して再インストールしました。
/dev/sda2を再フォーマットし、GRUB2を再構成しました。
/dev/sda1がGRUBブートパーティションであり、ディスクの先頭にもなるようにパーティションの順序を変更しました。 GRUB、
すべてのパーティション10GiBをディスクの後ろに移動し、最初のパーティションがHDDのデッドスポットにないことを確認し、GRUB2を再構成し、ブートに関連する
すべてのBIOSオプションを変更しようとしました。
インターネット検索後、同様の問題について私のメインノートパソコンに生きているたわごとがあり、コンピュータに
火をつけ、偽のパスポートを受け取り、ベルギーに消えることを検討しました…
編集:パーティションをマウントできないため、GRUB(まだ機能している場合)がパーティションの代わりに/ bootフォルダにインストールされていることがわかりました。
編集(2):これは次のとおりです/etc/fstab
。
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda2 /boot ext4 noauto,noatime 1 2
/dev/sda1 / ext4 noatime 0 1
/dev/sda3 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
/dev/fb0 /mnt/floppy auto noauto,user 0 0
まだsda1とsda2の切り替えがあることがわかりますが、GRUBのロード中に競合が発生しないようです。
編集(2.1):fstabを修正しましたが、問題は解決しません。
編集(3):更新されたfstabは次のようになります。
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1 /boot ext4 noauto,noatime 1 2
/dev/sda2 / ext4 noatime 0 1
/dev/sda3 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
/dev/fb0 /mnt/floppy0 auto noauto,user 0 0
ls /boot/
奇妙なことに、出力は生成されません。おそらく間違いを犯して、最終的にGRUBパーティションがマウントされた可能性があります。
/dev/sda1 を /boot/ にマウントした後、出力は次のようになりますls -Al /boot/
。
root@lubuntu 20:52:29 / # ls -al /boot
total 8941
-rw-r--r-- 1 root root 96280 Jul 29 19:09 config-4.0.5-gentoo-2015-07-29-14-09
drwxr-xr-x 5 root root 1024 Jul 29 19:09 grub
drwx------ 2 root root 12288 Jul 29 15:52 lost+found
-rw-r--r-- 1 root root 2720318 Jul 29 19:09 System.map-4.0.5-gentoo-2015-07-29-14-09
-rw-r--r-- 1 root root 6319104 Jul 29 19:09 vmlinuz-4.0.5-gentoo-2015-07-29-14-09
答え1
リカバリCD/USBから起動します。次に、インストールにルートを移動して実行します。
grub2-install /dev/sda
grub2-mkconfig /boot/grub2/grub.cfg