The officially official Devuan Forum!

You are not logged in.

#1 2018-06-04 20:04:07

ks
Member
Registered: 2018-05-08
Posts: 25  

Hosted VPS server migration from debian to devuan hosed

I had to set up a small VPS server hosted in the UK on Friday. As the provider doesn't offer devuan I tried to start with a debian setup to be migrated to devuan following the instructions on
https://devuan.org/os/documentation/dev … e-to-ascii
starting at "Perform the migration" (commands above that section aren't relevant on a server).

Everything worked without a warning or error message until apt-get autoclean right at the end of the page describing how to migrate. Unfortunately after that the system didn't reboot when told to. I reinstalled debian thinking I might have made a mistake, but repeating the install the reboot to verify the system's readiness failed again. Because I had to complete the setup that day I then went and installed centos 6.9, the last release of that OS that hasn't been "poettering'ed" (w/o systemd).

But I dearly would like to get a hosted VPS running devuan and I'm sure others fell the same.

Question: not having the skills I don't know how to approach this. I know that the provider uses VMware, but apart from that I'm in the dark. Any takers?

Offline

#2 2018-06-05 07:22:21

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

If you have some kind of rescue mode one way would be to install Devuan in qemu to a raw image backed disk, compress that with your compression tool of choice and just dd it to the VPS disk in rescue mode. Qemu install could also be done on another server and/or piped to dd through ssh if the rescue system doesn't have enough disk/ram available to actually store the compressed disk image. Unless you have VNC access to your VPS make sure to have usable network settings in your image otherwise you'll have a system that boots but can't be reached.

Then there is the https://www.netboot.xyz/ approach where you dd the netboot iso (likely from rescue mode but some voodoo to be able to write to the disk from normal operation could be possible i think) to your VPS disk, reboot and install the OS of your choice. Only works if you have some kind of VNC access and last time i tried it Devuan install was broken though.

Edit: Forgot one method. Qemu in rescue mode: Either install qemu in the rescue system or if not possible download a statically linked qemu. Download a Devuan iso and run qemu with hard disk going straight to /dev/sdX (whatever your VPS harddisk is named in the rescue system), CDRom pointed to the Devuan iso, booting from CD and qemu's VNC server enabled (also KVM if it's available and you don't want the isntall to be stupidly slow). Connect with your favorite VNC client and install. When done you'll need to fix network settings as those of qemu surely don't match the ones used on your VPS. Word of caution about the VNC server: It's unencrypted so better bind to localhost and connect through a ssh tunnel if you value your security. If you are interested in this i guess could dig up a working qemu commandline but for now i am to lazy.

A final method which i haven't done in a long time (sorry if this isn't entirely correct) is to dd the ungzipped version of http://ftp.debian.org/debian/dists/stab … oot.img.gz to your VPS disk and then setup partitions so you have a partition large enough to hold a Devuan iso. Download a Devuan iso to said partition and boot. Again only works if you have VNC access.

Having said that i've also been successful with upgrading KVM and OpenVZ based VPS from Wheezy to Devuan Jessie. No idea about VMWare but i don't see why it wouldn't work there.

Also are you sure the system didn't boot at all? I am not sure if Debian Jessie uses the strange new naming scheme for network devices but if it does it might be that just the network config got screwed up but the system was still OK.

Even more edit: Thinking about this i wonder how feasible it would really be to actually overwrite an active disk with an image (or even debootstrap/qemu install to it). Like chroot to static busybox based root on ram disk, unmount disk, overwrite with image, mount disk, fix networking, reboot? This could be a brilliant script to get Devuan out to the hosting world for people that don't want to go through above mentioned methods.

Last edited by devuser (2018-06-05 07:56:22)

Offline

#3 2018-06-05 18:49:47

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

I totally agree that something is desperately needed to get devuan into the hosting world, because apart from Centos 6.9 --- which will only get security fixes for another year or two --- there's nothing without systemd that I know of. Once that's no longer available, we're stuffed.

I just had another look at the options available from this provider. "Rescue mode" is basically reinstalling the OS from a list of systems, of which only centos 6.9 is systemd-free. The best I can have is a simulated KVM (in the browser).

The problem I see is that I can't access any media other than what's on offer. The only way I can envisage some sort of progress is to reinstall the OS, this time via "KVM", which would then allow me to partition the "disk", boot the new OS, and then upload an iso image into one of the partitions. But how do you then boot from the uploaded iso on the partition?

And I can't see how to dd an image to the VPS disk when I'm sitting miles away from the server and have only the remote instance booted off the VPS disk. I've dd'd disks across the network via ssh many times. But in every case the system reading or writing raw data to or from disk was booted from a dvd (or another disk) with the paired system reading or writing the raw data to or from an ordinary file on a mounted disk.

