Re: update grub2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On May 18, 2014, at 1:42 PM, Patrick Dupre <pdupre@xxxxxxx> wrote:

> OK,
> 
> Thank you.
> 
> I understand the mistake:
> in /etc/fstab, there is
> /dev/mapper/VolGrpSys_DK0-root /                       ext4    defaults        1 1
> instead of:
> /dev/mapper/VolGrpSys_DK1-root /                       ext4    defaults        1 1
> However,
> mount gives:
> /dev/mapper/VolGrpSys_DK1-root on / type ext4 (rw,relatime,seclabel,stripe=2,data=ordered)
> 
> How is it possible?

I don't understand the question. But you need to remove the wrong entry from the fstab. Clearly grub2-mkconfig and grubby have different ideas about which entry to use. I'd argue that grubby creating a grub menu entry using a bogus fstab entry is failure of one the whole points of having grubby, so I'd file that as a bug even though the fstab man page says it's the sysadmins job to make certain the fstab is always correct.


> Is / mounted before the reading of /etc/fstab (ie from grub2)?

grub doesn't normally read fstab at all, except when doing grub2-mkconfig. Strictly speaking it's os-prober called by grub2-mkconfig that does this, it can locate fstab on non-mounted file systems so it can figure out how to create menu entries to boot other OS's installed on the system. At boot time, core.img (the embedded code on MBR systems, and it appears as grux64.efi on UEFI systems) contains code to read the file system that contains the grub directory. From there it can load the grub.cfg, and then additional file system modules as needed to read other directories so it can load the kernel and initramfs for any OS's that are listed in the grub menu.


> And then because / is already mounted, it cannot be mounted again, then
> why mount / in fstab then?

I don't completely understand the question. The fstab contains a complete picture of how the file system ought to be mounted. That's  how grub2-mkconfig can make boot entries for non-mounted OS file systems on a multiboot systems. But it's also there to indicate fs mount options, which aren't indicated elsewhere.

systemd is expecting to mount the root file system based on the boot parameter root= but it doesn't know any additional mount options without the benefit of fstab. The fstab isn't readable in early boot because the root file system isn't mounted. And at least on Rawhide right now I'm finding the initramfs contains an empty fstab. So systemd is going to do an fsck on the root= file system, then mount it ro, then it reads fstab and creates a bunch of mount jobs including one that remounts root from ro to rw along with fstab specified mount options.


Chris Murphy
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux