Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 568367

Summary: Mounting disks read-only in rescue mode presents error
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: anacondaAssignee: Martin Sivák <msivak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jonathan, jturner, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-14.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-16 14:43:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 538274    
Attachments:
Description Flags
/tmp/*log.tgz none

Description James Laska 2010-02-25 15:08:56 UTC
Created attachment 396289 [details]
/tmp/*log.tgz

Description of problem:

Choosing read-only when mounting the previous install from rescue mode, warns about a problem mounting the disks.  I'm still able to chroot into the rescued environment.  This happens under when rescuing a default partition scheme.

Version-Release number of selected component (if applicable):
 * anaconda-13.31

How reproducible:
 * 100%

Steps to Reproduce:
1. Boot the installer into rescue mode on a previously installed system
2. When prompted, choose to mount hte system read-only

                   ┌──────────────┤ Rescue ├───────────────┐                    
                   │                                       │                    
                   │ Your system has been mounted under    │                    
                   │ /mnt/sysimage.                        │                    
                   │                                       │                    
                   │ Press <return> to get a shell. If you │                    
                   │ would like to make your system the    │                    
                   │ root environment, run the command:    │                    
                   │                                       │                    
                   │         chroot /mnt/sysimage          │                    
                   │                                       │                    
                   │ The system will reboot automatically  │                    
                   │ when you exit from the shell.         │                    
                   │                                       │                    
                   │                ┌────┐                 │                    
                   │                │ OK │                 │                    
                   │                └────┘                 │                    
                   │                                       │                    
                   │                                       │                    
                   └───────────────────────────────────────┘                    

3. Press OK to access the rescue environment  

Actual results:

                   ┌───────────────┤ Rescue ├───────────────┐                   
                   │                                        │                   
                   │ An error occurred trying to mount some │                   
                   │ or all of your system. Some of it may  │                   
                   │ be mounted under /mnt/sysimage.        │                   
                   │                                        │                   
                   │ Press <return> to get a shell. The     │                   
                   │ system will reboot automatically when  │                   
                   │ you exit from the shell.               │                   
                   │                                        │                   
                   │                ┌────┐                  │                   
                   │                │ OK │                  │                   
                   │                └────┘                  │                   
                   │                                        │                   
                   │                                        │                   
                   └────────────────────────────────────────┘                   

Expected results:

 * No error message

Additional info:

 * mounting the system read-write works fine
 * from /tmp/anaconda.log 

15:02:20,863 INFO anaconda: failed to set SELinux context for /mnt/sysimage: [Errno 95] Operation not supported
15:02:20,864 DEBUG anaconda: isys.py:mount()- going to mount /dev/vda1 on /mnt/sysimage as ext4 with options ro
15:02:20,924 INFO anaconda: failed to set SELinux context for /mnt/sysimage: [Errno 30] Read-only file system
15:02:20,929 INFO anaconda: failed to set SELinux context for /mnt/sysimage/lost+found: [Errno 30] Read-only file system
15:02:20,934 DEBUG anaconda: isys.py:umount()- going to unmount /mnt/sysimage, removeDir = False
15:02:21,320 INFO anaconda: failed to set SELinux context for /mnt/sysimage: [Errno 95] Operation not supported
15:02:21,324 DEBUG anaconda: isys.py:mount()- going to mount /dev/mapper/vg_test117-lv_root on /mnt/sysimage as ext4 with options ro
15:02:21,951 INFO anaconda: failed to set SELinux context for /mnt/sysimage: [Errno 30] Read-only file system
15:02:21,955 INFO anaconda: failed to set SELinux context for /mnt/sysimage/lost+found: [Errno 30] Read-only file system
15:02:21,973 DEBUG anaconda: isys.py:umount()- going to unmount /mnt/sysimage, removeDir = False
15:02:22,720 INFO anaconda: failed to set SELinux context for /mnt/sysimage: [Errno 95] Operation not supported
15:02:22,724 DEBUG anaconda: isys.py:mount()- going to mount /dev/mapper/vg_test117-lv_root on /mnt/sysimage as ext4 with options ro
15:02:22,746 INFO anaconda: failed to set SELinux context for /mnt/sysimage: [Errno 30] Read-only file system
15:02:22,750 INFO anaconda: failed to set SELinux context for /mnt/sysimage/lost+found: [Errno 30] Read-only file system
15:02:22,970 INFO anaconda: failed to set SELinux context for /mnt/sysimage/boot: [Errno 30] Read-only file system
15:02:22,971 DEBUG anaconda: isys.py:mount()- going to mount /dev/vda1 on /mnt/sysimage/boot as ext4 with options defaults,ro
15:02:22,990 INFO anaconda: failed to set SELinux context for /mnt/sysimage/boot: [Errno 30] Read-only file system
15:02:22,994 INFO anaconda: failed to set SELinux context for /mnt/sysimage/boot/lost+found: [Errno 30] Read-only file system
15:02:23,003 INFO anaconda: failed to set SELinux context for /mnt/sysimage/dev: [Errno 30] Read-only file system
15:02:23,004 DEBUG anaconda: isys.py:mount()- going to mount //dev on /mnt/sysimage/dev as bind with options defaults,ro,bind
15:02:23,037 DEBUG anaconda: isys.py:mount()- going to mount devpts on /mnt/sysimage/dev/pts as devpts with options gid=5,mode=620,ro
15:02:23,055 INFO anaconda: failed to set SELinux context for /mnt/sysimage/dev/pts: [Errno 30] Read-only file system
15:02:23,065 DEBUG anaconda: isys.py:mount()- going to mount tmpfs on /mnt/sysimage/dev/shm as tmpfs with options defaults,ro
15:02:23,083 INFO anaconda: failed to set SELinux context for /mnt/sysimage/dev/shm: [Errno 30] Read-only file system
15:02:23,091 INFO anaconda: failed to get default SELinux context for /proc: [Errno 2] No such file or directory
15:02:23,093 DEBUG anaconda: isys.py:mount()- going to mount proc on /mnt/sysimage/proc as proc with options defaults,ro
15:02:23,109 INFO anaconda: failed to get default SELinux context for /proc: [Errno 2] No such file or directory
15:02:23,117 INFO anaconda: failed to get default SELinux context for /sys: [Errno 2] No such file or directory
15:02:23,118 DEBUG anaconda: isys.py:mount()- going to mount sysfs on /mnt/sysimage/sys as sysfs with options defaults,ro
15:02:23,155 INFO anaconda: failed to get default SELinux context for /sys: [Errno 2] No such file or directory
15:02:58,011 DEBUG anaconda: isys.py:mount()- going to mount /selinux on /mnt/sysimage/selinux as selinuxfs with options defaults
15:02:58,048 ERROR anaconda: <type 'exceptions.IOError'>: [Errno 30] Read-only file system: '/mnt/sysimage/.autorelabel'

Comment 1 Martin Sivák 2010-03-15 13:24:37 UTC
Have you tried running the rescue mode on a system where /.autorelabel is not present? It seems that all went well (can you send me the output of 'mount' please?) and the file triggered automatic SELinux relabel.. which failed because the filesystem was RO.

Comment 2 James Laska 2010-03-15 13:48:19 UTC
(In reply to comment #1)
> Have you tried running the rescue mode on a system where /.autorelabel is not
> present? 

Yes.

bash-4.1# ls -l /mnt/sysimage/.auto*
ls: cannot access /mnt/sysimage/.auto*: No such file or directory

> It seems that all went well (can you send me the output of 'mount'
> please?) and the file triggered automatic SELinux relabel.. which failed
> because the filesystem was RO.    

That attached file includes /tmp/*log (this includes program.log).  Does that have the information you need?

Comment 3 Martin Sivák 2010-03-15 13:58:50 UTC
Thanks, I found out that anaconda tries to touch the .autorelabel file, which obviously has to fail when the filesystem is read only. I'm adding an error check and warning message to the logs instead of the crash..

Will be included as soon as I get it reviewed.

Comment 4 Martin Sivák 2010-03-16 14:43:21 UTC
Included in anaconda-14.0-1

Comment 5 Fedora Update System 2010-03-23 21:29:57 UTC
anaconda-13.36-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/anaconda-13.36-1.fc13