Bug 1049237 - anaconda fail to fetch kickstart from cdrom
Summary: anaconda fail to fetch kickstart from cdrom
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Will Woods
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-07 09:24 UTC by CongLi
Modified: 2015-10-19 15:56 UTC (History)
12 users (show)

Fixed In Version: anaconda-19.31.58-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 13:16:11 UTC
Target Upstream Version:


Attachments (Terms of Use)
serial log (31.85 KB, text/x-log)
2014-01-07 09:24 UTC, CongLi
no flags Details
screenshot - dracut (106.70 KB, image/jpeg)
2014-01-07 09:27 UTC, CongLi
no flags Details
cdrom.log (36.13 KB, text/plain)
2014-02-11 10:09 UTC, xhan
no flags Details
cdrom_ks.cfg.log (206.71 KB, text/plain)
2014-02-11 10:11 UTC, xhan
no flags Details
cdrom.log (205.95 KB, text/plain)
2014-02-12 02:32 UTC, xhan
no flags Details
cdrom.sr0.url.ks.aio_native.log (217.39 KB, text/plain)
2014-02-12 02:59 UTC, xhan
no flags Details
cdrom.sr0.url.ks.aio_threads.log (200.28 KB, text/plain)
2014-02-12 02:59 UTC, xhan
no flags Details

Description CongLi 2014-01-07 09:24:17 UTC
Created attachment 846524 [details]
serial log

Description of problem:
anaconda fail to fetch kickstart from cdrom

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

anaconda-19.31.41-1.el7.x86_64 shipped with RHEL-7.0-20131222.0

How reproducible:
Always

Steps to Reproduce:
1. install a rhel7.0 guest with tree RHEL-7.0-20131222.0:
   with option: -append 'ks=cdrom:/dev/sr1'
2.
3.

Actual results:
anaconda fail to fetch kickstart from cdrom then goes to dracut

serial log (attached):
2014-01-07 17:06:17: [   14.747992] scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    1.5. PQ: 0 ANSI: 5
2014-01-07 17:06:17: [   14.749536] scsi 0:0:1:0: CD-ROM            QEMU     QEMU DVD-ROM     1.5. PQ: 0 ANSI: 5
2014-01-07 17:06:17: [   14.750971] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     1.5. PQ: 0 ANSI: 5
2014-01-07 17:06:17: [   14.872655] cirrus 0000:00:02.0: fb0: cirrusdrmfb frame buffer device
2014-01-07 17:06:17: [   14.876471] cirrus 0000:00:02.0: registered panic notifier
2014-01-07 17:06:17: [   14.886473] [drm] Initialized cirrus 1.0.0 20110418 for 0000:00:02.0 on minor 0
2014-01-07 17:06:17: [   14.934121] sr0: scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
2014-01-07 17:06:17: [   14.939663] cdrom: Uniform CD-ROM driver Revision: 3.20
2014-01-07 17:06:17: [   14.950821] sr1: scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
2014-01-07 17:06:17: [   15.063815] sd 0:0:0:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
2014-01-07 17:06:17: [   15.078503] sd 0:0:0:0: [sda] Write Protect is off
2014-01-07 17:06:17: [   15.087730] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
2014-01-07 17:06:17: [   15.121189]  sda: unknown partition table
2014-01-07 17:06:17: [   15.124510] sd 0:0:0:0: [sda] Attached SCSI disk

Expected results:
anaconda fetch kickstart from cdrom successfully

Additional info:
1. with option 'ks=cdrom:/dev/sr0:/ks.cfg' doesn't work either

2. with option 'ks=hd:sr1:/ks.cfg' works fine

