How do I update my /etc/fstab file?

Linode Staff

Hello,

I am working through your guide on installing a custom distribution on Linode:

https://linode.com/docs/tools-reference/custom-kernels-distros/install-a-custom-distribution-on-a-linode/

Following the next steps on your instructions, to get things working I did the following:

[[email protected] ~]# lsblk
NAME                  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                     8:0    0  7.3G  0 disk
--sda1                  8:1    0    2G  0 part /boot
--sda2                  8:2    0  5.4G  0 part
  --SangomaVG-root    253:0    0  4.4G  0 lvm  /
  --SangomaVG-swaplv1 253:1    0  752M  0 lvm  [SWAP]

So sda2 is where root is located.

Next:


#
# /etc/fstab
# Created by anaconda on Mon Feb 18 01:41:33 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/SangomaVG-root /                       xfs     defaults        0 0
UUID=287353e7-9943-4f99-9e14-a179279d5fe2 /boot                   ext4    defaults        1 2
/dev/mapper/SangomaVG-swaplv1 swap                    swap    defaults        0 0

How do I update the fstab in this particular instance?

4 Replies

Hello,

In looking over the doc you provided on setting up a custom distro, and comparing it to the information you've provided, it looks like you've set up your root / mount on a LVM. Our custom distro doc does not mention doing it this way, so I'm not sure if you have your fstab file set up correctly or not. You could proceed through the rest of the document to see what happens when you boot this up, but my recommendation would be to set up your root on the sda1 partition, as the doc outlines.

Looks like not using lvm is a non starter with FreePBX

https://community.freepbx.org/t/no-lvm-on-freepbx-distro-7-howto-cause-issues-in-the-future/39291/16

I might just have to look for another solution which more easily allows for use of custom ISOs

An LVM setup should still work fine in a direct disk boot setup - it just makes the process a little more involved if you're going to follow the 'Linode Manager Compatibility' section of that guide, which uses GRUB2 mode. I'm pretty sure (I've not tested it) that you could still dd your root LVM volume to an ext4 disk using something like:

dd if=/dev/mapper/SangomaVG-root of=/dev/sdb bs=1M

Then either mount the disk (/dev/sdb in this example) and manually copy over the separate /boot partition from your sda1, or just copy over and update the /boot/grub/grub.cfg file as needed - it's the only file that GRUB2 mode looks for.

@Linode

It has been about a 3 year long process but I'll try to compress what I've learned into this doc. My setup may not be like yours so different hardware requirements aside, your mileage may vary. My linode started as a nano and ran fine but I went to the 2gb after PoC (proof of concept) was completed because I'm greedy and want more memory/storage space and transfer. I first set this server up on manager.linode.com not the new 'cloud' one so if you have a specific question I'll guide you best I can.

This project began as an experiment just to see if I could get it running on a linode since my dev buddies were telling me it absolutely couldn't/shouldn't be done. So after assuring the dev buddies that we can still be friends and guiding them on how to kindly f^ck off, I got to work.

I noticed after a few months of tinkering with it that there is some proprietary '11 herbs and spices' that linode uses for their virtualization platform which might make freepbx deployment difficult, mainly the block storage and their linode imaging/backup methods that don't like to be run on a "RAW" (non-linode managed) filesystem, rather they seem to prefer handling kernel settings, block allocations, kernel helpers and so on. None of the stack scripts did any good, often not working properly so I built my FreePBX from scratch

So my server is running Sangoma 7 with FreePBX 14.0.11 (soon to be 15, god willing) plus a nice KDE X GUI on top of the CentOS7 core that looks pretty great while running GLISH (if i initiate GUI running startx in console). Everything is legit and activated thru Sangoma. Sysadmin and all commercial modules I use are also running flawlessly. Backups are done via direct FTP connection to a NAS at my home office server. Restore is done in reverse, essentially by inflating backups via the FreePBX GUI. I can reinstall a fresh FreePBX 14/15, run the restore function and be operational within minutes, not days.

MY END USER SETUP:
All my extensions use either GS (grandstream) Wave on Android (4.0+) or MicroSIP for Windows. Both programs can talk to each other thru either Video or Audio using Legacy SIP (Not pjsip). Outbound and Inbound PSTN calling works great thru SIPSTATION. For Video I use H.264 because it's supported by all my client software packages. Audio uses uLaw then aLaw, gsm, and so on. When setting up your software clients, you need to make sure your bit rates match between client and server. I also recommend the use of Google's STUN servers and NO NAT. I have two hardware clients. One is an ATA adapter linked to a chan_sip extension that terminates to a fax machine, the other is a refurb Cisco Telepresence system I was able to acquire for FREE99 from a client that was upgrading to latest/greatest. Only thing wrong was a bad/sticky tracking camera motor.

Enough of that, here's the meat of her.

LINODE ASTERISK FREEPBX BASICS

To start, your linode has to be configured for Direct Disk Boot Kernel ONLY. Even if it does work for a while on a different kernel, it'll kernel panic horribly eventually when you install modules (or insult it's mother or whatever). Use ONLY FULL VIRTUALIZATION (not paravirt cause we're doing weird things lol), NO INITRD and DEFAULT run level. Enable ALL kernel helpers EXCEPT 'Auto-configure Networking'. This needs to be the only one that is disabled. Reason being is simple. FreePBX handles all routes you give it. No need for more bounces with the linode manager messing with the network stack. It does really weird things to the routes that asterisk don't like at all.

For Block Device Assignments, SDA (boot) is my "FreePBX Server image" and SDB is my "512MB Swap". Under Linode, it sees the filesystem as raw because FreePBX setup handles partitioning inside so-called 'SDA disk'.

To install freepbx, I used finnix recovery to download and install the package via GLISH. At one point, I believe I was able to mount the full ISO from sangoma and boot eventually as well but as of this writing I cannot locate the guide I wrote to do it. Keep in mind: The version you run on the 'donor' (Freepbx 11,12,13,14) needs to match one installed on the linode to be 'restored'. If they don't match, your restore (if it completes) will be a mess once it reboots.

Once it is installed and operational, you will be able to bind the linode ip to your DNS name thru your DNS manager. Next, you'll want to login to sangoma management to remove the deployment id so you may obtain a new one. This will allow your to use Commercial Modules. The very first one I recommend buying is Sysadmin Pro which has the VPN server plus a whole bunch of little features that just make it so much easier to manage. Generate your certificates ONLY after activation and success with DNS testing, to minimize headaches. After enabling HTTPS, I recommend setting your HTTP to 8080 (leave Let's Encrypt at 80) and leaving all HTTPS default, so as to auto connect to https management.


I'm also offering a live demo to anyone who wants.. You can email me at support@wolverinetechs.us for further assistance and to request a consult. Free 30 minute consultations via telephone/webex are available!

EDIT: Added preface, more formatting and some ramblings, will be adding links to pictures of setup soon -060219KT

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct