# Cannot mount my boot partition.

## gentoo_newguy

Hi dont seem to be able to mount the boot partition on my laptop 

localhost ~ # mount /dev/sda1

mount: unknown filesystem type 'ext2'

Here is a copy of my fstab 

```

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

/dev/sda1      /boot      ext2      noauto,noatime   1 2

/dev/sda3      /      reiserfs   noatime      0 1

/dev/sda2      none      swap      sw      0 0

/dev/cdrom      /mnt/cdrom   auto      noauto,ro   0 0

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

```

Thanks for all your help

----------

## i92guboj

Did you compile ext2 suport in your kernel?

If you haven't but you have compiled ext3 support, you can try to mount it as ext3, both are compatible.

----------

## gentoo_newguy

How would i go about doing this ? 

I do have ext2 compiled in my kernel .

I have never had this problem before . 

On my machine at home i have the same setup and i mount the way i did above.

----------

## i92guboj

 *gentoo_newguy wrote:*   

> How would i go about doing this ? 
> 
> I do have ext2 compiled in my kernel .

 

This message seems to say the opposite:

 *Quote:*   

> mount: unknown filesystem type 'ext2' 

 

What does this command report on that box?

```
cat /proc/filesystems
```

About how adding it, well, first use uname -r and make sure you are running the kernel version that you think you are running. Double check the compilation date, just in case. If it's ok go to /src/linux/<your kernel version whatever that is>, then use make menuconfig and go to the filesystem section, check that ext2 is checked, exit, save changes and recompile and reinstall your kernel as usual.

----------

## GoLoGo

I also am currently having the same issue. I also did enable ext2 filesystem in make menuconfig and compiled my Kernel. Everything was working fine, until I wanted to edit my grub configuration file, I noticed my /dev/sda1 was not mounted on /boot, so I would receive the same error. I am 100% positive I enabled ext2 in the make menuconfig script, I went through the whole process pretty slowly.

----------

## i92guboj

Still, even if you are sure, can you see if it's listed in cat /proc/filesystems?

It's just a simple test before looking into any other thing.

----------

## pappy_mcfae

Once that's done, you can post your .config, and the results of lspci -n and cat /proc/cpuinfo. I'll take a look.

Blessed be!

Pappy

----------

## Clad in Sky

If you're sure you compiled it in, your kernel says you didn't, why not find a compromise?

You compiled it as a module and didn't load it. There. That wasn't too bad.

Other than that it would be an interesting error indeed if the kernel insists on telling you it didn't know ext2.

Btw.: I had the same problem a few weeks ago. I _did_ forget to compile in ext2 support.

----------

## GoLoGo

Well I checked the contents of /proc/filesystems and It did not contain an ext2 value. I then decided to do something stupid, because I was tired of not being able to edit certain config files in my boot partition, so I issued the following command:

mke2fs -j /dev/sda1 

nano -w /etc/fstab

changed the ext2 value for /dev/sda1 to ext3

Restarted my environment. Now I am getting GRUB Error 15

I guess my data from /dev/sda1 is now gone? Is this fixable? Or will I have to start from scratch?

----------

## i92guboj

 *GoLoGo wrote:*   

> Well I checked the contents of /proc/filesystems and It did not contain an ext2 value. I then decided to do something stupid, because I was tired of not being able to edit certain config files in my boot partition, so I issued the following command:
> 
> mke2fs -j /dev/sda1 
> 
> nano -w /etc/fstab
> ...

 

mkfs is used to format a volume, so yes, for the most part the contents is gone. However, the contents of /boot can be easily restored by emerging grub again and doing the "make install" part on your kernel source directory (usually /usr/src/<whatever>). Of course you need to recreate your grub.conf as well.

Your problem was probably that you weren't installing your kernel or the modules the right way, of you had not /boot mounted when doing so. Always double check that /boot is mounted if it's a separate partition when you do the "make install" step on your kernel source directory, otherwise you are installing the files inside the / partition. That's why the fact that you saw ext2 selected on your menuconfig was irrelevant to me. The relevant part is whether you were installing it ok, and whether you were booting the right kernel.

Again, you should always check the compilation date when you are booting new kernels. uname -a will show you the date of the kernel you are currently running.

----------

