Created attachment 846524 [details]
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
Steps to Reproduce:
1. install a rhel7.0 guest with tree RHEL-7.0-20131222.0:
with option: -append 'ks=cdrom:/dev/sr1'
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
anaconda fetch kickstart from cdrom successfully
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:
-name 'virt-tests-vm1' \
-sandbox off \
-M pc \
-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 \
Created attachment 846525 [details]
screenshot - dracut
(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.
Installation of RHEL-7.0-20131123.0-Server-x86_64 (anaconda-19.31.36-1.el7.x86_64) works fine.
Hello Anaconda guys,
Could you pls have a look at this issue ?
The option "ks=cdrom:/dev/sr1" is wrong.
In RHEL6 and RHEL7, ks=cdrom:... works like this:
Probe all cdrom devices and look for '/ks.cfg'
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:
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?
Could you have a look comment7 and have a try?
Created attachment 848073 [details]
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.
Commit f0adbcb pushed to rhel7-branch.
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.
(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
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:
I had 2 cdroms attached.
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.
Created attachment 861738 [details]
The log is generated by ks=cdrom cmdline.
Created attachment 861740 [details]
This log file is generated by cmdline ks=cdrom:/ks.cfg.
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.
The problem with ks=cdrom:/ks.cfg is here:
dracut-pre-trigger: //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:
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.)
Created attachment 862093 [details]
attach the cdrom.log again.
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
Created attachment 862096 [details]
Created attachment 862097 [details]
(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
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.
Retested with anaconda-19.31.75-1.el7 and following boot options:
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.
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.