Page MenuHomePhabricator

HowTo VyOS 1.1.x on Packet.net
Closed, ResolvedPublicFEATURE REQUEST

Description

Hello @tic226 and @max1e6

can you add this
https://gist.github.com/mikeburgh/7fef199dfc0e4edf20b1292a69500159
to wiki somewhere

Thanks!

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

syncer created this task.Feb 8 2018, 5:52 PM
tic226 closed this task as Resolved.Feb 8 2018, 6:56 PM

The new article is under https://wiki.vyos.net/wiki/VyOS_on_Packet.net
I added it to the 'Other' section of the user documentation since 'VyOS on GNS3' is already there.

syncer reopened this task as In progress.Feb 10 2018, 8:25 PM

@tic226

This is version that was blocked,

@ed i think it was blocked due to links to your webs, you can post them here (or you can link them later on wiki)

if you getting issues with spam filter let me kow

Links to Packet help pages.
About Packet.net
has bare-metal hosting from 15 data centers around the world, and allows users to
PXE-boot their own operating systems. This makes it a suitable environment for running VyOS.
As of this writing several steps are necessary to prepare a system for booting.
VyOS installation on Packet.net
VyOS defaults to a console baud rate of “9600”, which is not compliant with packet.net’s SOS. As such, the squashfs image will need to be unpacked, config.boot.default updated to the correct serial number/BAUD rate and the squashfs image recreated. The image can then be booted from a temporary or permanent web server via iPXE.
VyOS 1.8 (stable) or above is required due to an where the “fetch” command is run prior to network loading.
Preparation
Install needed tools:

apt update && apt install squashfs-tools

Fetch image file:

wget https://downloads.vyos.io/release/1.1.8/vyos-1.1.8-amd64.iso

Create directory for the image:

mkdir /tmp/iso

Mount the image:

sudo mount -o loop vyos-1.1.8-amd64.iso /tmp/iso

Create directory for the squashfs:

mkdir /tmp/squashfs

Unsquash it:

unsquashfs -f -d /tmp/squashfs/ /tmp/iso/live/filesystem.squashfs

Configuration
Now we need to change the TTY and BAUD rate in the boot config file /tmp/squashfs/opt/vyatta/etc/config.boot.default .
Change line 32 from
console {
device ttyS0 {
speed 9600
to
console {
device ttyS1 {
speed 115200
Rebuilding the image
Now the squashfs can be rebuilt, the compression method and block size that were used in the original image file are needed.
Check the original image file, look for the lines Compression and Block Size :

unsquashfs -s /tmp/iso/live/filesystem.squashfs

Create a new image file using the determined compression method and block size values:

mksquashfs /tmp/squashfs/ /tmp/filesystem.squashfs -comp gzip -b 131072

Installation
A server for booting VyOS might be within the same Packet data center that you are bringing VyOS up in (for quick boots), or you can boot from your laptop with a proxy tunnel like ,
or you can use an existing web server somewhere on the Internet.
The following files need to be hosted on a public URL somewhere, this URL needs to be added to the iPXE data below: (Note: the URL must be an IP address, host names are not allowed).

  • /tmp/iso/live/vmlinuz
  • /tmp/iso/live/initrd.img
  • /tmp/filesystem.squashfs

A option is needed for the installation, set the user data to the following:
#!ipxe
dhcp
set base http://
kernel ${base}/vmlinuz
initrd ${base}/initrd.img
imgargs vmlinuz initrd=initrd.img boot=live config console=ttyS1,115200n8 ip=${net0/ip}::${net0/gateway}:${net0/netmask} fetch=${base}/filesystem.squashfs
boot
Watch the system boot through the Packet .
Source / Acknowledgement
Based on https://gist.github.com/mikeburgh/7fef199dfc0e4edf20b1292a6950**** by Mike Burgh
Edits by Ed Vielmetti, Packet, to reference Packet help pages.

tic226 closed this task as Resolved.Feb 10 2018, 8:41 PM