Building CHBMB's unraid-dvb builds in an unRAID VM

From unRAID
Jump to: navigation, search

Create an unRAID VM

Use Spaceinvader One's youtube instructions to create an unRAID VM within unRAID OR Use the script to create an image file, then create the VM

Use Spaceinvader One's youtube instructions to create an unRAID VM within unRAID


Automated image build

Image creation steps thanks to [2]

Run these commands in an unRAID terminal

#Download latest syslinux and unzip syslinux and mkdiskimage
cd /tmp
unzip bios/utils/mkdiskimage bios/linux/syslinux

#Download latest unraid and unzip to unraid dir
unzip -d /tmp/unraid

#Create image file, fat32 formatted
offset=$(/tmp/bios/utils/mkdiskimage -o -F -M unRAID.img 300 255 63)

#Can't find another way to set the partition name to UNRAID, so do it by formatting again

#First download and install dosfstools
wget -nc
wget "$slack_package_current_urlbase"$(grep "/dosfstools-[[:digit:]].*.txz$" FILE_LIST | cut -d . -f2-7)
installpkg $(grep "/dosfstools-[[:digit:]].*.txz$" FILE_LIST | cut -d / -f3)

#Create loop device for image to enable block mode write
loop=$(losetup --offset $((512*63)) --sizelimit $((512*610407)) --show --find unRAID.img)

#Now format and set label
mkfs.vfat $loop -n UNRAID

#Make bootable
/tmp/bios/linux/syslinux --offset $((512*63)) unRAID.img

#Mount image and copy unraid files to it
mkdir -p /tmp$loop
mount $loop /tmp$loop
cp -r /tmp/unraid/* /tmp$loop

#Unmount image and free loop device
umount /tmp$loop
losetup -d $loop


Change UUID. Icon from Spaceinvader One custom icons [3]

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
    <vmtemplate xmlns="unraid" name="Linux" icon="unraid.png" os="linux"/>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <vcpupin vcpu='0' cpuset='0'/>
    <type arch='x86_64' machine='pc-q35-3.0'>hvm</type>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='1' threads='1'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/isos/unRAID/unRAID.img'/>
      <target dev='hdc' bus='usb'/>
      <boot order='1'/>
      <address type='usb' bus='0' port='2'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    <interface type='bridge'>
      <mac address='52:54:00:cd:03:6e'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='' keymap='en-us'>
      <listen type='address' address=''/>

VNC into the unRAID VM to run CHBMB's unraid-dvb build scripts

Once connected via VNC to the unRAID VM, run these commands:

sed 's/mnt\/disk1/tmp/g' script | sed -E 's/rm(.*)\/\*/mkdir\1/g' > script
chmod +x script

Remove step from

Get CHBMB to remove that line from or do it manually


  • To do: modify .config in standard build to include customisations that CHBMB made in [4]
cd /tmp/dvb