View previous topic :: View next topic |
Author |
Message |
low n00b


Joined: 25 Mar 2009 Posts: 18 Location: Maryland
|
Posted: Fri Sep 03, 2010 3:11 am Post subject: 2.6.35: why does kernel try to mount ext4 as ext2 first? |
|
|
this is the output i get from dmesg:
Code: | [ 3.076021] EXT2-fs (sda3): error: couldn't mount because of unsupported optional features (240)
[ 3.101201] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 3.102564] VFS: Mounted root (ext4 filesystem) readonly on device 8:3. |
on 2.6.34 it was mounting my ext4 root as ext2 for some reason but i was too lazy to ask about it. now that i upgraded my kernel i'm still curious. one thought i had to explain this behavior was the kernel option to use ext4 for ext2/ext3 partitions to save kernel space, which i had enable on 34 but have disabled it on 35. here is my fstab:
Code: | # /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.
UUID=2d0bbe0f-ea0c-41a7-a792-7498d1d624b5 /boot ext2 relatime 1 2
UUID=567eaf34-37d3-40e1-85de-19ac1cd5806c / ext4 relatime 0 1
UUID=6d7bc62b-dbc7-4943-95b7-dca742a333a8 none swap sw 0 0
UUID=a83ec661-5cc9-42b3-b5b7-ed92c16eb4d1 /home ext4 relatime 0 2
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 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
proc /proc proc defaults 0 0
|
and my partition table:
Code: | Number Start (sector) End (sector) Size Code Name
1 2048 264191 128.0 MiB 0700 Linux/Windows data
2 264192 266239 1024.0 KiB EF02 BIOS boot partition
3 266240 33820671 16.0 GiB 0700 Linux/Windows data
4 33820672 42209279 4.0 GiB 8200 Linux swap
5 42209280 312581774 128.9 GiB 0700 Linux/Windows data
|
|
|
Back to top |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1152 Location: /dev/koelsch
|
Posted: Fri Sep 03, 2010 6:49 am Post subject: |
|
|
Hi low (either or: hi or low)
Code: | [ 3.076021] EXT2-fs (sda3): error: couldn't mount because of unsupported optional features (240)
[ 3.101201] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 3.102564] VFS: Mounted root (ext4 filesystem) readonly on device 8:3. |
This is a more expressive, but normal kernel message. I've noticed it too, since some kernel releases.
AFAIK this is to show what the kernel does while trying to recognize the filesystem of the root device oft your kernel line.
At this time your ext2 (/boot) filesystem is already in use, cause the kernel is booting from it.
Now it tries to detect your root partition, starting with the lowest extension.
"kernel" lets look, is it ant ext2 - no
ist it an ext3 - no
is it an ext4 - ah, yes, it is, so let it mount with these options...
So don't worry about it.
Regards, Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
 |
dlaor n00b

Joined: 27 Jan 2008 Posts: 55
|
Posted: Fri Sep 03, 2010 11:24 am Post subject: |
|
|
You can specify the file system of your root partition to be ext4 by putting the following option in the kernel line in grub.conf
My kernel line looks like this
Code: | kernel /boot/kernel-2.6.35-gentoo-r5 root=/dev/sda2 rootfstype=ext4 ... [other options]
|
Hope that works! |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Fri Sep 03, 2010 11:30 am Post subject: |
|
|
Build EXT2 support as module and the EXT2 line will disappear from dmsg. |
|
Back to top |
|
 |
low n00b


Joined: 25 Mar 2009 Posts: 18 Location: Maryland
|
Posted: Fri Sep 03, 2010 12:54 pm Post subject: |
|
|
Jaglover wrote: | Build EXT2 support as module and the EXT2 line will disappear from dmsg. |
can't do that cause i need ext2 for my /boot partition. thanks for the replies, i'll use rootfstype=ext4 and try my luck. |
|
Back to top |
|
 |
Manko10 Tux's lil' helper


