Bug 757106 - kickstart "part" command doesn't work on unpartitioned disks
Summary: kickstart "part" command doesn't work on unpartitioned disks
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-25 13:46 UTC by Jeremy Sanders
Modified: 2011-11-30 21:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-30 14:15:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
storage.log when using "part" with "--noformat" (38.27 KB, text/plain)
2011-11-30 10:20 UTC, Jeremy Sanders
no flags Details
anaconda.log when using "part" with "--noformat" (19.98 KB, text/plain)
2011-11-30 10:20 UTC, Jeremy Sanders
no flags Details
anaconda.log without noformat, giving error in formatting (8.46 KB, text/plain)
2011-11-30 10:26 UTC, Jeremy Sanders
no flags Details
storage.log without using --noformat (34.58 KB, text/plain)
2011-11-30 10:28 UTC, Jeremy Sanders
no flags Details

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.


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