You are not logged in.

#1 2016-08-23 12:50:41

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Building and installing archlinux with scripts

archNAS-logo.png

So I'm interested in building my own ISO and install script to setup a NAS system but with a interactive CLI installer.

I was planning on running most services in a Docker container and using either ajenti or webmin as a WebUI. While keeping certain services like SMB, Rsync and SSH running without a container.

I'm currently browsing through the wiki and I have setup a few VMs with archlinux and experimenting, but I'm kind of confused on the building part.

I'm trying to create a script similar to Arch Linux Anywhere and currently modifying there script to suit my needs but I'd prefer to make my own.

So links and suggestions on where I should start would be a nice help.

If the devs don't mind me setting up a distro I'll publish it if anyone else wants to have a look. I was thinking of naming it archNAS in honer of FreeNAS even if I'm somewhat annoyed they no longer support MBR and I prefer the archlinux system creed.

EDIT:
Project Page - https://github.com/Pheoxy/archNAS

If you have anything to add to it let me know!

Last edited by Pheoxy (2016-08-24 14:00:55)

Offline

#2 2016-08-23 17:49:27

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

So I've settled on cockpit as a webgui but I'm also wondering how I can have the ip address sit at the top of the CLI and some info on boot as well as when the CLI is cleared?

Does anyone know a way to do that?

Offline

#3 2016-08-23 18:08:13

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Building and installing archlinux with scripts

Try adding a command to get your IP to your ~/.bashrc

export PS1="[\u@$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8) \W]\\$ "

If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#4 2016-08-23 18:50:21

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

TheChickenMan wrote:

Try adding a command to get your IP to your ~/.bashrc

export PS1="[\u@$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8) \W]\\$ "

Would that need to be done for root for it to appear on boot?

Offline

#5 2016-08-23 19:04:01

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Building and installing archlinux with scripts

Pheoxy wrote:

Would that need to be done for root for it to appear on boot?

That would add your current internal IP to your BASH prompt. It would appear whenever you were logged into your shell.

Edit: That method would only make it appear when a user is actually logged into the shell. If you want something to appear during the boot sequence you might need to hunt around and then try some things. I have seen some people with success in doing stuff like this with systemd unit files.

Last edited by TheChickenMan (2016-08-23 20:06:33)


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#6 2016-08-24 04:02:44

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

TheChickenMan wrote:
Pheoxy wrote:

Would that need to be done for root for it to appear on boot?

That would add your current internal IP to your BASH prompt. It would appear whenever you were logged into your shell.

Edit: That method would only make it appear when a user is actually logged into the shell. If you want something to appear during the boot sequence you might need to hunt around and then try some things. I have seen some people with success in doing stuff like this with systemd unit files.

Ah fun, I guess I'll try your method until I find what your talking about.

I've setup a git for the archiso script based of Arch Anywhere to build a ISO. Got a few things to fix up and disclaimers and all that to fix up yet, the codes a little buggy because this is new territory for me and I basically deleted what wasn't needed from the script which is making it misbehave. But I was able to successfully build a ISO and install archNAS with a bit of playing. Just gotta provide some script for samba and all that now.

https://github.com/Pheoxy/ArchNAS/tree/0.1

Offline

#7 2016-08-24 11:05:51

TheOpethian
Member
Registered: 2016-02-20
Posts: 29

Re: Building and installing archlinux with scripts

Pheoxy wrote:
TheChickenMan wrote:
Pheoxy wrote:

Would that need to be done for root for it to appear on boot?

That would add your current internal IP to your BASH prompt. It would appear whenever you were logged into your shell.

Edit: That method would only make it appear when a user is actually logged into the shell. If you want something to appear during the boot sequence you might need to hunt around and then try some things. I have seen some people with success in doing stuff like this with systemd unit files.

Ah fun, I guess I'll try your method until I find what your talking about.

I've setup a git for the archiso script based of Arch Anywhere to build a ISO. Got a few things to fix up and disclaimers and all that to fix up yet, the codes a little buggy because this is new territory for me and I basically deleted what wasn't needed from the script which is making it misbehave. But I was able to successfully build a ISO and install archNAS with a bit of playing. Just gotta provide some script for samba and all that now.

https://github.com/Pheoxy/ArchNAS/tree/0.1

Kudos to you for that, I'm curious to see where this goes.

Offline

#8 2016-08-24 14:01:48

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

Wonder if the Arch Linux Devs mind if I burrow the awesome 'A'?

It's pretty much arch linux anyway.

Preview:
archNAS-logo.png

Last edited by Pheoxy (2016-08-24 14:02:30)

Offline

#9 2016-08-24 14:12:00

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Building and installing archlinux with scripts

Pheoxy wrote:

Wonder if the Arch Linux Devs mind if I burrow the awesome 'A'?

Here are the requirements for using the Arch logo: https://wiki.archlinux.org/index.php/De … mitted_Use

It's pretty much arch linux anyway.

Just be aware that derivatives are not supported on this forum.

Offline

#10 2016-08-24 14:29:45

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

2ManyDogs wrote:
Pheoxy wrote:

Wonder if the Arch Linux Devs mind if I burrow the awesome 'A'?

Here are the requirements for using the Arch logo: https://wiki.archlinux.org/index.php/De … mitted_Use

It's pretty much arch linux anyway.

Just be aware that derivatives are not supported on this forum.

Sweet thanks, that makes things easier.

All's this is is a bunch of scripts to build a NAS like server on Arch so I shouldn't have to much worry about.

Last edited by Pheoxy (2016-08-24 14:30:56)

Offline

#11 2016-08-24 14:32:47

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Building and installing archlinux with scripts

"A simple, lightweight network attached storage"