3. Qemu CML:
/root/staf-kvm-devel/autotest-devel/client/tests/virt/qemu/qemu \
    -S  \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga cirrus  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20140107-170550-4SULHXAP,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20140107-170550-4SULHXAP,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20140107-170550-4SULHXAP,path=/tmp/seabios-20140107-170550-4SULHXAP,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20140107-170550-4SULHXAP,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.0-64-virtio.qcow2 \
    -device ide-hd,id=image1,drive=drive_image1,bus=ide.0,unit=0 \
    -device virtio-net-pci,mac=9a:e0:e1:e2:e3:e4,id=id3m8m16,netdev=idYSR4Sn,bus=pci.0,addr=04  \
    -netdev tap,id=idYSR4Sn,vhost=on,vhostfd=23,fd=22  \
    -m 2048  \
    -smp 1,maxcpus=1,cores=1,threads=1,sockets=2  \
    -cpu 'Opteron_G2' \
    -drive id=drive_cd1,if=none,snapshot=off,aio=native,media=cdrom,file=/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/isos/linux/RHEL7.0-Server-x86_64.iso \
    -device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=1 \
    -drive id=drive_unattended,if=none,snapshot=off,aio=native,media=cdrom,file=/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/rhel70-64/ks.iso \
    -device ide-cd,id=unattended,drive=drive_unattended,bus=ide.1,unit=0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -kernel '/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/rhel70-64/vmlinuz'  \
    -append 'ks=cdrom:/dev/sr1 nicdelay=60 console=ttyS0,115200 console=tty0'  \
    -initrd '/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/rhel70-64/initrd.img'  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=d,menu=off  \
    -no-kvm-pit-reinjection \
    -no-shutdown \
    -enable-kvm

Comment 1 CongLi 2014-01-07 09:27:09 UTC
Created attachment 846525 [details]
screenshot - dracut

