DISCLAIMER:
These instruction are written to assist Linux newbies. Nothing written here should be taken as any form of invitation for YOU to work on your hardware. ELECTRICITY KILLS.
------------------------------------------------------------------------------------------------------------------------
Table of Contents
1. Make sure the AudioLinux file HASN'T been tampered with: 4
3. Burn the file to a USB stick: 4
4. Boot your PC from the USB stick: 5
6. Check the system will boot without a keyboard & mouse attached 6
7. Move the PC/NUC into position 6
9. Software Install – Squeezelite-R2; 7
10. Software Install – Logitech Media Server 8
11. Configure AudioLinux – Additional Daemons 8
KC = Key Concept. Something important
> = Instruction for doing something on the PC
>> = A process/procedure
<k> = A key to hold down, e.g. <cntrl> = the control key.
So, you have heard of this REALLY cool player called AudioLinux, but when you come and look you see that it is NOT a player, it is an operating system (OS), AND it is Linux!
So how good is this? Well, why not read this:
AudioLinux Review: Computer Audiophile
That said, no one thing can make a great sounding HiFi. You need to pay attention to lots of things, such as your grounding and power. Read that thread, it has loads of good content, and a helpful index at the front.
So, in the words of the Hitchhikers Guide to the Universe:
Don'T PaNIc!!
This guide has been written to get you off the ground. However, it is:
1. NOT a Linux primer,
but there is LOADS of advice on the internet; and
2. NOT going into lots of detail on how you set up the players/servers that it can host,
again there is LOTS of advice on the internet, and the Audiolinux start page.
It will:
1. Take you through the steps to set up the OS AudioLinux;
2. Give you some advice on setting up Squeezelite & Logitech Media Server; and
3. Assume you are using a Windoze PC to do this, Win10 to be specific.
Be honest with yourself about how comfortable you are altering a PC BIOS and getting down and dirty with the command line.
Please note that this has been written to install the HEADLESS version of AudioLinux, without a GUI (Graphical User Interface - the desktop) & no keyboard, mouse or screen attached to the PC; and, with the OS held in MEMORY (sounds the best). However, most of the setup is the same to get any version up and running, it is just a question of which version of the OS you choose to install.
KC: In AudioLinux the Desktop is called LXQt.
KC: Make sure the PC/NUC meets the minimum requirement.
KC: From version 1.9.7 you can load the entire system to RAM as an option. For this you need at least 8 GB for AudioLinux headless (16GB RAM for LXQt).
Make sure the downloaded AudioLinux file HASN'T been tampered with;
Extract the img file;
Burn the file to a USB stick;
Boot your PC from the USB stick;
Configure AudioLinux;
Check the system will boot without a keyboard & mouse attached;
Move the PC/NUC into position;
Remotely Logon;
Software Install – Squeezelite-R2;
Software Install – Logitech Media Server;
Configure AudioLinux – Additional Daemons;
Move AudioLinux into RAM Mode;
Security.
You will need:
1. An USB stick >=32GB;
2. PC/NUC (advice on the thread above); and
3. A keyboard and screen.
And some software:
1. 7 Zip;
2. Rufus or Win32 Disk Imager; and
3. Putty.
At this point you will have the target PC/NUC with you attached to a screen and a keyboard. Additionally you will have another PC on which to handle the AudioLinux file and create a boot USB stick.
Commentary:
This is good computer security. You don't want to load anything that has been unlawfully altered.
Having paid for the OS you will have received an email with a link for the download site plus the SHA256 hash of the file; this is a long number that you can generate by processing the file, if the file is changed so is the generated number.
If the number is different email AudioLinux.
Steps:
> Install 7-zip;
> Right click on the downloaded AudioLinux gz file;
> Select CRC SHA;
> Select SHA256;
> Check the generated number is the same as that in the email.
Steps:
> Right click on the downloaded AudioLinux gz file;
> Select 'Extract Here'.
Commentary:
For this you will need to use a program such as Rufus or Win32 Disk Imager. This will burn the img to the USB key you have and create a bootable AudioLinux USB Stick.
Steps:
> Insert the USB stick, note the Drive Letter it has been assigned;
> Click on the .exe file and enter your admin password when asked;
> Select the extracted image file;
> MAKE SURE the program is writing the image to your USB stick - it will overwrite the selected drive, BE CAREFUL.
KC: Bootable = a file store from which a PC can start.
KC: BIOS = Basic Input Output System. Now also called the UEFI. This is the program run by the PC when it first starts.
Commentary:
Intel have added some extra security into their BIOS to stop unauthorised OSs being loaded, such as AudioLinux. You may need to make changes in the BIOS.
Check HOW to enter your PC BIOS. In the case of my NUC it was by pressing F2, search online if no message come up on the screen when you start the PC.
Steps:
> Slot the USB stick into an USB slot;
> Start the PC/NUC;
> Go into the BIOS;
> Check if it has a OS Boot security setting, if YES then uncheck it;
> Check if you can turn off any requirment to have a screen, keyboard or mouse attached;
> Check the boot order, set it up to boot from the USB FIRST;
> Save changes and reboot.
Commentary:
Now the PC should reboot, find the USB and you should see the AudioLinux options menu. Check the AudioLinux start page.
For our purposes we will:
Setup AudioLinux Extreme;
Ensure DHCP is working;
Check the DateTime is correct; and
Setup AudioLinux Extreme to boot automatically.
Steps:
>> IP Address Check
> Select AudioLinux Extreme
> On the left you will see audiolinux@audiolinux, the OS is up and running!
> Type: ip address show
Check for the IP address for eth0, e.g. 198.16.1.23. This is this PCs IP Address – note it.
> Type: ping <Your IP address here>
You should see a ping response, e.g.
64 bytes from <the IP Address>: icmp_seq=1 ttl=64 time=0.016 ms
> <cntrl> and <c>
After you see a few responses kill the command
**If this didn’t work you have a networking issue to troubleshoot
>> Set DateTime
> Type: timedatectl
It will display the current settings.
> Type: timedatectl set-time "2018-11-04 23:40:30"
IF the time is wrong.
> Type: timedatectl set-timezone Europe/London
IF the timezone is wrong, list those available with - timedatectl list-timezones
>> Configure AudioLinux Boot
> Type: vi /boot/loader/loader.conf
> change the line default audiolinuxBFQ to default audiolinuxEXTREME
>> From DHCP to Static IP – if required
> Type: vi /etc/systemd/network/20-wired.network
> Find the section [Network]
> Alter DHCP=ipv4 to
Address=192.168.1.5/24
Gateway=192.168.1.1
DNS=8.8.8.8
changing the IP addresses to those you require.
KC: Users and context. Most OSs demand that you run in them as a specific user. That user will be a member of a class of users, such as standard or administrator. You should always run with the lowest possible security privideges for the tasks you are completing.
audiolinux@audiolinux is telling you that you are logged in as audiolinux on the machine audiolinux.
KC: As audiolinux is NOT an administrator account you cannot
do everything you need in this account. For some actions you will
need to be the Administrator. To give yourself the Administrator
privileges AudioLinux has been set up to allow you to use the command
sudo, this allows you to run some commands with elevated
privileges.
Commands for which sudo works: poweroff;
reboot; clean; ramsave; and, for scripts starting/enabling audio
service.
KC: In Linux the Administrator is called = root. You will need to type ‘su’ and then the root password. The main command you will need to run as root for this helpfile will be systemctl.
Commentary:
It should display a splash screen before showing the AudioLinux start screen, with (in this case) AudioLinux Extreme highlighted and a countdown; it will then start.
Steps:
> Type: sudo reboot
> As the machine is powering down disconnect the keyboard and mouse.
> Watch the screen and monitor the boot process.
Up until no you will have been working directly on the PC. Now you can move the PC/NUC into the position you want to use in the knowledge that it will boot as required.
Attach the needed devices, e.g. the USB cable to the DAC/DDC.
One it is in position remotely log onto it.
Steps:
> Download and install Putty;
> Start Putty;
> Type the PC/NUC IP Address into the Hostname (or IP Address) box;
> Check SSH is selected, and that the Port = 22;
> Type a relevant name into the Saved Sessions box, e.g. AL-SqzLt;
> Click on Save, to save these details;
> Click on Open.
> You will now be asked to accept the remote machine's key
this is a part of the security and expected behaviour, so do so.
IF the key was to unexpectedly change then this would be a concern;
> When asked for the user Type: audiolinux;
> Password Type: audiolinux;
KC: Secure Shell = ssh. This is a service that is running on AudioLinux that allows you to remotely log on and type commands as though you were sat at the machine directly.
Commentary:
The install process asks you some questions:
It will ask you if you wish to edit some files = n, on all occassions.
When asked whether to continue building = y
If asked for a password = audiolinux or audiolinux0
Proceed with installation = y
When completed successfully it will report: No database errors have been found!
Steps:
> Type: yaourt -Sy
This will update the system
> Type: yaourt -S squeezelite-r2-git
This will load the squeezelite software
> Type: su
Enter the root password
>
Type:
squeezelite -l
Identify the USB output you are going to use
> Type: vi /etc/conf.d/squeezelite
Update squeezelite to use that output
> Type: systemctl daemon-reload
> Type: systemctl start squeezelite@audiolinux
> Type: systemctl status squeezelite@audiolinux
Should be shown as running
> Type: systemctl enable squeezelite@audiolinux
It will now start automatically at boot.
KC: A 'service' within the Windows world is called a Daemon in Linux. This is a piece of code that runs in the background and responds to remote requests, these can be from within your own PC or from a remote device. For more on systemctl read HERE.
Commentary:
It will lead to better sound quality if you load logitechmediaserver-git on a different PC/NUC to that running Squeezelite.
Two hints:
To access and configure LMS with the above server on the network use your web-browser and go to: http://<LMS Server IP>:9000, and follow the on screen instructions.
For the LMS server to serve up content it must must be able to access it, local and remote filestores need to be MOUNTED.
Steps:
> Type: yaourt -Sy
This will update the system
> Type: yaourt -S logitechmediaserver-git
This will load the logitechmediaserver software
> Type: su
Enter the root password
> Type: systemctl daemon-reload
> Type: systemctl start logitechmediaserver-git
> Type: systemctl status logitechmediaserver-git
Should be shown as running
> Type: systemctl enable logitechmediaserver-git
It will now start automatically at boot.
> When completed successfully it will report: No database errors have been found!
Commentary:
Depending on what you want to use the AudioLinux machine FOR then you may need additional daemons (services) to be available.
For instance, if you setting up an LMS server then it will need to access your audio files. If these are on a NAS then you may have set up some shares. To access these you will need to start the to Samba daemons, smb and nmb.
Steps:
> Type: su
Enter the root password
> Type: systemctl enable smb
> Type: systemctl enable nmb
> Type: systemctl start smb
> Type: systemctl start nmb
> Type: systemctl status smb
> Type: systemctl status nmb
Commentary:
If you change things now these will NOT be saved to the USB key.
If you wish you cab detach the USB from the PC/NUC.
Steps:
> Type: sudo ramroot -F enable
You now have a machine on your network that has a publicly known user and password. This MAY be a security risk, depending on your system setup. Consider whether you need to change it.
Commentary:
In
my system I use a DAC with valves, this means I have to turn it off
between sessions, and this causes connections to be lost. These can
be due to the computer software OR the hardware and its embedded
code. I will cover the steps that I carry out, followed by some more
comments:
Steps:
>
Turn everything on, if there is a problem continue;
> Power
cycle any widgets, such as a USB chain, that you leave powered
between sessions;
Check if things are back up and running, if
NOT ….
> Squeezelite NUC (SN):
SSH to box
SU to
root
Type: systemctl status squeezelite@audiolinux
If
the service is down then read the issue. If it complains of no output
path then look at the path
to your DAC, cables & widgets.
Then restart the service.
Check if things are back up and
running, if NOT ….
>
Squeezelite NUC (SN):
From step above -
Type: exit (you
are now logged on as audiolinux)
Type: squeezelite -d
all=debug
If you see outputs that are cycling then the
connection up to the LMS server are all OK.
If you see an
error, work on it.
Things to
investigate with an LMS server including C-3PO.