# wrong fs type, bad option, bad superblock...

## phsythax

```
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,

missing codepage or other error

In some cases useful info is found in syslog - try dmesg | tail or so
```

I have looked threw dmesg and nothing regarding this is to be found.

I know that it's not the hardware which is damage becourse this problem occured after a fresh gentoo installation,

so my best guess is that /etc/fstab is not properly configured. However, i have been testing around with it and followed the handbook but still nothing;

```
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hdb2               /boot           ext2            default,noatime 1 2

/dev/hdb4               /               ext3            noatime         0 1

/dev/hdb3               none            swap            sw              0 0

#/dev/cdroms/cdrom0     /mnt/cdrom      auto            default,ro      0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

```

this is the handbook of which i am refering to: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8

----------

## i92guboj

 *phsythax wrote:*   

> 
> 
> ```
> mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
> 
> ...

 

Anyway, could you post the output of "dmesg | tail" as the error message tell you? You have to use that command just right after you try to mount the thing. That way you make sure that the message will be the last in the dmesg output. So, try to mount, then do "dmesg|tail" and paste it here.

----------

## phsythax

 *6thpink wrote:*   

> 
> 
> Anyway, could you post the output of "dmesg | tail" as the error message tell you? You have to use that command just right after you try to mount the thing. That way you make sure that the message will be the last in the dmesg output. So, try to mount, then do "dmesg|tail" and paste it here.

 

```
# dmesg | tail

 sda: sda1

sd 2:0:0:0: Attached scsi removable disk sda

sd 2:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete

EXT3 FS on hdb4, internal journal

Adding 506036k swap on /dev/hdb3.  Priority:-1 extents:1 across:506036k

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode

agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
```

However, i can mount it without any errors when i have booted, that error described is what i get when i boot.

----------

## i92guboj

 *phsythax wrote:*   

>  *6thpink wrote:*   
> 
> Anyway, could you post the output of "dmesg | tail" as the error message tell you? You have to use that command just right after you try to mount the thing. That way you make sure that the message will be the last in the dmesg output. So, try to mount, then do "dmesg|tail" and paste it here. 
> 
> ```
> ...

 

Ok, then, can you provide the info from 

```
$ mount | grep hdb2
```

and the command you use to mount it manually?

----------

## phsythax

 *6thpink wrote:*   

> 
> 
> However, i can mount it without any errors when i have booted, that error described is what i get when i boot.
> 
> Ok, then, can you provide the info from 
> ...

 

```
# mount  | grep hdb2

/dev/hdb2 on /boot type ext2 (rw)

```

The command i use to mount it manually, is simply:

```
# mount /dev/hdb2 /boot
```

----------

## i92guboj

All seems correct and consistent, and I can't see any evident error.

But I have seen similar errors in the past. So, I have one suggestion:

Comment that line in fstab, and then write another one by hand for the same partition. Sometimes strange things happens due to the use of different encodings. Also, remember that there are things that a text editor cannot show. So, try to regenerate that line by hand. If that works, you can then erase the old, commented, line.

----------

## phsythax

 *6thpink wrote:*   

> All seems correct and consistent, and I can't see any evident error.
> 
> But I have seen similar errors in the past. So, I have one suggestion:
> 
> Comment that line in fstab, and then write another one by hand for the same partition. Sometimes strange things happens due to the use of different encodings. Also, remember that there are things that a text editor cannot show. So, try to regenerate that line by hand. If that works, you can then erase the old, commented, line.

 

I tried that and still same problem at boot. However, before i manually mount the disk, i found this:

```
# ls -l /boot

total 0

lrwxrwxrwx 1 root root 1 Apr 19 20:18 boot -> .

```

Is that of any help? i think it is a symlink.

----------

## wynn

The GRUB documentation says it has been put there so that people who have a boot partition and write

```
kernel /boot/kernel-image-name ...
```

shall be saved.

----------

## i92guboj

That is indeed a symlink, but it is not a problem. Indeed, it is there to prevent a very common issue with people not understanding what the root(hdx,y) in grub.conf means. A quick explanation, imagine you have this in grub.conf:

```

root (hd0,4)

```

That means that hda5 is the root at boot stage, regardless of where that partition will be mounted (grub does not care about that, since its actions take place much after any OS has been loaded). 

But some people don't understand that, and still do this:

```

kernel /boot/vmlinuz-.....

```

Which is totally incorrect, since, if your root at that stage is hda5, all the boot files are just at /, and not into /boot (that is the mount point in linux, just one of the OS that might, or might not be loaded from grub...).

Besides all this crap, that kernel line would still work. Why? Because of that recursive symlink. But other that being a cure for incorrect behaviour from the users, that symlink does no good or bad.

Now, back to the topic. If the fstab line is correct, a simple mount /boot should suffice. Does "mount /boot" work once you are at the command prompt? Or do you specifically need to put the mount point as well?

----------

## phsythax

 *6thpink wrote:*   

> 
> 
> Now, back to the topic. If the fstab line is correct, a simple mount /boot should suffice. Does "mount /boot" work once you are at the command prompt? Or do you specifically need to put the mount point as well?

 

No it doesn't;

```
# mount /boot

mount: wrong fs type, bad option, bad superblock on /dev/hdb2,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so
```

- exactly same error i get at boot

----------

## i92guboj

 *phsythax wrote:*   

>  *6thpink wrote:*   
> 
> Now, back to the topic. If the fstab line is correct, a simple mount /boot should suffice. Does "mount /boot" work once you are at the command prompt? Or do you specifically need to put the mount point as well? 
> 
> No it doesn't;
> ...

 

Ok, that can be a good thing. Try to mount that way on command line, and just after that, try again the dmesg|tail thing. Maybe this time you will get something useful.

----------

## wynn

6thpink: do you think

```
mount -v -t ext2 /dev/hdb2
```

might help? "verbose" might says some more on the console and adding the fstype would stop it trying different filesystems (though it probably uses the "blkid" code to find this out).

----------

## i92guboj

 *wynn wrote:*   

> 6thpink: do you think
> 
> ```
> mount -v -t ext2 /dev/hdb2
> ```
> ...

 

Maybe if the problems turns to be more strange. But the real problem for now is that he could not manually reproduce the problem. By using the syntax "mount /mountpoint" he forces the mount command to look into fstab, and gets the same error that he does at boottime. The omission of the fs type is intentional, for the same reason. Then he can look into dmesg. Usually, the output in dmesg is verbose enough. Of course, if that is not the case, using -v will be helpful.

----------

## phsythax

 *6thpink wrote:*   

>  *wynn wrote:*   6thpink: do you think
> 
> ```
> mount -v -t ext2 /dev/hdb2
> ```
> ...

 

# dmesg | tail doesn't say anything about hdb2 after  using the # mount /boot command:

```
Lnex phsythax # mount /boot

mount: wrong fs type, bad option, bad superblock on /dev/hdb2,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

Lnex phsythax # dmesg | tail

Freeing unused kernel memory: 284k freed

nvidia: module license 'NVIDIA' taints kernel.

ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 19

NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-8776  Mon Oct 16 21:56:04 PDT 2006

EXT3 FS on hdb4, internal journal

Adding 506036k swap on /dev/hdb3.  Priority:-1 extents:1 across:506036k

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode

agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
```

# mount -v /dev/hdb2 gave the same error which i get at boot, however;

# mount -v -t ext2 /dev/hdb2 /boot gave me this:

```
# mount -v -t ext2 /dev/hdb2 /boot

/dev/hdb2 on /boot type ext2 (rw)
```

 ...and successfully mounted the disk to /boot

----------

## wynn

 *phsythax wrote:*   

> 
> 
> ```
> Lnex phsythax # mount /boot
> 
> ...

 In which case there is something wrong with your fstab as mount goes to fstab to get the missing bits with "mount /boot" or "mount /dev/hdb2" and, having been lead by the nose to the exact spot,

```
/dev/hdb2               /boot           ext2            default,noatime 1 2

proc                    /proc           proc            defaults        0 0 
```

You have got "defaults" correctly in the "proc" line but the "/dev/hdb2" line should have "defaults,noatime" as the options. If this is the solution, then you might like to change

```
#/dev/cdroms/cdrom0     /mnt/cdrom      auto            default,ro      0 0 
```

as well in case, at some point, you uncomment it.

What a pity 6thpink isn't in at the kill !

----------

## phsythax

 *wynn wrote:*   

> In which case there is something wrong with your fstab as mount goes to fstab to get the missing bits with "mount /boot" or "mount /dev/hdb2" and, having been lead by the nose to the exact spot,
> 
> ```
> /dev/hdb2               /boot           ext2            default,noatime 1 2
> 
> ...

 

Thank you very much, i am sorry that i have wasted time, bandwidth and space becourse of my lack of checking errors!

Anyhow, Thanks

----------

## wynn

There is at least one red face here to match yours   :Embarassed: 

Your fstab appeared in your first post...

----------