Definitely a cool concept. Good luck.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#12 2016-08-24 14:45:34

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

TheChickenMan wrote:

"A simple, lightweight network attached storage"

Definitely a cool concept. Good luck.

I wish they had a like button, I'll have to get to this in the morning but do you mind if I use this?

Offline

#13 2016-08-24 14:58:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Building and installing archlinux with scripts

My (unofficial, non-binding) interpretation of the trademark guidelines suggest you are fine.  I looked ... closely.  I suspected there might be something afoul, but from my reading you are doing everything right ... except this:

Pheoxy wrote:

It's pretty much arch linux anyway.

No, it's not.  Not only from a support perspective, but also from the trademark point of view.  The trademark usage guidelines are clear on the point that your work is a derivative and it must be presented as such.  Any suggestion that it is part of or affiliated with arch linux (or "is" arch linux, pretty much or otherwise) violates the terms.

I think you've done well at distinguishing your project from archlinux, but just remove the "It's pretty much arch linux" from your vocabulary, or it will get you in trouble.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2016-08-24 14:58:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Building and installing archlinux with scripts

I am going to rain on your parade a little bit.  Sorry.
As has been pointed out, we are a little rigid in our policy that we only support Arch Linux on these forums; and that we regard Linux that is set up by installers as forks -- even if they use our repositories.  This is true for Manjaro, Archbang, Antergos, Chakra, Evo/lution, etc...   It also holds true for special purpose distributions such as Blackarch and Archlinux ARM.   Part of the reason for this position is that we expect our users (whom we assume are experienced users) to know how their systems are configured and t be able to relate that to us. Obviously someone who installs by blindly using an autopilot is not likely going to have a clue.

So, if you want to do this, best of luck with your effort (truly).  But, like Archlinux ARM and Manjaro, step up and provide a quality web presence where your users can get support and form a community.  Don't be like some projects and expect to be able to thrust the support back on these forums because "It is just like Arch".  That doesn't cut it.

Last edited by ewaller (2016-08-24 15:00:16)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#15 2016-08-24 15:05:11

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

Trilby wrote:

My (unofficial, non-binding) interpretation of the trademark guidelines suggest you are fine.  I looked ... closely.  I suspected there might be something afoul, but from my reading you are doing everything right ... except this:

Pheoxy wrote:

It's pretty much arch linux anyway.

No, it's not.  Not only from a support perspective, but also from the trademark point of view.  The trademark usage guidelines are clear on the point that your work is a derivative and it must be presented as such.  And suggestion that it is part of or affiliated with arch linux (or "is" arch linux, pretty much or otherwise) violates the terms.

I think you've done well at distinguishing your project from archlinux, but just remove the "It's pretty much arch linux" from your vocabulary, or it will get you in trouble.

Thanks, that clarify's a few things and put's things into perspective.
I read this https://wiki.archlinux.org/index.php/De … mitted_Use from @2ManyDogs and I pushed a commit to add (TM) to the boot loader splash, now I just have to check everything with the Arch Linux Anywhere guys and update any license stuff.

Offline

#16 2016-08-24 15:32:10

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Building and installing archlinux with scripts

Pheoxy wrote:

I wish they had a like button, I'll have to get to this in the morning but do you mind if I use this?

No. Go for it if you want.
Keep in mind what had been said above. It might be helpful for your user in the future to include something in your documentation that support is not to be expected from Arch Linux. There do tend to be a lot of people that see things "based on Arch" and assume that means "is Arch". Also, good luck again. I've been looking to setup a new NAS for some time now.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#17 2016-08-27 15:15:34

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

So I'm using Arch Linux Anywhere's script just edited to suit the build but I'd like to build my own script. Unfortunately I'm just googling how to do everything and I don't have any formal education in coding.
What are the best things to follow when creating an interactive script? I understand arch anywhere uses if commands but without that background it becomes quite confusing.
I've currently started up a new git repository to deal with post install scripts cause I've reached the most I can understand in the Arch Anywhere Script.

What resources would you guys recommend to further my understanding of scripts so I can understand the basics in bash? My google-foo is failing me.

Offline

#18 2016-08-27 15:19:50

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Building and installing archlinux with scripts

Pheoxy wrote:

What resources would you guys recommend to further my understanding of scripts so I can understand the basics in bash? My google-foo is failing me.

https://wiki.archlinux.org/index.php/Bash

In particular the "see also" and "tutorials" sections at the end.

A simple web search for "bash tutorials" yields a number of useful hits.

Last edited by 2ManyDogs (2016-08-27 15:21:17)

Offline

#19 2016-08-27 15:40:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Building and installing archlinux with scripts

While it's in the tutorials section of the link above, Greg's Wiki is in my opinion the best bash tutorial/reference on the web by a very large margin.  It is accurate, complete, encourages good habits, and highlights common bad habits.

Many other bash tutorials online just help you inherit someone else's bad habits.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#20 2016-08-27 15:41:28

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

Thanks, I'll check it out.

Offline

#21 2016-09-28 03:28:25

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: Building and installing archlinux with scripts

So I'm currently rebuilding a more up to date ISO that includes docker, cpupower, hdparm in the script because I noticed my old NAS test box gets a bit unstable and the CPU soft locks if I don't set a lower cpu frequency. They are turned off by default in the script, but all seems to be working.

Unfortunately the Web GUI's I've been playing with seem to be a bit unstable with a archlinux setup or require heaps of dependencies. I'm thinking of just making my own Web GUI and getting some inspiration from OpenMediaVault (Which I love by the way and is what I'm currently using).

I was thinking of using Nginx with PHP but I'm unsure of how to have the WebGUI send commands to the System as well as edit configs.

Offline

Board footer

Powered by FluxBB