Comment 3 CongLi 2014-01-07 10:11:33 UTC
(In reply to CongLi from comment #0)
> 2. with option 'ks=hd:sr1:/ks.cfg' works fine

with option 'ks=hd:sr1:/ks.cfg', sometimes failed either.

Comment 4 CongLi 2014-01-07 10:20:14 UTC
Installation of RHEL-7.0-20131123.0-Server-x86_64 (anaconda-19.31.36-1.el7.x86_64) works fine.

Comment 6 Xiaoqing Wei 2014-01-09 03:37:21 UTC
Hello Anaconda guys,

Could you pls have a look at this issue ?

Thx.
Xiaoqing.

Comment 7 Will Woods 2014-01-09 20:50:29 UTC
The option "ks=cdrom:/dev/sr1" is wrong.

In RHEL6 and RHEL7, ks=cdrom:... works like this:

* ks=cdrom

  Probe all cdrom devices and look for '/ks.cfg'

* ks=cdrom:<path>

  Probe all cdrom devices and look for <path>

(See documentation: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-startinginstall.html)

In RHEL7 you may also use:

* ks=cdrom:<dev>:<path>

  Look for <path> on the cdrom device <dev>.
  This is identical to "ks=hd:<dev>:<path>".

If you get the wrong device (e.g. the CDROM is in /dev/sr1 but you used "/dev/sr0"), this will fail.

Could you please try the following and tell me if they work?


  ks=cdrom
  ks=cdrom:/ks.cfg
  ks=cdrom:/dev/sr1:/ks.cfg

Comment 8 juzhang 2014-01-10 02:12:58 UTC
Hi Cong,

Could you have a look comment7 and have a try?

Best Regards,
Junyi

Comment 10 CongLi 2014-01-10 07:18:17 UTC
Created attachment 848073 [details]
QEMU CML

Comment 11 Will Woods 2014-01-10 21:28:19 UTC
I've pushed a fix for this into the 'master' git branch; once the appropriate flags are set we can get this pulled into rhel7.

Comment 12 Will Woods 2014-01-24 18:21:03 UTC
Commit f0adbcb pushed to rhel7-branch.

Comment 14 Martin Banas 2014-01-30 07:34:35 UTC
Verified, that with:
ks=cdrom -> works
ks=cdrom:/dev/sr1:/ks.cfg -> works
ks=cdrom:/dev/sr1:/another_ks.cfg -> works
ks=cdrom:/another_ks.cfg -> works

ks=cdrom:/dev/sr0 -> doesn't work (expected)

Moving to VERIFIED.

Verified on:
RHEL-7.0-20140129.n.0:
anaconda-19.31.54-1.el7

Comment 15 xhan 2014-02-11 08:00:20 UTC
(In reply to Martin Banas from comment #14)
> Verified, that with:
> ks=cdrom -> works

How many cdrom devices are there in your test environment? 
My test result is failed.
ks=cdrom -> failed
ks=cdrom:/ks.cfg ->failed.

Tested version:
anaconda-19.31.56-1.el7.x86_64.rpm (shipped with RHEL-7.0-20140206.0)
  
> ks=cdrom:/dev/sr1:/ks.cfg -> works
> ks=cdrom:/dev/sr1:/another_ks.cfg -> works
> ks=cdrom:/another_ks.cfg -> works
> 
> ks=cdrom:/dev/sr0 -> doesn't work (expected)
> 
> Moving to VERIFIED.
> 
> Verified on:
> RHEL-7.0-20140129.n.0:
> anaconda-19.31.54-1.el7

Comment 16 Martin Banas 2014-02-11 08:39:06 UTC
Hi,
I had 2 cdroms attached.

Comment 17 Martin Banas 2014-02-11 08:59:22 UTC
Could you please attach some log files? Probably best would be to boot with: rd.debug and gather the logs from the console. Please move the bug then back to ASSIGNED.

I tried it again now and I'm still not able to reproduce it.

Thanks!

Comment 18 xhan 2014-02-11 10:09:40 UTC
Created attachment 861738 [details]
cdrom.log

The log is generated by ks=cdrom cmdline.

Comment 19 xhan 2014-02-11 10:11:05 UTC
Created attachment 861740 [details]
cdrom_ks.cfg.log

This log file is generated by cmdline ks=cdrom:/ks.cfg.

Comment 20 xhan 2014-02-11 10:15:04 UTC
I use the kernel commandline "-append 'ks= ... console=ttyS0,115200 rd.debug".
  ks=cdrom          ---> cdrom.log          
  ks=cdrom:/ks.cfg  ---> cdrom_ks.cfg.log 
   
Are these capture files enough? If not, let me your method to save log.

Comment 21 Will Woods 2014-02-11 20:48:52 UTC
The problem with ks=cdrom:/ks.cfg is here:

  dracut-pre-trigger[416]: //lib/dracut/hooks/pre-trigger/50-kickstart-genrules.sh: line 16: when_any_cdrom_appears: command not found

A required commit didn't get pulled into rhel7-branch. It's now been pushed:

  https://git.fedorahosted.org/cgit/anaconda.git/commit/?h=rhel7-branch&id=70dc76d

So that should be fixed in the next anaconda build.

The same patch should also fix the "ks=cdrom" case, but I can't tell for sure, since the log seems to be incomplete. (there's no mention of parse-anaconda-kickstart.sh at all.)

Comment 22 xhan 2014-02-12 02:32:40 UTC
Created attachment 862093 [details]
cdrom.log

attach the cdrom.log again.

Comment 23 xhan 2014-02-12 02:58:19 UTC
Met the anaconda dracut problem with ks=cdrom:/dev/sr0:/ks.cfg which aio is assigned as native.

If being changed to aio=threads, the test passed.

Please refer the log files: cdrom.sr0.url.ks.aio_native.log and cdrom.sr0.url.ks.aio_threads.log

Comment 24 xhan 2014-02-12 02:59:02 UTC
Created attachment 862096 [details]
cdrom.sr0.url.ks.aio_native.log

Comment 25 xhan 2014-02-12 02:59:29 UTC
Created attachment 862097 [details]
cdrom.sr0.url.ks.aio_threads.log

Comment 27 Xu Tian 2014-02-12 03:05:58 UTC
(In reply to xhan from comment #23)
> Met the anaconda dracut problem with ks=cdrom:/dev/sr0:/ks.cfg which aio is
> assigned as native.
> 
> If being changed to aio=threads, the test passed.
> 
> Please refer the log files: cdrom.sr0.url.ks.aio_native.log and
> cdrom.sr0.url.ks.aio_threads.log

Hi xhan,

It looks above issue is a bug of qemu-kvm component, it's better to open a new bug in qemu-kvm component to track above issue.

Thanks,
Xu

Comment 28 Jan Stodola 2014-04-08 14:09:12 UTC
Retested with anaconda-19.31.75-1.el7 and following boot options:

ks=cdrom
ks=cdrom:/ks.cfg
ks=cdrom:/dev/sr1:/ks.cfg

All worked as expected, the when_any_cdrom_appears() function is present in usr/lib/anaconda-lib.sh of the installation initrd.

Moving to VERIFIED.

Comment 29 Ludek Smid 2014-06-13 13:16:11 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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