Bug 568367 - Mounting disks read-only in rescue mode presents error
Summary: Mounting disks read-only in rescue mode presents error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Martin Sivák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F13Beta, F13BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2010-02-25 15:08 UTC by James Laska
Modified: 2013-09-02 06:45 UTC (History)
3 users (show)

Fixed In Version: anaconda-14.0-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-16 14:43:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
/tmp/*log.tgz (22.16 KB, application/x-gzip)
2010-02-25 15:08 UTC, James Laska
no flags Details

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


Note You need to log in before you can comment on or make changes to this bug.