Windows: Hard time building Rockstor’s “Built on openSUSE” installer

I’m a new user and checking if (the future of) Rockstor meets my requirements, so I decided to try the new Rockstor 4 version Built on openSUSE. I wanted to share my experience because I had a rough time building the installer.

It took me a while before I realized there’s no installer (yet). I wasn’t expecting this (even for a beta). So I searched on sourceforge (arrived there via the Download page on the website) for a v4.x ISO but couldn’t find any. Maybe there could be a note (in bold/capitals) inside the readme on /rockstor/files/4.x that says “THERE’S NO INSTALLER YET, BUILD IT YOURSELF HERE: link”.

On the Rockstor website I found the howto “Rockstor’s “Built on openSUSE” installer - Beta release” at rockstor.com/docs/installer-howto/installer-howto.html. But this only walks you through the trivial part of the installation (after the ISO has already been built). There’s no link to GitHub - rockstor/rockstor-installer: The kiwi-ng configuration used to create Rockstor 4 'Built on openSUSE' installers.. Which is where you need to be to build the installer.

I know it’s a beta a.t.m. and the “Rockstor 4 Installer Recipe - call for beta testers” forum post explains it all. But the other places (download page, docs) are easier to find. I think a few extra notes would help here.

But the actual trouble started when I tried to build the installer on Windows.

I already had Windows Subsystem for Linux (WSL2) setup, so I just downloaded openSUSE Leap 15.2 from the Microsoft Store. But building the installer kept failing due to missing packages. When it failed because of a missing package, I installed the missing package and then re-tried building. Eventually I gave up as I had no idea how many times I’d have to repeat this process. In hindsight I was probably almost there. In this post I found the additional packages the process depends on: https://forum.rockstor.com/t/problem-building-rockstor-4-with-vagrant/7639/19: qemu-tools, gptfdisk, e2fsprogs, squashfs, xorriso.

Then I tried to use a OpenSUSE live CD in VirtualBox. But this didn’t work because of current WSL2 and VirtualBox incompatibility. Then I tried the Vagrant build method (which is a bit hidden on the Github page). Because this also depends on VirtualBox I had to disable all WSL related options in Windows Features and reboot. Then Vagrant gave me the “Wrong user error”. Fixed that. Then the shared folders weren’t mounted. I had to set them up manually in VirtualBox (and not run vagrant up afterwards anymore). Then I could connect with vagrant ssh while the VM was started manually from VirtualBox. Next I had to run sed -i -e ‘s/\r$//’ on ./run_kiwi.sh to fix a “/bin/bash^M: bad interpreter: No such file or directory” error. But these errors kept coming back on other files: KiwiScriptFailed: config.sh failed: chroot: failed to run command ‘image/config.sh’: No such file or directory. So then I decided just to follow the steps on the Github page.

I ran these commands as root user in some folder within the VM:

git clone https://github.com/rockstor/rockstor-installer.git
cd rockstor-installer/
kiwi-ng --profile=Leap15.2.x86_64 --type oem system build --description ./ --target-dir /home/kiwi-images/

This finally worked and I could manually move the iso to the shared folder and then I could access it on Windows.

What a ride :laughing:

I was able to successfully install Rockstor in a VM and I’m now evaluating if it will work in my scenario. So far I think it’s really nice!

I tried one more time to build with openSUSE on WSL with the packages qemu-tools, gptfdisk, e2fsprogs, squashfs, xorriso installed. This time it completes making the .raw file but it fails after “Creating bios image”.

[ ERROR   ]: 14:19:42 | KiwiBootLoaderGrubDataError: grub path i386-pc not found in ['/usr/share/grub2/i386-pc', '/usr/lib/grub2/i386-pc', '/usr/share/grub/i386-pc', '/usr/lib/grub/i386-pc']
[ INFO    ]: 14:19:42 | Cleaning up FileSystemSquashFs instance
[ INFO    ]: 14:19:42 | Cleaning up BootLoaderConfigGrub2 instance
[ INFO    ]: 14:19:42 | Cleaning up InstallImageBuilder instance

So in conclusion I think the easiest way for anyone on Windows is to just disable WSL (if enabled), install openSUSE in VirtualBox and build from there.

Or maybe this approach using Docker? I didn’t try this myself.

1 Like

@Jip-Hop Hello again.

and

Yes, too right. Fancy making a GitHub issue for this in our docs repo:

Unfortunately I’ve not yet moved the main web page ‘source’ to a repo yet. In the throws of moving over to Hugo (GitHub - gohugoio/hugo: The world’s fastest framework for building websites.) to make things easier re community involvement which I was keen to setup. Oh well, it’s on the long list of things to do.

Yes these do have the minimum dependencies, hence sticking to this ‘core’ kiwi-ng only method as our official one. The Vagrant method simply has too many more moving parts to be easy to maintain but has served a few folks to data so it’s nice to have it there. But it has already broken once or twice and is currently in a slight state of flux re the base image it uses. But progress is being made on this method so I’m keen to keep it in the repo given it’s helps some folks already.

I know. We do hope to move to the embeded vm method mentioned in the readme but we have, as yet, had not contributions towards that and I’ve had my hands full for a while now with the rest of the re-release by way of 4. At least that way it should work on most linux instances and so remove the hard and fast requirement for Leap 15.2. But it would also slow up the process by adding yet another virtualisation layer. Bit by Bit.

Thanks for sharing your findings. Much appreciated.

Still early days re this DIY installer builder but getting better all the time. And I’m chuffed that folks are getting engaged with it as it’s a key facility that is often overlooked by distros / appliances. I like how all the pending updates are pre-rolled into the image. Great for post Gold release fixes.

2 Likes