Joined: 20 Aug 2010 Posts: 105
|
Posted: Fri Sep 03, 2010 12:56 pm Post subject: |
|
|
Addto your Kernel options in grub.conf and you'll get rid of this message.
[EDIT]
Too slow.
[EDIT2]
Oh, and that's already being said ways before. But yes, rootfstype will work.  _________________ Refining Linux Advent calendar series 2010: “24 Short Linux Hints” |
|
Back to top |
|
 |
Shining Arcanine Veteran

Joined: 24 Sep 2009 Posts: 1110
|
Posted: Fri Sep 03, 2010 1:06 pm Post subject: |
|
|
Compile your kernel without EXT2 support. Toggle the CONFIG_EXT4_USE_FOR_EXT23 kernel option and everything should just work.
Another option is to reformat your boot partition to be ext4. |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Sep 03, 2010 3:08 pm Post subject: |
|
|
Yeah you can do that, I noticed that too on my box. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23598
|
Posted: Fri Sep 03, 2010 11:14 pm Post subject: |
|
|
OP: when posting /etc/fstab, it is helpful to post it in a form that can be consumed by those of us who cannot read the UUIDs off your disk.
Randy Andy wrote: | At this time your ext2 (/boot) filesystem is already in use, cause the kernel is booting from it. | No. The kernel does not need to touch the boot filesystem at all, because Grub (or some other boot loader) has already placed the kernel and initramfs in memory. This quirk is what allows people to get themselves into the situation that they are running a kernel that cannot mount /boot to let them install a new kernel. |
|
Back to top |
|
 |
Shining Arcanine Veteran

Joined: 24 Sep 2009 Posts: 1110
|
Posted: Sat Sep 04, 2010 3:42 am Post subject: |
|
|
Hu wrote: | OP: when posting /etc/fstab, it is helpful to post it in a form that can be consumed by those of us who cannot read the UUIDs off your disk.
Randy Andy wrote: | At this time your ext2 (/boot) filesystem is already in use, cause the kernel is booting from it. | No. The kernel does not need to touch the boot filesystem at all, because Grub (or some other boot loader) has already placed the kernel and initramfs in memory. This quirk is what allows people to get themselves into the situation that they are running a kernel that cannot mount /boot to let them install a new kernel. |
In such a situation, would it be possible to compile ext2 as a kernel module and load it, or would things in the kernel binary have to change to support that? |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23598
|
Posted: Sat Sep 04, 2010 3:53 am Post subject: |
|
|
I believe I have read of people building ext2 as a module in that situation. However, there are some situations where a module and the running kernel must be built with the same .config so that the kernel exports functionality required by the module. |
|
Back to top |
|
 |
sparrow1 n00b

Joined: 23 Mar 2010 Posts: 5
|
Posted: Mon Sep 06, 2010 9:31 am Post subject: |
|
|
I think this behaviour exist because mounting ext2 as ext4 should be possible, but will upgrade filesystem in-place and thus make it (potentially) incompatible with boot loader for example. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23598
|
Posted: Mon Sep 06, 2010 3:45 pm Post subject: |
|
|
You can mount ext2 using the ext4 kernel driver, but that does not convert it to an ext4 filesystem. It remains ext2 until you change it using tune2fs. |
|
Back to top |
|
 |
Corona688 Veteran


Joined: 10 Jan 2004 Posts: 1204
|
Posted: Tue Sep 14, 2010 9:06 pm Post subject: |
|
|
low wrote: | Jaglover wrote: | Build EXT2 support as module and the EXT2 line will disappear from dmsg. |
can't do that cause i need ext2 for my /boot partition. | So what? Your kernel doesn't need to read the /boot partition to boot. That's grub's job. _________________ Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html |
|
Back to top |
|
 |
Etal Veteran


Joined: 15 Jul 2005 Posts: 1932
|
Posted: Tue Sep 14, 2010 9:28 pm Post subject: |
|
|
There's actually no need for any workarounds - there's nothing to worry about. According to Theodore Ts'o, it's just a cosmetic issue. |
|
Back to top |
|
 |
|