Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Convert b6i to iso

Afte some Internet searching, I came across cdemu for GNU/Linux that can convert the files the way I want. I use Devuan Ceres (the unstable release), so I wanted to rebuild the packages for my exact libs.

So I used the OBS to build them: subproject cdemu. I had to borrow one hack that the Ubuntu team came up with, to suit the needs of systemd-free Devuan.

For my headless VM where I was running these tasks, I had to start a virtual X server. In a GNU screen:

Xvfb :1

In another screen, run:

export DISPLAY=:1
sudo modprobe vhba
sudo chmod 0666 /dev/vhba_ctl
cdemu-daemon &

The daemon insists on using X11, so I had to do it this way. But now you can use client commands. I loaded my .b6t file and then listed it to make sure it was available to my system.

cdemu load 0 /path/to/file.b6t
cdemu device-mapping

The output should resemble:

$ cdemu device-mapping
Device mapping:
DEV   SCSI CD-ROM     SCSI generic
0     /dev/sr1        /dev/sg2

And now you can mount the contents, and then write a new iso file.

sudo mount -v /dev/sr1 /mnt/cdrom
DISKLABEL="$( sudo file -s /dev/sr1 | awk -F\' '{print $2}' )" ; echo "${DISKLABEL}"
mkisofs -V "${DISKLABEL}" -J -rock -o ~/disc.iso /mnt/cdrom

Comments