Can't get my head around this at the moment.

Offline

#4 2018-06-05 19:29:33

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

I just had another look at the options available from this provider. "Rescue mode" is basically reinstalling the OS from a list of systems, of which only centos 6.9 is systemd-free.

That's sadly not going to be much help but i guess you knew that already. What i ment by "rescue mode" is kind of a live system often available at providers where you have access to your disk (usually to mount it and fix errors but nothing stopping you from dd'ing stuff to it).

ks wrote:

The best I can have is a simulated KVM (in the browser).

That's what i ment by VNC. Sorry for the confusion (terminology...). That's good to have as it opens up the possibility of running a real installer without having to resort to qemu.

ks wrote:

he problem I see is that I can't access any media other than what's on offer. The only way I can envisage some sort of progress is to reinstall the OS, this time via "KVM", which would then allow me to partition the "disk", boot the new OS, and then upload an iso image into one of the partitions. But how do you then boot from the uploaded iso on the partition?

Yeah, that's pretty much the problem. You usually do it by overwriting the disk (or at least the start of it) with whatever you want to boot and simply dd'ing an iso to /dev/sdX actually works but just dd'ing some installer iso to the disk is not going end well since you are going to overwrite the disk during install therby destroying your installer. The solution here is either using the iso from http://netboot.xyz or the hd-media image (with the actual interaller iso in a partition at the end of the disk that could by used as swap once the installation is finished) which both operate from ram.

ks wrote:

And I can't see how to dd an image to the VPS disk when I'm sitting miles away from the server

A bare minimum install is actually very small (at least after being gzipped) and it's not like you have to use a huge disk image. Just enough to fit the minimal install. You can enlarge the partition once it's on the target system. Also if upload speed is still a problem you could prepare the image on another server (with a fat pipe) using qemu.

ks wrote:

and have only the remote instance booted off the VPS disk. I've dd'd disks across the network via ssh many times. But in every case the system reading or writing raw data to or from disk was booted from a dvd (or another disk) with the paired system reading or writing the raw data to or from an ordinary file on a mounted disk.

True. That's exactly why a "rescue system" being available is so important for all these approaches. It takes the place of the live DVD to boot off. Without it it's at the very least going to be really tricky.

I've never tried to overwrite the disk a system was actually booted from and i am not convinced it'll work either but i think there might be a way. It's actually a fascinating idea. In theory all it should take is getting the system in a state where unmounting / becomes possible. A simple chroot to a ramdrive might not cut it since there is still tons of stuff accessing / but if that can be taken care of somehow what would stop one from actually unmounting the disk and writing to it? No promises but i am really tempted to try it. Would be quite balls if that worked big_smile

Edit time again: I vaguely remember grub being able to boot iso images. I am not familiar with that but if that works may have a chance to boot your iso from a partition. I'd just abuse swap for that. As in turn off swap, format the former swap partition to ext or whatever grub likes and put your iso there. Boot from KVM and instruct grub to go for the image. Might be an idea at least if what i remember reading about grub is accurate.

Last edited by devuser (2018-06-05 19:37:54)

Offline

#5 2018-06-05 19:44:42

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Hosted VPS server migration from debian to devuan hosed

This discussion is quite over my head but I would just like to add that this very forum started out on a VPS with Debian 8 upgraded to Devuan Jessie so I know it can be done.  But I guess not all VPS are created equal and I assume that you're trying to upgrade from Stretch to ASCII not Jessie.  One thing that caught my eye was apt-get autoclean which triggered a memory of someone having trouble with that.  Poke around the forum and DNG mail list for references to "autoclean" and you might get some clues.  Also, the stable release is very, very soon so you might try again with the stable iso which may fix that glitch.  Unfortunately, I can't help beyond that.  (I'm the one who plays with the crayons.)

Offline

#6 2018-06-06 14:28:40

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

@golinux:

Your post ("started out on a VPS with Debian 8 upgraded to Devuan Jessie ") made me remember that I've seen "somewhere" a post explaining how to covert debian 8 from systemd to to sysVinit, and one of the OSs on offer at the hoster is debian jessie (which I think is 8, I'm no good with names, numbers lend themselves more to chronological order).

@devuser:

I'm leaning to the conclusion that it might probably be more efficient to just order another VPS instance at the provider, install debian 8, and apply the conversion therapy I've seen somewhere. If this works, and at the moment I wouldn't bet on it, next thing I'm (or somebody else? (*)) should do, is disable as many daemons as possible on this new VPS instance as possible (to reduce the number of disk writes during copying), then dd|scp the complete thing somewhere home to try it on an old PC, where one at least sees where the smoke is coming out.

