Bug 417601

Summary: LiveCDs created with selinux --disabled cannot be installed
Product: [Fedora] Fedora Reporter: Luis Felipe Marzagao <lfelipebm>
Component: livecd-toolsAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: davidz, katzj, lfelipebm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-07 22:04:27 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: 235706    
Attachments:
Description Flags
anaconda log none

Description Luis Felipe Marzagao 2007-12-10 00:41:59 UTC
Description of problem:

The process of installing a updated LiveCD created with livecd-creator can't be
completed. It stops at "Performing post-installation filesystem changes. This
may take several minutes..." and never ends, consuming a lot of CPU resources.


Version-Release number of selected component (if applicable):
livecd-tools.i386   013-1.fc8    installed
Included a repo with all updates up to 2007/12/09.


How reproducible:
always

Steps to Reproduce:
1. Configure a local repo with all updates
2. Create a LiveCD with livecd-creator
3. Boot with the livecd
4. Run liveinst
  
Actual results:
liveinst stops at "Performing post-installation filesystem changes. This may
take several minutes..." and never ends, consuming a lot of CPU resources.

No error messages are shown in the terminal.


Expected results:
LiveCD shoud install just fine.

Comment 1 Jeremy Katz 2007-12-10 15:55:38 UTC
How long did you let it wait?  And what size hard drive were you installing too?
 It really can take quite a while depending on your partitioning

Comment 2 Luis Felipe Marzagao 2007-12-11 00:29:08 UTC
Hello: Ok, just re-did some tests. My test computer is a Celeron with 512KB
cache L2, 512MB and a 80GB HD.

The official F8 LiveCD took only 5 minutes (yes, five minutes) to complete the
entire installation process, including the "post install" thing. I started
counting from "next" button until "congrats!".

The partition layout was "Remove all partitions and create default layout".

With my created LiveCD (from livecd-creator), with all updates until 2007/12/07,
it simply stops at the "post install" part, and never ends. No HD or CD-ROM
activity for hours.

Well, I'd like to provide more useful information, but what would it be? How
this issue could be debugged?

Tks.

Comment 3 Jeremy Katz 2007-12-11 01:59:39 UTC
What's the last bits in /tmp/anaconda.log?  Also, is there a /tmp/anacdump.txt?

Comment 4 Luis Felipe Marzagao 2007-12-11 02:47:31 UTC
There`s no /tmp/anacdump.txt. The last bits of anaconda.log are:

[fedora@localhost tmp]$ tail -n15 anaconda.log 
21:15:10 INFO    : trying to mount /tmp/sda1 on /boot
21:15:10 INFO    : set SELinux context for mountpoint /boot to False
21:15:10 DEBUG   : isys.py:mount()- going to mount /tmp/sda1 on /mnt/sysimage/boot
21:15:10 INFO    : set SELinux context for newly mounted filesystem root at
/boot to False
21:15:10 INFO    : trying to mount sys on /sys
21:15:11 INFO    : set SELinux context for mountpoint /sys to False
21:15:11 DEBUG   : isys.py:mount()- going to mount sys on /mnt/sysimage/sys
21:15:11 INFO    : set SELinux context for newly mounted filesystem root at /sys
to False
21:15:11 INFO    : trying to mount proc on /proc
21:15:11 INFO    : set SELinux context for mountpoint /proc to False
21:15:11 DEBUG   : isys.py:mount()- going to mount proc on /mnt/sysimage/proc
21:15:11 INFO    : set SELinux context for newly mounted filesystem root at
/proc to False
21:15:11 INFO    : set SELinux context for mountpoint /boot to False
21:15:11 DEBUG   : isys.py:mount()- going to mount /tmp/sda1 on
/mnt/sysimage/mnt/boot
21:15:11 INFO    : set SELinux context for newly mounted filesystem root at
/boot to False

The entire file will be attached.

Hum, now I remembered something. Maybe it has nothing to do with it, but... I`ve
built the livecd with "selinux --disabled" in the ks file. That was the only
change I've made to the original
/usr/share/livecd-tools/livecd-fedora-8-base-desktop.ks, besides, of course, the
repositories (so the packages were taken from my rsync local repo).

Comment 5 Luis Felipe Marzagao 2007-12-11 02:48:20 UTC
Created attachment 283531 [details]
anaconda log

Comment 6 Jeremy Katz 2007-12-11 14:51:12 UTC
Hmm... perhaps could be it.  Can you try running liveinst with a flag of
--noselinux and see if it helps?

Comment 7 Luis Felipe Marzagao 2007-12-12 01:13:40 UTC
Hello, Jeremy:

The --noselinux didn't help. The exact same thing happend. I notice liveinst
mounts /boot, and the /boot window opens, but it doesn't close anymore.

Anyway, at least I could narrow a bit the problem. It's definitely selinux,
because I created a livecd with "selinux --enforcing" in the ks file, and now
evertyhing is working. I successfully installed the created livecd.

So we can restrict to this: "selinux --disabled" in ks makes livecd uninstallable.

Comment 8 Jeremy Katz 2007-12-12 15:35:47 UTC
Great -- I'll hopefully have a chance this afternoon to build an image with
SELinux disabled and try to do some prodding at it.  You can also try littering
the anaconda code with prints to get a better idea of where it's hanging if
you're feeling extra motivated :-)

Comment 9 Luis Felipe Marzagao 2007-12-13 01:02:31 UTC
No doubt there's extra motivation in me! And I would be happy to help. The
trouble is I can't read python or complex coding. Just not skilled enough.
Regular user here. So I don't know if I can be of any help at this specific
part. I'm available, on the other hand, for other simpler tasks.

Comment 10 Jeremy Katz 2007-12-17 21:00:24 UTC
Hmm, I'm not reproducing with current HEAD and building with an older tree is
acting stupid on my box right now for some reason.

I would suggest opening up /usr/lib/anaconda/livecd.py and going down to the
_doFilesystemMangling() method.  Then, before each sort of block of code you can
add something like
   print "going to do 1"
and vary the number (or whatever variation you prefer).  Note that python is
indentation-sensitive, so you'll want to have your print statement indented at
the same level as the line below it.

This should then give a good idea of where exactly the hang is taking place and
then we can have a better idea.  It might also be helpful to add a 
  print "selinux is", flags.selinux
at the top of the method so that we can ensure that it's correctly seeing
SELinux as disabled.

Comment 11 Jeremy Katz 2008-02-07 22:04:27 UTC
Okay, just sat down and did some work here and fixed a few things up both in
livecd-creator and anaconda for F9