1

I have this old computer I use for the more experimental OSes, and about a month ago I installed Gentoo on it, with GRUB2 as boot loader. Everything worked fine, but every boot it would show an error about /dev/sda2 (my grub boot partition), that it couldn't be mounted because of something bad (bad super block, wrong fs type, etc...)

EDIT: I should mention the order of partitions (due to repartitioning) is:
/dev/sda2 (/boot)
/dev/sda1 (/)
/dev/sda3 (swap)

Yesterday I decided to get rid of this error by running e2fsck /dev/sda2. There were a lot of wrong things, but they repeated for many, if not all, inodes, so I decided to let e2fsck do its work and skipped through all by holding the enter key.
There were no anomalous things at the end, it might have mentioned how many things it fixed.

Then I tried to reboot, because I had been trying to get sound to work by recompiling the kernel with the right drivers. When it booted, it showed the usual bios boot screen (with the loading bar), followed by the also usual text screen, at which I always have to press the F1 key to continue (I think it is because my only HDD is connected via SATA instead of the then (2004) common IDE). It showed the text "Grub loading.", and then rebooted, into an infinite loop (were it not that I have to press F1 during each boot sequence). I haven't been able to fix this.

I have booted with the Gentoo install disk and reinstalled GRUB2,
I have reformatted /dev/sda2 and reconfigured GRUB2,
I have reordened my partitions so that /dev/sda1 is the GRUB boot partition and is also located at the beginning of the disk and reconfigured GRUB,
I have moved all partitions 10 GiB to the back of the disk to make sure the first partition isn't at a bad spot of the HDD and reconfigured GRUB2,
I have changed and tried all BIOS options concerning booting,
I have googled the living shit out of my main laptop about similar issues,
I have considered setting the computer on fire, getting a false passport and disapearing to Belgium...

EDIT: I found out that in some way, GRUB (when it still worked) had installed to the folder /boot instead of the partition, because the partition couldn't be mounted.

EDIT(2): Here is /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

I now notice it still has sda1 and sda2 switched around, but I don't think it causes a crash during GRUB loading.

EDIT(2.1): I fixed the fstab, but the problem persists.

EDIT(3): Here's the updated 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/ yielded no output, strangely - maybe I've made a mistake and the GRUB partition was mounted after all.

After mounting /dev/sda1 to /boot/, this was the output of 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
  • Can you post the contents of etc/fstab, along with the output of 1.) ls /boot vs 2.) mount /dev/sda1 /boot && ls /boot – eyoung100 Jul 29 '15 at 19:00
  • @eyoung100 , I've updated the post with your requested information. Thanks for helping! – theFlyingDutchman Jul 30 '15 at 6:38
  • Now update /etc/fstab so that the /boot entry points to /dev/sda1 and / points to dev/sda2, and then reinstall grub/grub2 with the appropriate command. – eyoung100 Jul 30 '15 at 18:30
  • I thought, "so simple! How could I not have thought of this!" Unfortunately, the procedure was to no avail; the problem persists – theFlyingDutchman Jul 30 '15 at 20:34
  • Can you update the fstab file so that what you fixed matches what I see?? – eyoung100 Jul 30 '15 at 20:43
0

boot from rescue CD/USB. Then chroot to your installation, then run

grub2-install /dev/sda
grub2-mkconfig /boot/grub2/grub.cfg
  • The OP said he had already done so... – eyoung100 Jul 29 '15 at 18:56
  • Indeed, this was what I meant with reconfiguring GRUB – theFlyingDutchman Jul 29 '15 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.