Should this work, the actual conversion to devuan could be performed (fine tuned, aren't I hopeful?) on this PC, with ample documentation to allow remote re-runs.

Everything else is both too error prone and, due to the time a remote re-installation takes, too slow.

(*) "or somebody else": I'm willing to order the VPS and hand the credentials to someone else for the surgery, as long as the outcome is made available to anybody who needs it. Maybe other kind souls could do the same for VPSs [or dedicated servers] at other providers?

@golinux:

As you mention "crayons" in your post I have to have a word with you wink. I'm 67, with cataract on the horizon. In fact I've had poor eye sight for more than 25 years and it's getting worse each time I have a checkup, resulting in new glasses.

Although dev1galaxy.org is ok, I find it _very_ difficult to use devuan.org,  especially in the evening. Worst of all are links I've visited before [a:visited] --- I simply don't see them without turning style sheets off. Don't forget the baby boomers are all old farts now. Contrast is the best fix for that, some countries even have minimum requirements for contrast. Please (!) try to look into that.

Offline

#7 2018-06-06 15:14:59

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

next thing I'm (or somebody else? (*)) should do, is disable as many daemons as possible on this new VPS instance as possible (to reduce the number of disk writes during copying), then dd|scp the complete thing somewhere home to try it on an old PC, where one at least sees where the smoke is coming out.

Should this work, the actual conversion to devuan could be performed (fine tuned, aren't I hopeful?) on this PC, with ample documentation to allow remote re-runs.

Everything else is both too error prone and, due to the time a remote re-installation takes, too slow.

(*) "or somebody else": I'm willing to order the VPS and hand the credentials to someone else for the surgery, as long as the outcome is made available to anybody who needs it. Maybe other kind souls could do the same for VPSs [or dedicated servers] at other providers?

The usual approaches aren't that bad or time consuming actually once you get used to it even if they aren't anything i'd call overly user friendly. The real problem is without a rescue system to act as a live CD you are screwed. Anyways, no need to buy anything. This whole thing got me curious. I've already spun up a test VM. Also searching around suggests that this is very well possible and actually being done. I'll report back once i have something worth trying.

Last edited by devuser (2018-06-06 15:15:33)

Offline

#8 2018-06-06 17:11:35

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

@golinux:

Your post ("started out on a VPS with Debian 8 upgraded to Devuan Jessie ") made me remember that I've seen "somewhere" a post explaining how to covert debian 8 from systemd to to sysVinit, and one of the OSs on offer at the hoster is debian jessie (which I think is 8, I'm no good with names, numbers lend themselves more to chronological order).

I thought it was always advised to go to sysvinit on debian before transitioning to devuan.

ks wrote:

@golinux: As you mention "crayons" in your post I have to have a word with you wink. I'm 67, with cataract on the horizon. In fact I've had poor eye sight for more than 25 years and it's getting worse each time I have a checkup, resulting in new glasses.

Although dev1galaxy.org is ok, I find it _very_ difficult to use devuan.org,  especially in the evening. Worst of all are links I've visited before [a:visited] --- I simply don't see them without turning style sheets off. Don't forget the baby boomers are all old farts now. Contrast is the best fix for that, some countries even have minimum requirements for contrast. Please (!) try to look into that.

I can sympathize.  I've got about 10 years on you and also have cataracts.  When this site was first created we did test for usability, and they passed the various standards.  The link colors in this second iteration have even more contrast so I'm surprised to hear that you're still having problems.  The browser that you're using may have an addon to fix things like that.  I have tweaked many websites with Stylish or userChrome or even nosquint to change link and other colors to suit me.   I also reduce monitor brightness with xrandr to 65%.  And some sites require that I bold the font or increase size.

Offline

#9 2018-06-06 21:51:17

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

OK, before i call it a day here is a bit of something. It's quite raw i know and i have little hope in the overall stability but at least it's a start. Couple of things: It assumes there is systemd running (kinda ironic isn't it?) as for now i've tested it using Debian Jessie. Adjusting for SysV is probably quite easy but i don't think it would run as is on an old kernel like the one CentOS 6.9 uses so that'll take a bit of work. Also the script needs to be exec'd to work and i don't really know why so this needs some investigation i guess. Anyways here is the abomination:

#!/bin/sh

_err() {
	echo "ERROR: $1." >&2
	exit 1
}

_try() {
	"$@" || _err "$* failed"
}

_cleanup() {
	mountpoint -q /mnt || return
	cd /mnt || return
	for MNT in tmp proc sys dev /sbin/init; do
		mountpoint -q $MNT && umount -lf $MNT
	done
	cd ..
	umount -lf mnt
}

trap _cleanup EXIT

_try mount -t tmpfs tmpfs /mnt
_try cd /mnt
_try mkdir -p bin sbin usr/bin usr/sbin dev sys proc tmp etc old

_try wget -O bin/busybox \
	https://busybox.net/downloads/binaries/1.28.1-defconfig-multiarch/busybox-x86_64
_try chmod +x bin/busybox
for CMD in $( bin/busybox --list-long ); do
	_try ln -s /bin/busybox "$CMD"
done
_try mount -t tmpfs tmpfs tmp
_try mount -t proc proc proc
_try mount -t sysfs sysfs sys
_try mount -t devtmpfs devtmpfs dev
_try mount -t devpts devpts dev/pts
_try ln -s /proc/mounts etc/mtab

_try wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso

TTY="/dev/tty8"

cat > init <<___
#!/mnt/bin/busybox sh
cd /mnt
exec < ".$TTY" > ".$TTY" 2> ".$TTY"
mount --make-rprivate /
pivot_root . old
exec bin/busybox chroot . bin/busybox sh install
___
_try chmod +x init
_try mount --bind init /sbin/init

cat > install <<___
_boot() {
	echo s > /proc/sysrq-trigger
	echo b > /proc/sysrq-trigger
}
_err() {
	echo "ERROR: \$1." >&2
	echo 'waiting 60 seconds until reboot...'
	sleep 60
	_boot
}
_try() {
	"\$@" || _err "\$* failed"
}
for PID in \$( ps ax -o pid= ); do
	[ \$PID = 1 ] && continue
	kill -9 \$PID
done
for FD in /proc/1/fd/*; do
	readlink -f \$FD | grep -q ^/dev/tty || eval "exec \$( basename \$FD )> /dev/null"
done
_try umount -lf /old/dev
for MNT in \$( sed 's/^[^ ]* \\([^ ]*\\) .*/\\1/' /proc/mounts | grep ^/old | sort -r ); do
	_try umount \$MNT
done
_try dd if=netboot.xyz.iso of=/dev/sda bs=1M
echo SUCCESS!
echo 'waiting 30 seconds until reboot...'
sleep 30
_boot
___

echo "switching to $TTY..."
exec < ".$TTY" > ".$TTY" 2> ".$TTY"
systemctl daemon-reexec

save as dinst.sh then

chmod +x dinst.sh
exec ./dinst.sh

and switch to KVM (or just do the whole thing over KVM, didn't try doing it over SSH yet).

Good luck. I am planning to debug and improve it a bit further (including directly installing Devuan without going trough netboot and maybe also qemu based install for servers without KVM) but for today i've seen enough kernel panics wink

Last edited by devuser (2018-06-06 22:29:14)

Offline

#10 2018-06-07 15:54:23

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

OMG you're fast. I'll try very hard to set up a debian jessie system on Saturday and run your script on that. Fingers crossed wink

Offline

#11 2018-06-08 20:54:14

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

Tiny update: I cleaned the script up a bit and setup a repo at https://chiselapp.com/user/du/repository/voodoo-install. Current tarball is available at https://chiselapp.com/user/du/repositor … all.tar.gz.

The script now doesn't need to be uploaded to the server anymore. It's simply run on the client and does it's job using the provided IP and SSH credentials. Only drawback is it now needs netcat to be installed on both the client and the target (not entirely sure how common that is). Usage is as follows:

./install.sh [SERVER-IP] [SSH-PORT] [USERNAME]

In my tests it was quite reliable in working against a Debian Jessie VM (still didn't try anything else though). I am kinda excited to see if this will actually work in the wild too smile

Last edited by devuser (2018-06-08 22:05:17)

Offline

#12 2018-06-11 13:28:24

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

I wanted to try three different approaches to migrate from a debian installation to devuan on Saturday. All were based on debian 8.10:

1) remove systemd (see http://without-systemd.org/wiki/index.p … tallation), clear up, reboot, finally migrate to ascii

2) straight migration to ascii (https://devuan.org/os/documentation/dev … e-to-ascii)

3) following the script posted in this thread by devuser.

I only managed the first two because of some previous engagements I'd forgotten about. But they were enough to point me into the right direction (I hope).

As it was both after the first and second attempt I couldn't log in from my desktop because sshd was neither listening nor installed. After the first trial run I though I might have forgotten to tick the box in the installer (but then I wouldn't have been able to do the migration through an ssh login). So when I installed debian for the second time I made sure I selected sshd server.

Again sshd was gone after the migration. I repeated "pass two" and lo and behold the sshd daemon is really eradicated by apt-get purge libsystemd0:

root@bf:/home/klaus# apt-get purge libsystemd0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  docutils-common docutils-doc keyutils libalgorithm-c3-perl libarchive-extract-perl
  libasprintf0c2 libb-hooks-endofscope-perl libbind9-90 libclass-c3-perl libclass-c3-xs-perl
  libclass-method-modifiers-perl libclass-xsaccessor-perl libcpan-changes-perl libcpan-meta-perl
  libdata-optlist-perl libdata-perl-perl libdata-section-perl libdevel-caller-perl
  libdevel-globaldestruction-perl libdevel-lexalias-perl libdns100 libevent-2.0-5
  libexporter-tiny-perl libfile-slurp-perl libgetopt-long-descriptive-perl libimport-into-perl
  libintl-perl libintl-xs-perl libio-stringy-perl libisc95 libisccc90 libisccfg90 libjasper1
  liblcms2-2 liblist-moreutils-perl liblog-message-perl liblog-message-simple-perl liblwres90
  libmodule-build-perl libmodule-implementation-perl libmodule-load-conditional-perl
  libmodule-pluggable-perl libmodule-runtime-perl libmodule-signature-perl libmoo-perl
  libmoox-handlesvia-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl
  libnfsidmap2 libnuma1 libpackage-constants-perl libpackage-stash-perl libpackage-stash-xs-perl
  libpadwalker-perl libpaper-utils libpaper1 libparams-classify-perl libparams-util-perl
  libparams-validate-perl libpath-tiny-perl libperl4-corelibs-perl libpng12-0 libpod-latex-perl
  libpod-markdown-perl libpod-readme-perl libpth20 libregexp-common-perl librole-tiny-perl
  libsoftware-license-perl libstrictures-perl libsub-exporter-perl
  libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libterm-ui-perl
  libtext-soundex-perl libtext-template-perl libtirpc1 libtry-tiny-perl libtype-tiny-perl
  libtype-tiny-xs-perl libunicode-utf8-perl libuuid-perl libvariable-magic-perl libwebp5
  libwebp6 libwebpdemux1 libwebpdemux2 libwebpmux1 libwebpmux2 libwrap0 libxapian22
  openssh-sftp-server python-defusedxml python-docutils python-pil python-pygments python-roman
  python-soappy python-wstools tcpd
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  irqbalance* libsystemd0* nfs-common* openssh-server* rpcbind* task-ssh-server*
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 2,589 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 43895 files and directories currently installed.)
Removing irqbalance (1.1.0-2.3) ...
[ ok ] Stopping SMP IRQ Balancer: irqbalance.
Removing nfs-common (1:1.3.4-2.1) ...
[ ok ] Stopping NFS common utilities: idmapd statd.
Removing rpcbind (0.2.3-0.6) ...
[ ok ] Stopping RPC port mapper daemon: rpcbind.
Removing task-ssh-server (3.39+devuan1.9) ...
Removing openssh-server (1:7.4p1-10+deb9u3) ...
[ ok ] Stopping OpenBSD Secure Shell server: sshd.
Removing libsystemd0:amd64 (232-25+deb9u3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db (2.7.6.1-2) ...
(Reading database ... 43779 files and directories currently installed.)
Purging configuration files for nfs-common (1:1.3.4-2.1) ...
dpkg-statoverride: warning: no override present
Purging configuration files for openssh-server (1:7.4p1-10+deb9u3) ...
Purging configuration files for irqbalance (1.1.0-2.3) ...
Purging configuration files for rpcbind (0.2.3-0.6) ...

This is not particularly useful if you only have ssh to get into a system and don't use (or as in my case don't want to use, because php) access to one of the panels like cpanel. I'm quite confident at the moment that that's what prevented me from logging into the VPS after migration and final reboot to check eveything works. I will try to verify this within a week or two.

I'll also play with devuser's script and report back once I've had a chance.

Offline

#13 2018-06-16 16:06:12

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

Well, that didn't go as planned. The hoster I'm using for this project uses cloud-it http://cloudinit.readthedocs.io/en/latest/ to setup and manage VPS instances. Cloud-it occupies many config files, scripts and four inits and, when running debian, depends on systemd (which is gone after the migration).

I was really hopeful that once ssh is reinstalled after the migration from debian to devuan that was all that would be required - shows you how blue-eyed I can be.

Switching to the KVM at least enables you to watch the VPS in a reboot loop, no chance of entering anything there.

As I have a VPS running centos 6.9 (pre-systemd) at this particular hoster I could pull off the "cloud-ed" files from there and make them available to someone, so one could - with lots of luck - replace the systemd base cloud-it files for those from centos, although I'm not sure that would be easy or even stable long term.

Not sure how to get VPS hosters to add devuan to their list of OSs provided. Maybe the only solution is to use dedicated servers that have un-poettering'ed OS support and run, if needed, multiple web sites on such a server although I prefer to separate things if they're not totally under my control. Ah, well...

Offline

#14 2018-06-16 16:32:36

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

Well, that didn't go as planned. The hoster I'm using for this project uses cloud-it http://cloudinit.readthedocs.io/en/latest/ to setup and manage VPS instances. Cloud-it occupies many config files, scripts and four inits and, when running debian, depends on systemd (which is gone after the migration).

To be brutally honest i'd look for another hoster. That seems absolutely awful. The virtualization environment needing access to the running system let alone having to run custom services on it is not something one can reasonably expect and a setup like this would have me cancel the second i found out about it.

ks wrote:

Not sure how to get VPS hosters to add devuan to their list of OSs provided. Maybe the only solution is to use dedicated servers that have un-poettering'ed OS support and run, if needed, multiple web sites on such a server although I prefer to separate things if they're not totally under my control. Ah, well...

Well, it's going to need some lobby work. On the other hand i've used successfully pretty much all of the described approaches on lots of different providers for either dedis or VPS. As weird as most of them seem they are actually pretty commonly used in the wild to install unsupported OSes. A setup like you described above that depends on stuff running on the virtualized system is really really uncommon.

Offline

#15 2018-06-16 17:02:08

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Hosted VPS server migration from debian to devuan hosed

Have you asked for a refund?

Offline

#16 2018-06-16 17:44:13

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

golinux wrote:

Have you asked for a refund?

Yeah though about this too but then it seems he has already used the service with other OSs and i have a feeling the host will argue they don't support anything not listed in their panel. Still a full virtualization environment that relies on code running on the guest is a pretty sad thing and i'd let the host know quite well what i think of it. These days it's not even all that uncommon to be able to just use a custom ISO for installing. In any case i agree this is really borderline to being a broken product in my opinion.

Last edited by devuser (2018-06-16 17:46:07)

Offline

#17 2018-06-16 20:07:38

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

@devuser:

Yes of course I'm looking for a different hoster for other projects. What I liked about the current hoster is their unlimited data transfer, and the project I installed there last week (or was it the week before) currently using centos does need a big pipe.

This afternoon I found someone using OpenVZ and just tried one of their VPS - worked as you yourself said. And if I find the time next week I'm going to try a VPS hosted at fasthosts.

@golinux:

They offer a money back guarantee with every contract. After I failed earlier I cancelled the new contract I made at lunch time using their web form, so no sweat.

But perhaps it's not so bad an idea if you build a list of hosters where devuan is either a clickable option or can be migrated to, even if it's only maintained until people get tired of poettering about and demand systemd-free hosting.

Offline

#18 2018-06-16 20:55:57

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

Yes of course I'm looking for a different hoster for other projects. What I liked about the current hoster is their unlimited data transfer, and the project I installed there last week (or was it the week before) currently using centos does need a big pipe.

Well, unmetered (unlimited - sorry to be a smartass - doesn't exist as noone has unlimited resources) is often quite hit and miss. You have to keep in mind that (at least in europe) a dedicated gbit is at least about $150/m - if you buy bulk (10gbit upwards) and this being absolute bargain pricing the connectivity will not be anything to write home about. Compare this to whatever you are paying and do the maths by what factor the provider needs to oversell the bandwidth to make any kind of profit if everybody tried maxing their port. Not saying this is anything outrageous (it's quite normal business practice and it can work out if you have enough people not trying to use 100%) but often you get more of what you actually pay for by going with a metered deal instead of competing for an overbooked port with x other people.

ks wrote:

This afternoon I found someone using OpenVZ and just tried one of their VPS - worked as you yourself said. And if I find the time next week I'm going to try a VPS hosted at fasthosts.

Yeah, OpenVZ seems to not cause any problems. I've canceled my last OpenVZ VM before Ascii became RC but i guess it won't behave much different than Jessie. Word of caution though: OpenVZ is not full virtualization like VMWare or KVM (that's the reason btw i tend to use VNC for virtual consoles - KVM is confusing as it's also the name of a virtualization technology) and it's quite old (there is a new version but most providers haven't migrated yet - even if the commonly used version is about to EOL). You will be stuck with a (heavily patched) 2.6 kernel which you can't upgrade (whatever kernel your OS installs will be ignored) and you can't load kernel modules. Tun/tap is usually available but even fuse is already pretty rare. Imo you'd be better of to go for KVM virtualization. It's almost equally cheap these days.

