Grub은 "Grub Loading"이라고만 말한 다음 PC를 다시 시작합니다.

Grub은 "Grub Loading"이라고만 말한 다음 PC를 다시 시작합니다.

나는 실험적인 운영 체제로 사용하는 오래된 컴퓨터를 가지고 있는데 약 한 달 전에 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을 눌러야 했습니다). 아직 이 문제를 해결하지 못했습니다.

젠투 설치 디스크를 사용하여 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

관련 정보