Porteus on Vultr VPS? [Solved]

Post here if you are a new Porteus member and you're looking for some help.
chessnut
Ronin
Ronin
Posts: 3
Joined: 23 Aug 2015, 01:14
Distribution: Porteus-MATE-v3.1-x86_64
Location: USA

Porteus on Vultr VPS? [Solved]

Post#1 by chessnut » 23 Aug 2015, 03:02

Hi all,

Does anybody have some help they can share to install Porteus in a KVM instance like Vultr? There are instructions here for Slackware setup at Vultr:
http://hostingformula.net/using-gparted ... partition/

What I tried so far is:
1) prepared the partitions and ran the "Porteus Installer" to install to /dev/vda1. It hangs at "Booting..." when upon reboot.
2) mounted /dev/vda1 to /mnt/vda1 then ran "sh Porteus-installer-for-Linux.com". I can now "boot to the 1st hard drive", and see a custom menu I made by editing "porteus.cfg".

BUT, if I now unmount the original ISO image, it says "searching for porteus-v3.1-x86_64.sgn" file and won't load the OS. The .sgn file does exist on the VPS on the first partition (/dev/vda1).

3) I next rsync'd all the files from the ISO (/mnt/sr0) to the first partition, per the official thumb-drive install notes at "http://www.porteus.org/tutorials/37-ins ... -v-10.html" that said to copy the files, but that doesn't help. I was about to dd the data, but see in the thread at "http://forum.porteus.org/viewtopic.php? ... ile#p35329" that that "dd-ing an (isohybrid) iso onto a drive will boot but you won't be able to save any files to the drive because it's readonly".

4) I then updated boot/syslinux/lilo.conf and re-ran Porteus-installer-for-Linux.com, per the instructions in lilo.conf, but that didn't update porteus.cfg.. and I see that it's actually using a bootloader called "extlinux". This other page mentions needing to use "mkinitrd":
http://docs.slackware.com/howtos:slackw ... proxmox-ve

helpful hints:
http://www.linux-kvm.org/page/Boot_from ... ock_device
https://github.com/canfar/openstack-san ... enStack.md

But I don't see mkinitrd in the Porteus live boot ISO. Can I install it with USM? This Porteus forum thread mentions another way:
http://forum.porteus.org/viewtopic.php? ... trd#p35982

I haven't yet tried yet the official GParted Live boot CD that the very first link above used to prep Slackware paritions at Vultr, but would that even matter? It looks like some mkinitrd magic needs done, but if so, why does plain Slackware boot fine at Vultr? Maybe I'm just missing something simple? Is there an easy way I can list actual boot devices in the porteus.cfg, or somehow with a cheatcode like "sgnfile"?

Thanks.

EDIT: The Porteus ISO already has virtio in the kernel for KVM, so my next route is to try either lilo or grub2, which should let me specify the correct block device to load from, I think.
Last edited by chessnut on 23 Aug 2015, 20:04, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Porteus on Vultr VPS?

Post#2 by fanthom » 23 Aug 2015, 06:57

Hell ochessnut,

virtio block device driver must be compiled into kernel. please check if this is the case for Porteus Desktop if not then please load this driver through linuxrc script (placed inside initrd.xz). You may have to add virtio to the ramdisk.
Please add [Solved] to your thread title if the solution was found.

chessnut
Ronin
Ronin
Posts: 3
Joined: 23 Aug 2015, 01:14
Distribution: Porteus-MATE-v3.1-x86_64
Location: USA

Re: Porteus on Vultr VPS?

Post#3 by chessnut » 23 Aug 2015, 16:09

Thanks @fanthom! I think I have the virtio block device driver:

"lsmod | grep virtio" shows these modules:
virtio_blk, virtio_net, virtio_rng, rng_core, virtio_balloon, virtio_pci, virtio_ring, and virtio.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Porteus on Vultr VPS?

Post#4 by fanthom » 23 Aug 2015, 17:20

Yes - add all these to the initrd.xz and load virtio_blk before in linuxrc before it starts searching for .sgn file.

In next release i'll compile these into kernel so this problem wont exist.
Please add [Solved] to your thread title if the solution was found.

chessnut
Ronin
Ronin
Posts: 3
Joined: 23 Aug 2015, 01:14
Distribution: Porteus-MATE-v3.1-x86_64
Location: USA

Re: Porteus on Vultr VPS? [Solved]

Post#5 by chessnut » 23 Aug 2015, 19:04

Thank you!! It's working!! :Yahoo!: Thanks for telling me to add them to initrd.xz. I didn't understand initially, since "lsmod" showed that the virtio modules were loaded, but when I extracted initrd.xz, they weren't there!

Here is what I did to fix it:
1) I used @KnallKopf's directions to tell me how to update the initrd.xz file:
http://forum.porteus.org/viewtopic.php? ... trd#p35983

I believe I got an error with depmod (at first) because I needed to include more modules than the virtio ones, so I just included all the ones from /lib/modules/.

2) I updated linuxrc like you said to load virtio_blk immediately before it searches for the .sgn file. That didn't work at first, so I just loaded all the virtio modules.

3) I updated my porteus.cfg boot menus with my block device (found with "blkid"), prepending "root=UUID=<my block id#>" as the first appended argument on the "APPEND" line, per the advice here: http://humpty.firstcloudit.com/promotes ... linux.html

I don't know if it was necessary, but I also appended "from=UUID:<my block id#> per the advice here by @zander:
http://forum.porteus.org/viewtopic.php? ... =15#p36140

4) Ran Porteus-installer-for-Linux.com. The boot breaks if I run this without attaching the Porteus live ISO to my instance, but that is fixed by re-attaching it, mounting /dev/vda1 to /mnt/vda1, and running/mnt/vda1/boot/Porteus-installer-for-Linux.com again. Not sure why that happens, but I just have to remember to attach the ISO before updating the bootloader. Afterwards, I can detach the ISO and it boots just fine without it.

I can now boot my Vultr KVM instance without my ISO mounted at /dev/sr0 anymore! Thank you @fanthom, @KnallKopf, and @zander for excellent forum posts! I wouldn't have been able to fix it without you. Now I can get started learning how to use Porteus!

Post Reply