ks wrote:

But perhaps it's not so bad an idea if you build a list of hosters where devuan is either a clickable option or can be migrated to, even if it's only maintained until people get tired of poettering about and demand systemd-free hosting.

I know this is not directed at me but i'll answer anyways. I haven't seen a single hoster that actually offers Devuan templates yet. I've tried a bit of lobbying here or there but so far no luck. The easiest more widespread approach would be hosters that allow custom ISOs. VMHaus (no personal experience but they are generally well liked) comes to mind and i've heard reports of Hetzners cloud offering also having a custom ISO option (could verify this if there is interest - i just have a couple normal VPS and dedis with them but as their cloud is billed hourly it would costs cents to try).

Last edited by devuser (2018-06-16 21:07:45)

Offline

#19 2018-06-16 21:15:07

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

But perhaps it's not so bad an idea if you build a list of hosters where devuan is either a clickable option or can be migrated to, even if it's only maintained until people get tired of poettering about and demand systemd-free hosting.

devuser wrote:

. . . I haven't seen a single hoster that actually offers Devuan templates yet. I've tried a bit of lobbying here or there but so far no luck.

Two options were included in the ASCII stable announcement.  That info is posted in two places on the devuan.org website.

https://devuan.org/os/debian-fork/ascii … nce-060818
https://devuan.org/os/install

