Bug 751449 - kickstart can't write to a file in %pre section
Summary: kickstart can't write to a file in %pre section
Keywords:
Status: CLOSED DUPLICATE of bug 729640
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 16
Hardware: i686
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-04 18:52 UTC by Andrew Gillis
Modified: 2011-11-07 18:13 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-11-07 18:13:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
error (11.66 KB, text/plain)
2011-11-04 18:52 UTC, Andrew Gillis
no flags Details
anaconda.log (8.65 KB, text/plain)
2011-11-07 14:06 UTC, Andrew Gillis
no flags Details
ifcfg.log (792 bytes, text/plain)
2011-11-07 14:06 UTC, Andrew Gillis
no flags Details
program.log (18.58 KB, text/plain)
2011-11-07 14:07 UTC, Andrew Gillis
no flags Details
storage.log (110.33 KB, text/plain)
2011-11-07 14:08 UTC, Andrew Gillis
no flags Details
WpZvqV-ks.cfg (2.37 KB, text/plain)
2011-11-07 14:08 UTC, Andrew Gillis
no flags Details
syslog (149.39 KB, text/plain)
2011-11-07 18:03 UTC, Andrew Gillis
no flags Details

Description Andrew Gillis 2011-11-04 18:52:03 UTC
Created attachment 531830 [details]
error

Description of problem: I'm trying to build a system using a kickstart file. I use the %pre section to create a file then %include it in the kickstart file later. Not matter what I write to a file I get the attached anaconda error.

I don't get any errors if I don't write to a file in %pre



How reproducible:
Use this kickstart that writes to a/tmp/include-parts


lang en_US.UTF-8
keyboard us
authconfig --useshadow  --enablemd5
firewall --disabled
firstboot --disable
logging --level=info
network --bootproto=dhcp --device=eth0 --onboot=on
selinux --disabled
skipx
cdrom
reboot
install
text

timezone America/New_York
rootpw  vortexbox

#Partition clearing information
zerombr
clearpart --all --initlabel
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"

part biosboot --fstype=biosboot --size=1
%include /tmp/include-parts

raid /boot --level=1 --device=md0 --fstype=ext4 raid.01 raid.02
raid pv.01 --level=1 --device=md1 raid.11 raid.12
volgroup VolGroup --pesize=32768 pv.01
logvol swap --fstype=swap --name=lv_swap --vgname=VolGroup --size=512
logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup --size=20000
logvol /storage --fstype=ext4 --name=lv_storage --vgname=VolGroup --size=1024 --grow

# Pre installation
%pre
#!/bin/bash
drive_size=$(cat /sys/class/block/sda/size)/2048
boot_size=500
lvmsize=$((drive_size - boot_size - 1 - 3))

cat >>/tmp/include-parts<<STOP
part raid.01 --size=$boot_size --ondisk=sda --asprimary
part raid.02 --size=$boot_size --ondisk=sdb --asprimary

part raid.11 --size=$lvmsize --ondisk=sda
part raid.12 --size=$lvmsize --ondisk=sdb
STOP
%end


# Packages --excludedocs --instLangs=en
%packages
@core
@base
%end

# Post section
%post

eject
%end

Comment 1 Brian Lane 2011-11-05 00:15:01 UTC
Please include all the /tmp/*log files as individual text/plain files.

Comment 2 Andrew Gillis 2011-11-07 14:06:26 UTC
Created attachment 532041 [details]
anaconda.log

Comment 3 Andrew Gillis 2011-11-07 14:06:52 UTC
Created attachment 532042 [details]
ifcfg.log

Comment 4 Andrew Gillis 2011-11-07 14:07:35 UTC
Created attachment 532043 [details]
program.log

Comment 5 Andrew Gillis 2011-11-07 14:08:03 UTC
Created attachment 532044 [details]
storage.log

Comment 6 Andrew Gillis 2011-11-07 14:08:50 UTC
Created attachment 532045 [details]
WpZvqV-ks.cfg

This is the kickstart file from /tmp

Comment 7 Andrew Gillis 2011-11-07 14:11:39 UTC
I added all the log files and the ks.cfg files from /tmp to this ticket. 

As an additional data point I also noticed that even if I don't use the include and just hard code everything I still get the same error if the drives already have a RAID partition on them. The system installs fine if the drives are blank.

I always get the error if I use and include file so this seems to be the best way to reproduce this error.

Comment 8 Brian Lane 2011-11-07 17:35:39 UTC
Could you also add syslog? Looks like it had trouble notifying the kernel about partition changes.

Comment 9 Andrew Gillis 2011-11-07 18:03:54 UTC
Created attachment 532104 [details]
syslog

Comment 10 Andrew Gillis 2011-11-07 18:04:48 UTC
OK I attached it.

Comment 11 Brian Lane 2011-11-07 18:13:01 UTC

*** This bug has been marked as a duplicate of bug 729640 ***


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