Bug 757106

Summary: kickstart "part" command doesn't work on unpartitioned disks
Product: [Fedora] Fedora Reporter: Jeremy Sanders <jeremy>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: anaconda-maint-list, ezyang, jonathan, rmj, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-30 14:15:47 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:
Attachments:
Description Flags
storage.log when using "part" with "--noformat"
none
anaconda.log when using "part" with "--noformat"
none
anaconda.log without noformat, giving error in formatting
none
storage.log without using --noformat none

Description Jeremy Sanders 2011-11-25 13:46:33 UTC
If you have a kickstart file which installs onto an iscsi device without partitions:

network xxxx
iscsiname iqn.2011-01.foo.bar:root.xs2
iscsi --ipaddr=131.111.68.133 
bootloader --location=none
part / --noformat --onpart /dev/disk/by-path/ip-xxx.xxx.xxx.xxx:3260-iscsi-iqn.2011-01.foo.bar:root.xs2-lun-1 --fstype ext4 --size 1 --grow --label=/
ignoredisk --only-use=/dev/disk/by-path/ip-xxx.xxx.xxx.xxx:3260-iscsi-iqn.2011-01.foo.bar:root.xs2-lun-1

This fails if you leave out the "--noformat", giving an exception saying that (in this case) /dev/sdb cannot be formatted.

I think this is because the mkfs.ext4 command doesn't like to run on disks, rather than partitions, and you have force it to do this.


If you use the "--noformat" option, the install fails trying to install a bootloader on line 951 in bootloader.py

self.stage1_device.isDisk

The exception is that a NoneType object doesn't have an isDisk attribute.

Comment 1 Edward Z. Yang 2011-11-26 09:27:48 UTC
Another workaround that doesn't actually work is adding a pre script to do the formatting; this fails because Anaconda will then check if the disk has a correct disklabel and not figure it out.

Comment 2 Chris Lumens 2011-11-29 14:38:25 UTC
Please attach /tmp/anaconda.log and /tmp/storage.log from your failed attempt to this bug report.

Comment 3 Jeremy Sanders 2011-11-30 10:20:30 UTC
Created attachment 538499 [details]
storage.log when using "part" with "--noformat"

Comment 4 Jeremy Sanders 2011-11-30 10:20:57 UTC
Created attachment 538500 [details]
anaconda.log when using "part" with "--noformat"

Comment 5 Jeremy Sanders 2011-11-30 10:26:02 UTC
Created attachment 538501 [details]
anaconda.log without noformat, giving error in formatting

Note that these were made with a virtual machine. The same errors were encountered with a real system.

Comment 6 Jeremy Sanders 2011-11-30 10:28:35 UTC
Created attachment 538503 [details]
storage.log without using --noformat

Comment 7 David Lehman 2011-11-30 14:15:47 UTC
Anaconda does not support formatting unpartitioned disks in any way other than by putting a partition table on them. If you insist on using filesystems on unpartitioned disks you will have to do the formatting in %pre.

Comment 8 Jeremy Sanders 2011-11-30 14:40:37 UTC
What about the second bug, where if you put --noformat you get a crash when it tries to install a bootloader, even if location is set to None (see attached log files). I think this is still a bug.

If the part commands on a root disk isn't supported (it would be pretty easy to support this by adding -f to the mkfs command line), wouldn't it be better to give a diagnostic error message?

The main reason why we're using unpartitioned iscsi devices is because you can't manipulate devices-inside-devices on the iscsi hosting target server, if you need to. Linux doesn't see partitions inside partitions. Also, it is very hard to get the system to boot using PXE because the root-path dhcp option doesn't support a partition number.

Comment 9 David Lehman 2011-11-30 15:20:15 UTC
Yeah, feel free to open a separate bug for that separate issue.

Comment 10 Edward Z. Yang 2011-11-30 21:21:53 UTC
OK, followed up at Bug 758878.