Bug 1347953 - symlink /etc/mtab to /proc/self/mounts breaks install to hard drive
Summary: symlink /etc/mtab to /proc/self/mounts breaks install to hard drive
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: livecd-tools
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-19 02:52 UTC by Evgueni Souleimanov
Modified: 2016-07-09 23:18 UTC (History)
4 users (show)

Fixed In Version: livecd-tools-13.4.10-1 livecd-tools-13.4.10-1.el6
Clone Of:
Environment:
Last Closed: 2016-06-23 15:30:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
kickstart file, modified, original http://people.centos.org/arrfab/CentOS6/LiveCD-DVD/ (17.99 KB, text/plain)
2016-06-19 02:52 UTC, Evgueni Souleimanov
no flags Details
anaconda exception report (51.11 KB, application/x-gzip)
2016-06-19 02:53 UTC, Evgueni Souleimanov
no flags Details
patch to livecd-tools that solves the problem for me (1.40 KB, patch)
2016-06-19 02:54 UTC, Evgueni Souleimanov
no flags Details | Diff
output of mount command on EL6, /etc/mtab is regular file (344 bytes, text/plain)
2016-06-19 02:56 UTC, Evgueni Souleimanov
no flags Details
output of mount command on EL6, /etc/mtab is symlink to /proc/self/mounts (1.10 KB, text/plain)
2016-06-19 02:56 UTC, Evgueni Souleimanov
no flags Details
my modification of livecd-tools.spec to integrate no-etc-mtab-symlink-688277.patch (1.62 KB, patch)
2016-06-19 02:58 UTC, Evgueni Souleimanov
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CentOS 11031 0 None None None 2016-06-21 00:44:50 UTC

Description Evgueni Souleimanov 2016-06-19 02:52:44 UTC
Created attachment 1169468 [details]
kickstart file, modified, original http://people.centos.org/arrfab/CentOS6/LiveCD-DVD/

Description of problem:

When an image is generated with /etc/mtab symlink to
/proc/self/mounts, it is not possible to install the image
to the hard drive. I get an anaconda exception.

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

livecd-tools-13.4.9-1.el6.x86_64.

How reproducible:


Steps to Reproduce:
1. Generate a LiveDVD using attached
centos6-liveDVD-desktop.cfg (variation of files found in
https://arrfab.net/posts/2011/Jul/28/centos-6-livecd-and-livedvd-tools/
and
http://people.centos.org/arrfab/CentOS6/LiveCD-DVD/ )

LANG=C LC_ALL=C livecd-creator --config=centos6-liveDVD-desktop.cfg --fslabel=CentOS-6.8-TestA-LiveDVD

2. Boot the created LiveDVD in a virtual machine. GNOME
desktop appears.

3. Open a terminal. Run commands:

sudo -i
passwd
(set root password to something)

4. Launch the "Install to Hard Drive" icon

5. Follow all the steps of the installation wizard

Actual results:

At the post-install filesystem changes step, anaconda will
generate the exception, as shown in
anaconda-exception-mtab-symlink.tar.gz


Expected results:

Installation is completed successfully.


Additional info:

The change was brought in version livecd-tools 13.4.8.

Attached patch to livecd-tools
(no-etc-mtab-symlink-688277.patch) fixes the problem for me.
The installed system has /etc/mtab as a regular file, and
this matches the installation of CentOS 6 from
installation DVD, CentOS-6.8-x86_64-bin-DVD1.iso.

Making /etc/mtab a symlink to /proc/self/mounts makes
drastic changes to the output of mount command. I attached
an example that I ran on a system where /etc/mtab is a
regular file.

The new mount output breaks kdump initrd generation in
/sbin/mkdumprd (kexec-tools), who expects "/" mountpoint to
appear once in the mount output.

It is also possible to fix the issue in anaconda and
kexec-tools, but patches for these components need to be
submitted separately.

There may be other packages affected by this.

Comment 1 Evgueni Souleimanov 2016-06-19 02:53:57 UTC
Created attachment 1169469 [details]
anaconda exception report

Comment 2 Evgueni Souleimanov 2016-06-19 02:54:49 UTC
Created attachment 1169470 [details]
patch to livecd-tools that solves the problem for me

Comment 3 Evgueni Souleimanov 2016-06-19 02:56:17 UTC
Created attachment 1169471 [details]
output of mount command on EL6, /etc/mtab is regular file

Comment 4 Evgueni Souleimanov 2016-06-19 02:56:59 UTC
Created attachment 1169472 [details]
output of mount command on EL6, /etc/mtab is symlink to /proc/self/mounts

Comment 5 Evgueni Souleimanov 2016-06-19 02:58:54 UTC
Created attachment 1169473 [details]
my modification of livecd-tools.spec to integrate no-etc-mtab-symlink-688277.patch

Comment 6 Brian Lane 2016-06-20 17:30:25 UTC
Thanks. I think I pulled that in originally to remove the relative symlink and should have left the unlink for the rhel6 branch. PR for others to comment on is here:

https://github.com/rhinstaller/livecd-tools/pull/30

Comment 7 Brian Lane 2016-06-20 18:51:09 UTC
Looks like it was added for bug 1214621, but I'm not sure of exactly why.

Comment 8 Evgueni Souleimanov 2016-06-21 00:44:51 UTC
I spotted the problem a few months ago because I have been using livecd-tools from EPEL.

CentOS 6 may have used livecd-tools version 0.3.6 to build the official LiveDVDs - that version does not have the problem. 

https://bugs.centos.org/view.php?id=11031

Source RPM for livecd-tools used for creating Scientific Linux 6 LiveDVDs is:

http://ftp.scientificlinux.org/linux/scientific/6x/addons/i386/live-creator/livecd-tools-13.4.7-17.sl6.src.rpm

with this changelog entry:

* Thu Aug 25 2015 Urs Beyerle <urs.beyerle.ch> - 13.4.7-17
- update to 13.4.7. Note that 13.4.8 seems to be broken with SL6x.

Comment 9 Fedora Update System 2016-06-22 02:44:13 UTC
livecd-tools-13.4.10-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-caa9c3788d

Comment 10 Fedora Update System 2016-06-22 22:19:20 UTC
livecd-tools-13.4.10-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-caa9c3788d

Comment 11 Evgueni Souleimanov 2016-06-23 01:42:53 UTC
livecd-tools-13.4.10-1.el6.x86_64

from https://dl.fedoraproject.org/pub/epel/testing/6/x86_64/

produces LiveDVDs that have /etc/mtab as regular read-write file.

Install to hard drive works, no exception from anaconda.

Also, initrd for kdump is generated on first boot of the installed system, as expected.

Comment 12 Fedora Update System 2016-07-09 23:18:14 UTC
livecd-tools-13.4.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


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