I've read several web pages that explain how to switch ext3 to data=journal mode on the root file system. Such as this one: http://www.gentoo.org/doc/en/articles/l-afig-p8.xml?style=printable (Search for "rootflags".) They explain that one method of enabling it involves adding "data=journal" to the mount flags in /etc/fstab AND adding "rootflags=data=journal" to the boot options in grub.conf. For example: kernel /boot/kernel-genkernel-x86_64-2.6.29-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/md3 vga=0x307 video=vesafb:mtrr:3,ywrap domdadm rootflags=data=journal And /dev/md3 / ext3 data=journal 0 1 When I did that, my system wouldn't mount the root file system read/write. I came to realize that this was because the boot options "disagreed" with fstab. What I found I had to do was chose the other option, which is to use tune2fs to add the data_journal flag. Then it worked fine. So, either I put rootflags=data=journal in the wrong place (where else can I put it), or the option doesn't work. I don't know if this is a grub bug or a kernel bug, but the option is completely ignored. Alternatively, if this is officially no longer supported, then perhaps it should be removed from the docs to avoid further confusion. Reproducible: Always
sounds like a bug in your initramfs (/linuxrc) -- when you use an initramfs, the usual root mounting code is not followed and instead it is up to the initramfs to implement things like rootflags= (or decide to ignore them). Which initramfs are you using?
How do I TELL which intramfs I'm using?
Does it have anything to do with this: http://bugs.gentoo.org/122672 I found this bug here because using rootflags with a genkernel initramfs does not work for me. The bugreport suggests that real_rootflags is what I should use. However that was 2006 so things may have changed...
I have verified that real_rootflags works while rootflags does not for genkernel compiled kernels. Well at least the one I am using and jmd0 ~ # equery l genkernel * Searching for genkernel ... [IP-] [ ] sys-kernel/genkernel-3.4.10-r2 (0)
That's interesting. I'd done quite a lot of googling to solve this problem, and I never saw that flag anywhere, and no one on IRC had a solution either. If this flag is the answer, it's well hidden (alas, like so many others).
So I guess I'd like to amend this bug report, stating that the bug actually resides here, in this document that is apparently wrong: http://www.gentoo.org/doc/en/articles/l-afig-p8.xml?style=printable It says: "So, if you'd like to put your root filesystem into full data journaling mode, add rootflags=data=journal to your kernel boot options." Which apparently isn't true.
The bug report was the second google hit for realroot after this one. Anyways I am booting with real_rootflags=data=writeback without data=writeback in my /etc/fstab and it booted with / mounted as expected. I did have that in /etc/fstab before I found the real_rootflags and I had the ro / like you.
(In reply to comment #6) > So I guess I'd like to amend this bug report, stating that the bug actually > resides here, in this document that is apparently wrong: > > http://www.gentoo.org/doc/en/articles/l-afig-p8.xml?style=printable > > It says: "So, if you'd like to put your root filesystem into full data > journaling mode, add rootflags=data=journal to your kernel boot options." > > Which apparently isn't true. > I believe this is true if you are not using the real_root kernel parameter.
(In reply to comment #7) > The bug report was the second google hit for realroot after this one. > I meant rootflags but now I can not find it in google. I am not sure what magic term I searched for but it was the second hit..
(In reply to comment #8) > (In reply to comment #6) > > So I guess I'd like to amend this bug report, stating that the bug actually > > resides here, in this document that is apparently wrong: > > > > http://www.gentoo.org/doc/en/articles/l-afig-p8.xml?style=printable > > > > It says: "So, if you'd like to put your root filesystem into full data > > journaling mode, add rootflags=data=journal to your kernel boot options." > > > > Which apparently isn't true. > > > > I believe this is true if you are not using the real_root kernel parameter. > Then why doesn't the gentoo documentation explain this? We're told to use the real_root parameter: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10 Quoting the page: kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 The bug is in the documentation. If you're using genkernel, then you'll get in trouble because the docs tell you to use real_root but neglect to tell you to use real_rootflags if you need any. A defining characteristic of Gentoo is that most things have to be done manually, so users rely on complete documentation. In fact, much of Gentoo just IS documentation. We're not in an Ubuntu or MacOS world where things are automatic and have nice little GUIs that show us all the options. We NEED this documentation just to function. I know _I_ do because primarily I'm a chip designer and don't always like cramming my head with all of this sysadmin detail. Keep in mind that I'm not blaming anyone in particular. Considering how long this bug report has gone unanswered (Thank you Mr. Drescher!), it appears that even Gentoo devs don't know about the real_rootflags option. If anyone's to blame, it's the grub devs for not documenting their stuff. In any case, now that we know the answer, we need to make sure that the docs get fixed. (I might fix it myself if I had access, although I'm not sure I want to open that can of worms.)
Thanks for the report and the debugging, gentlemen! I CC the Gentoo Documentation team, to see what's their opinion on the matter :)
Thanks, Timothy for finding this. You definitely need to use REAL_ROOTFLAGS. This is documented in bug #122672 and has been in place since 11/2006. I'll make a patch for the documentation and assign to doc team for their approval/editing.
Created attachment 205134 [details, diff] Handbook patch to describe usage of rootflags and real_rootflags for bootloader When configuring mount options in the bootloader config file, the user must use real_rootflags if the real_root parameter is used. If the root= parameter is used, the rootflags= parameter is used to pass options.
Patch attached and assigning to doc team for review/edit/committal/etc.
Thanks for investigating, and for the patch, Mike. Fixed in CVS.
Yes. Thank you very much for fixing this.
(In reply to comment #13) > Created an attachment (id=205134) [details] > Handbook patch to describe usage of rootflags and real_rootflags for bootloader > > When configuring mount options in the bootloader config file, the user must use > real_rootflags if the real_root parameter is used. If the root= parameter is > used, the rootflags= parameter is used to pass options. > http://bugs.gentoo.org/attachment.cgi?id=205134&action=view Hi, sorry to bring this up again, but the above patch make me a little confused: What's the difference between "configuration file contains the real_root parameter" and "real_root defines the root mount point"? If the latter is true, the former must be true. Isn't it?
(In reply to comment #17) You're right. I rewrote it so that it would make sense: that if you use real_root, then use real_rootflags.