Ref.: Error installing CDS to hard drive (VM)

Hello everyone.

I’m currently trying to install CDS to a VM hard drive with the instructions provided in the documentation, but keep getting the same error.

cl-install -d /dev/sda2
Disk ’ ’ needs a partition table for the boot record. Use parameter --mbr

The device does have an MBR (grub), but even using the --mbr parameter does not work.

cl-install -d /dev/sda2 --mbr /dev/sda
Error in parameter --mbr. Disk ‘/dev/sda’ needs a partition table for the boot record.

Am I doing something wrong?

Thanks for your help

Please, show <<fdisk -l>>

I should’ve posted that in the original post; my bad.

Here’s the output for fdisk -l:

Disk /dev/vda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007e017

Device Boot Start End Blocks Id System
/dev/vda1 * 2048 499711 248832 83 Linux
/dev/vda2 499712 27762687 13631488 83 Linux
/dev/vda3 27762688 62914559 17575936 83 Linux

Disk /dev/vdb: 75.2 GB, 75161927680 bytes, 146800640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c4b6

Device Boot Start End Blocks Id System
/dev/vdb1 2048 41945087 20971520 83 Linux
/dev/vdb2 4195088 146800639 52427776 83 Linux

The actual command I’m running is:

cl-install -d /dev/vda2 -d /dev/vdb1:/home -d /dev/vdb2:/var/calculate --hostname host --ntp 192.168.0.1

and after I get the first error:

cl-install -d /dev/vda2 -d /dev/vdb1:/home -d /dev/vdb2:/var/calculate --hostname host --ntp 192.168.0.1 --mbr /dev/vda

… which, according to what I gathered from the documentation, should install CDS on /dev/vda2, ‘home’ partition on vdb1 and ‘/var/calculate’ on vdb2 (unless I got something wrong).

I’m running the latest CDS x86_64 version posted on the website (v11.13), on a KVM machine with a VirtIO HDD.

Please let me know if there’s any other information you need, as this error has me absolutely confused.

Thanks,

Edit: typo

Try run <> before <>.

Currently we don’t support installation on virtio-devices it will be implemented in next releases of calculate-utilities.

If you want to install now you can manually change files.

local ~ # cd /usr/lib/python2.7/site-packages/calculate/
local calculate # grep -rn ID_TYPE ./
./install/variables/disk.py:123:            if prop.get("ID_TYPE","")=="disk" and 
./lib/utils/device.py:97:    if prop.get('ID_TYPE',"") == "disk" and 
./lib/utils/device.py:259:    if prop.get('ID_TYPE',"") == "disk" and 

Try change <<ID_TYPE>> to <> in this files.

Than try to install:

cl-install -d /dev/vda2 -d /dev/vdb1:/home -d /dev/vdb2:/var/calculate --hostname host --ntp 192.168.0.1 --mbr /dev/vda

Or just run these commands first, before install:

sed -ie 's/ID_TYPE/DEVTYPE/g' /usr/lib/python2.7/site-packages/calculate/install/variables/disk.py
sed -ie 's/ID_TYPE/DEVTYPE/g' /usr/lib/python2.7/site-packages/calculate/lib/utils/device.py

P.S. Bump!