Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409979 - initrd mounting /usr read/write
Summary: initrd mounting /usr read/write
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-28 10:04 UTC by John Covici
Modified: 2020-08-09 20:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,14.54 KB, text/plain)
2012-03-28 10:09 UTC, John Covici
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Covici 2012-03-28 10:04:07 UTC
e2fsck is failing on /usr because its already mounted read/write -- seemingly by the initrd

Reproducible: Always

Steps to Reproduce:
1.
2.
3.generate the initrd using genkernel, run lilo, reboot the system.
Actual Results:  
e2fsck not working for /usr

Expected Results:  
/usr should be mounted read only so e2fsck works.
Comment 1 John Covici 2012-03-28 10:09:30 UTC
Created attachment 306941 [details]
emerge --info
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-28 18:50:01 UTC
Mounting /usr rw is actually correct. Dracut does so, too. Please pass 0 0 in fstab if openrc fails on fsck, because /usr should be checked in initramfs-time.
Comment 3 John Covici 2012-03-29 17:54:41 UTC
I did check upon my next reboot and initrd does mount /usr read only but e2fsck will not work, so the initrd must run e2fsck before mounting.
Comment 4 Xake 2012-09-05 12:25:29 UTC
Actually this is a feature-request.

We need to start checking at least ext{3,4}-fs, since e2fsck refuses to test anything mounted, even if mounted "ro".
My system has no support for anything but ext* and btrfs compiled for the moment so could anyone check if the same holds true for, say XFS?

# mount | grep VirtIO-backup
/dev/mapper/VirtIO-backup on /mnt/tmp type ext4 (ro,relatime,data=ordered)
# fsck /dev/VirtIO/backup 
fsck from util-linux 2.21.2
e2fsck 1.42.5 (29-Jul-2012)
/dev/mapper/VirtIO-backup is mounted.
e2fsck: Cannot continue, aborting.



So we needs to start test mounts before mounted in initramfs.
(And could someone with access please remove the reference to pre-Linux-2.6 tech in the summary, it is impossible that the user has an initrd instead of a initramfs).
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2020-08-09 20:28:12 UTC
I haven't checked if genkernel really mounted something rw in 2012 but current genkernel-4 doesn't do that. Closing as OBSOLETE...