AWS used to have a devuan image available.  Perhaps one of you could confirm.  As to Hetzner . . . according to one of our devs:

<DocScrutinizer05> >>Hetzner which are offering Devuan<< hmm? I just checked, seems they can't find "devuan" even in their support pages
<DocScrutinizer05> of course you can install your own OS with Hetzner
<DocScrutinizer05> if Hetzner actually has any support for devuan beyond that generic "BYOOS", it's prolly quite worth elaborting about it in devuan's publications, since on Hetzner it's unknown
<DocScrutinizer05> https://github.com/hetzneronline/installimage
<Irrwahn> DocScrutinizer05: You are correct, Hetzner does not provide a Devuan install image. For our Finnish Maid we had to go the Debian -> Devuan route just recently.

Offline

#20 2018-06-16 21:34:50

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

golinux wrote:
ks wrote:

But perhaps it's not so bad an idea if you build a list of hosters where devuan is either a clickable option or can be migrated to, even if it's only maintained until people get tired of poettering about and demand systemd-free hosting.

devuser wrote:

. . . I haven't seen a single hoster that actually offers Devuan templates yet. I've tried a bit of lobbying here or there but so far no luck.

Two options were included in the ASCII stable announcement.  That info is posted in two places on the devuan.org website.

https://devuan.org/os/debian-fork/ascii … nce-060818
https://devuan.org/os/install

Ouch. Should have remembered that.

golinux wrote:

As to Hetzner . . . according to one of our devs:

<DocScrutinizer05> >>Hetzner which are offering Devuan<< hmm? I just checked, seems they can't find "devuan" even in their support pages
<DocScrutinizer05> of course you can install your own OS with Hetzner
<DocScrutinizer05> if Hetzner actually has any support for devuan beyond that generic "BYOOS", it's prolly quite worth elaborting about it in devuan's publications, since on Hetzner it's unknown
<DocScrutinizer05> https://github.com/hetzneronline/installimage
<Irrwahn> DocScrutinizer05: You are correct, Hetzner does not provide a Devuan install image. For our Finnish Maid we had to go the Debian -> Devuan route just recently.

Yeah, Hetzner has no official support. At least not on the normal VPS/dedis and is imo unlikely to add it (my servers all run voodoo'd Devuan installs) but their cloud VPS seem to be able to install from a user supplied ISO. At least i had a friend tell me he had installed Devuan on it and he is not the guy to go through the voodoo steps. I was like: "Nice. How did you do it?" and he replied "I selected custom ISO".

Edit: Hmm now i am getting curious. Might check this out tommorow. Maybe there actually is something that lets you directly select Devuan? I'd be seriously surprised but who knows? That'd be massive. Hetzner is damn huge.

Last edited by devuser (2018-06-16 21:40:27)

Offline

#21 2018-06-17 07:37:58

ks
Member
Registered: 2018-05-08
Posts: 25  

Re: Hosted VPS server migration from debian to devuan hosed

Just had a look at Hetzner's pages, and their FAQ, because the pretty pages don't really say much. Immediately tripped over:

How can I access the server I rebuilt? ... a new root-password for server1 will be generated and mailed to you. It will be set on first boot using the cloud-init mechanism.

That's that then ;(

Last edited by ks (2018-06-17 07:39:18)

Offline

#22 2018-06-17 10:03:08

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

ks wrote:

How can I access the server I rebuilt? ... a new root-password for server1 will be generated and mailed to you. It will be set on first boot using the cloud-init mechanism.

If custom ISOs are supported i wouldn't think this to be relevant in this case but i'll have a try later. Let's see how it goes.

Edit: Hetzners cloud indeed offers a direct option to select a Devuan (Jessie, netinstall) ISO for setup. Will post some pictures once i have a working VM.

Last edited by devuser (2018-06-17 10:50:54)

Offline

#23 2018-06-17 13:27:36

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

OK, so after working my way through the setup here is a couple of screenshots (sorry about those being in german - i don't know how to switch the panel to english but there is an international version i am sure) and some notes:

After creating the VM which allows just a handful of operating systems (i choose Debian 9 but i don't think it matters) you have something like this:

2dbulxx.png

If you click the servername there you'll get an overview like this:

2462aa0.png

From there you select 'Power':

2lvigwi.png

and shut the VM down (it's labeled 'Herunterfahren' here) but i guess since we don't care about a clean shutdown 'Power Off' would equally work. Now you can select ISO-Images and mount ('Einbinden') Devuan Jessie netinst (it's even on the first page, nice!):

4ggims.png

Now turn the VM on again (using 'Power') and and go to the server menu to launch the web console (labeled 'Konsole' here):

2r4srad.png

You should be greeted by the Devuan installer asking to select graphical or text install. I choose text which likely doesn't matter again but as the installation has some quirks it might be the better option. Speaking of quirks, this is what i encountered during the actual installation:

After detecting the network the installer complains about not being able to detect the default gateway. This can be easily fixed by following the instructions in Hetzners wiki at https://wiki.hetzner.de/index.php/Cloud … Gateway/en. Basically you hit ALT + cursor right to get to a shell then enter the following commands:

ip r ad 172.31.1.1 dev eth0
ip r ad default via 172.31.1.1

To switch back use ALT + cursor left. Choose to continue without the gateway (not really true since we have just configured it). The setup then asks for a nameserver which can be found at https://wiki.hetzner.de/index.php/Hetzn … _Server/en. I've just used the first one.

When it came to selecting a HTTP mirror there was something i am not entirely sure about: When i tried to select a mirror from the list neither the localized URL nor auto.mirror.devuan.org seemed to work so i choose manual selection and entered deb.devuan.org for the address and /merged/ for the directory which worked fine.

One final problem that had me stuck for a bit was then when trying to install software the installer would fail with a huge message on a red screen. Trying around a bit it came down to the installer having problems with authenticating packages (outdated ISO?) and it's possible to fix this by again switching to a terminal (ALT + cursor right) and running the following commands:

chroot /target apt-get -y --force-yes devuan-keyring
chroot /target apt-get update

After that you can just hit OK on the error message and retry the software installation step.

When the installer is finsihed you have to unmount the ISO:

2w6ywqo.png

The huge orange box at the top basically says "You have an ISO mounted" and the link at the end allows you to unmount it. I am quite sure you could archive the same using the ISO-Images menu entry also though.

At this point your Devuan VM is ready to go. I found IPv6 wasn't configured but i guess it's easy to fix that by following the post installation instrcutions at https://wiki.hetzner.de/index.php/Cloud … Gateway/en.

That's it. I hope it's somewhat useful. Wonder when Hetzner will add an Ascii ISO though. I am not using any cloud instances otherwise i'd pester the support about it. Guess they'll sooner or later add it anyways given they allready have Jessie.

Last edited by devuser (2018-06-17 15:45:19)

Offline

#24 2018-06-17 15:07:42

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Hosted VPS server migration from debian to devuan hosed

@devuser . . . That's fantastic news!  The process is a bit daunting though - not for the faint-hearted.  I should probably add Hetzner to the list and include a link to your post above.  Could you possibly contact them requesting either an update to or addition of the ASCII iso?

Offline

#25 2018-06-17 15:23:56

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Hosted VPS server migration from debian to devuan hosed

golinux wrote:

@devuser . . . That's fantastic news!  The process is a bit daunting though - not for the faint-hearted.  I should probably add Hetzner to the list and include a link to your post above.  Could you possibly contact them requesting either an update to or addition of the ASCII iso?

Well, tbh i have a bit of an aversion to making support requests for stuff i don't actively use but i figure i'll probably want to move my legacy VPS to their cloud at some point so i guess that justifies it. I'll write them later. It's probably not going to get answered during the weekend anyways.

Offline

Board footer