Tuesday, November 20, 2012

specified unpartitioned disk sda in partition command

When getting this error message in a kickstart;
specified unpartitioned disk sda in partition command
Its possibly due to dmraid information still present on the disk from an earlier installation. Verify by running (press F2 after kickstart halts):
$ dmraid -r -D /dev/sda
You should get information about the disk being member of a raidset.

The inforamation can be stored in different locations on the harddrive, to my knowledge its commonly in the end though. If you dont want to consider this further, you can delete the entire disk by running;
$ dd if=/dev/zero of=/dev/sda
It will take some time as the entire disk is being written to. If you want to make a more surgical approach, just erase the last couple of sectors. First run fdisk;
$ fdisk -l
Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 byte
Then run the following command. Adapt the values for ”bs” and ”seek” to suit your actual harddrive. You get the values from the fdisk output above. In the below example, i’m deleting the last 10 sectors of the disk (91201 – 10 = 91191):
dd if=/dev/zero of=/dev/sda bs=8225280 seek=91191 count=1
Verify that the dmraid information is actually gone;
dmraid -r -D /dev/sda
The output should now be different from before, saying the disk is not a member. If so, you should be able to use it to kickstart on. 

No comments: