@ -0,0 +1,319 @@ | |||
GNU GENERAL PUBLIC LICENSE | |||
Version 2, June 1991 | |||
Copyright (C) 1989, 1991 Free Software Foundation, Inc. | |||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 , USA | |||
Everyone is permitted to copy and distribute verbatim copies of this license | |||
document, but changing it is not allowed. | |||
Preamble | |||
The licenses for most software are designed to take away your freedom to share | |||
and change it. By contrast, the GNU General Public License is intended to | |||
guarantee your freedom to share and change free software--to make sure the | |||
software is free for all its users. This General Public License applies to | |||
most of the Free Software Foundation's software and to any other program whose | |||
authors commit to using it. (Some other Free Software Foundation software | |||
is covered by the GNU Lesser General Public License instead.) You can apply | |||
it to your programs, too. | |||
When we speak of free software, we are referring to freedom, not price. Our | |||
General Public Licenses are designed to make sure that you have the freedom | |||
to distribute copies of free software (and charge for this service if you | |||
wish), that you receive source code or can get it if you want it, that you | |||
can change the software or use pieces of it in new free programs; and that | |||
you know you can do these things. | |||
To protect your rights, we need to make restrictions that forbid anyone to | |||
deny you these rights or to ask you to surrender the rights. These restrictions | |||
translate to certain responsibilities for you if you distribute copies of | |||
the software, or if you modify it. | |||
For example, if you distribute copies of such a program, whether gratis or | |||
for a fee, you must give the recipients all the rights that you have. You | |||
must make sure that they, too, receive or can get the source code. And you | |||
must show them these terms so they know their rights. | |||
We protect your rights with two steps: (1) copyright the software, and (2) | |||
offer you this license which gives you legal permission to copy, distribute | |||
and/or modify the software. | |||
Also, for each author's protection and ours, we want to make certain that | |||
everyone understands that there is no warranty for this free software. If | |||
the software is modified by someone else and passed on, we want its recipients | |||
to know that what they have is not the original, so that any problems introduced | |||
by others will not reflect on the original authors' reputations. | |||
Finally, any free program is threatened constantly by software patents. We | |||
wish to avoid the danger that redistributors of a free program will individually | |||
obtain patent licenses, in effect making the program proprietary. To prevent | |||
this, we have made it clear that any patent must be licensed for everyone's | |||
free use or not licensed at all. | |||
The precise terms and conditions for copying, distribution and modification | |||
follow. | |||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |||
0. This License applies to any program or other work which contains a notice | |||
placed by the copyright holder saying it may be distributed under the terms | |||
of this General Public License. The "Program", below, refers to any such program | |||
or work, and a "work based on the Program" means either the Program or any | |||
derivative work under copyright law: that is to say, a work containing the | |||
Program or a portion of it, either verbatim or with modifications and/or translated | |||
into another language. (Hereinafter, translation is included without limitation | |||
in the term "modification".) Each licensee is addressed as "you". | |||
Activities other than copying, distribution and modification are not covered | |||
by this License; they are outside its scope. The act of running the Program | |||
is not restricted, and the output from the Program is covered only if its | |||
contents constitute a work based on the Program (independent of having been | |||
made by running the Program). Whether that is true depends on what the Program | |||
does. | |||
1. You may copy and distribute verbatim copies of the Program's source code | |||
as you receive it, in any medium, provided that you conspicuously and appropriately | |||
publish on each copy an appropriate copyright notice and disclaimer of warranty; | |||
keep intact all the notices that refer to this License and to the absence | |||
of any warranty; and give any other recipients of the Program a copy of this | |||
License along with the Program. | |||
You may charge a fee for the physical act of transferring a copy, and you | |||
may at your option offer warranty protection in exchange for a fee. | |||
2. You may modify your copy or copies of the Program or any portion of it, | |||
thus forming a work based on the Program, and copy and distribute such modifications | |||
or work under the terms of Section 1 above, provided that you also meet all | |||
of these conditions: | |||
a) You must cause the modified files to carry prominent notices stating that | |||
you changed the files and the date of any change. | |||
b) You must cause any work that you distribute or publish, that in whole or | |||
in part contains or is derived from the Program or any part thereof, to be | |||
licensed as a whole at no charge to all third parties under the terms of this | |||
License. | |||
c) If the modified program normally reads commands interactively when run, | |||
you must cause it, when started running for such interactive use in the most | |||
ordinary way, to print or display an announcement including an appropriate | |||
copyright notice and a notice that there is no warranty (or else, saying that | |||
you provide a warranty) and that users may redistribute the program under | |||
these conditions, and telling the user how to view a copy of this License. | |||
(Exception: if the Program itself is interactive but does not normally print | |||
such an announcement, your work based on the Program is not required to print | |||
an announcement.) | |||
These requirements apply to the modified work as a whole. If identifiable | |||
sections of that work are not derived from the Program, and can be reasonably | |||
considered independent and separate works in themselves, then this License, | |||
and its terms, do not apply to those sections when you distribute them as | |||
separate works. But when you distribute the same sections as part of a whole | |||
which is a work based on the Program, the distribution of the whole must be | |||
on the terms of this License, whose permissions for other licensees extend | |||
to the entire whole, and thus to each and every part regardless of who wrote | |||
it. | |||
Thus, it is not the intent of this section to claim rights or contest your | |||
rights to work written entirely by you; rather, the intent is to exercise | |||
the right to control the distribution of derivative or collective works based | |||
on the Program. | |||
In addition, mere aggregation of another work not based on the Program with | |||
the Program (or with a work based on the Program) on a volume of a storage | |||
or distribution medium does not bring the other work under the scope of this | |||
License. | |||
3. You may copy and distribute the Program (or a work based on it, under Section | |||
2) in object code or executable form under the terms of Sections 1 and 2 above | |||
provided that you also do one of the following: | |||
a) Accompany it with the complete corresponding machine-readable source code, | |||
which must be distributed under the terms of Sections 1 and 2 above on a medium | |||
customarily used for software interchange; or, | |||
b) Accompany it with a written offer, valid for at least three years, to give | |||
any third party, for a charge no more than your cost of physically performing | |||
source distribution, a complete machine-readable copy of the corresponding | |||
source code, to be distributed under the terms of Sections 1 and 2 above on | |||
a medium customarily used for software interchange; or, | |||
c) Accompany it with the information you received as to the offer to distribute | |||
corresponding source code. (This alternative is allowed only for noncommercial | |||
distribution and only if you received the program in object code or executable | |||
form with such an offer, in accord with Subsection b above.) | |||
The source code for a work means the preferred form of the work for making | |||
modifications to it. For an executable work, complete source code means all | |||
the source code for all modules it contains, plus any associated interface | |||
definition files, plus the scripts used to control compilation and installation | |||
of the executable. However, as a special exception, the source code distributed | |||
need not include anything that is normally distributed (in either source or | |||
binary form) with the major components (compiler, kernel, and so on) of the | |||
operating system on which the executable runs, unless that component itself | |||
accompanies the executable. | |||
If distribution of executable or object code is made by offering access to | |||
copy from a designated place, then offering equivalent access to copy the | |||
source code from the same place counts as distribution of the source code, | |||
even though third parties are not compelled to copy the source along with | |||
the object code. | |||
4. You may not copy, modify, sublicense, or distribute the Program except | |||
as expressly provided under this License. Any attempt otherwise to copy, modify, | |||
sublicense or distribute the Program is void, and will automatically terminate | |||
your rights under this License. However, parties who have received copies, | |||
or rights, from you under this License will not have their licenses terminated | |||
so long as such parties remain in full compliance. | |||
5. You are not required to accept this License, since you have not signed | |||
it. However, nothing else grants you permission to modify or distribute the | |||
Program or its derivative works. These actions are prohibited by law if you | |||
do not accept this License. Therefore, by modifying or distributing the Program | |||
(or any work based on the Program), you indicate your acceptance of this License | |||
to do so, and all its terms and conditions for copying, distributing or modifying | |||
the Program or works based on it. | |||
6. Each time you redistribute the Program (or any work based on the Program), | |||
the recipient automatically receives a license from the original licensor | |||
to copy, distribute or modify the Program subject to these terms and conditions. | |||
You may not impose any further restrictions on the recipients' exercise of | |||
the rights granted herein. You are not responsible for enforcing compliance | |||
by third parties to this License. | |||
7. If, as a consequence of a court judgment or allegation of patent infringement | |||
or for any other reason (not limited to patent issues), conditions are imposed | |||
on you (whether by court order, agreement or otherwise) that contradict the | |||
conditions of this License, they do not excuse you from the conditions of | |||
this License. If you cannot distribute so as to satisfy simultaneously your | |||
obligations under this License and any other pertinent obligations, then as | |||
a consequence you may not distribute the Program at all. For example, if a | |||
patent license would not permit royalty-free redistribution of the Program | |||
by all those who receive copies directly or indirectly through you, then the | |||
only way you could satisfy both it and this License would be to refrain entirely | |||
from distribution of the Program. | |||
If any portion of this section is held invalid or unenforceable under any | |||
particular circumstance, the balance of the section is intended to apply and | |||
the section as a whole is intended to apply in other circumstances. | |||
It is not the purpose of this section to induce you to infringe any patents | |||
or other property right claims or to contest validity of any such claims; | |||
this section has the sole purpose of protecting the integrity of the free | |||
software distribution system, which is implemented by public license practices. | |||
Many people have made generous contributions to the wide range of software | |||
distributed through that system in reliance on consistent application of that | |||
system; it is up to the author/donor to decide if he or she is willing to | |||
distribute software through any other system and a licensee cannot impose | |||
that choice. | |||
This section is intended to make thoroughly clear what is believed to be a | |||
consequence of the rest of this License. | |||
8. If the distribution and/or use of the Program is restricted in certain | |||
countries either by patents or by copyrighted interfaces, the original copyright | |||
holder who places the Program under this License may add an explicit geographical | |||
distribution limitation excluding those countries, so that distribution is | |||
permitted only in or among countries not thus excluded. In such case, this | |||
License incorporates the limitation as if written in the body of this License. | |||
9. The Free Software Foundation may publish revised and/or new versions of | |||
the General Public License from time to time. Such new versions will be similar | |||
in spirit to the present version, but may differ in detail to address new | |||
problems or concerns. | |||
Each version is given a distinguishing version number. If the Program specifies | |||
a version number of this License which applies to it and "any later version", | |||
you have the option of following the terms and conditions either of that version | |||
or of any later version published by the Free Software Foundation. If the | |||
Program does not specify a version number of this License, you may choose | |||
any version ever published by the Free Software Foundation. | |||
10. If you wish to incorporate parts of the Program into other free programs | |||
whose distribution conditions are different, write to the author to ask for | |||
permission. For software which is copyrighted by the Free Software Foundation, | |||
write to the Free Software Foundation; we sometimes make exceptions for this. | |||
Our decision will be guided by the two goals of preserving the free status | |||
of all derivatives of our free software and of promoting the sharing and reuse | |||
of software generally. | |||
NO WARRANTY | |||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR | |||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE | |||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM | |||
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, | |||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | |||
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE | |||
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME | |||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | |||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE | |||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | |||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE | |||
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA | |||
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES | |||
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH | |||
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |||
END OF TERMS AND CONDITIONS | |||
How to Apply These Terms to Your New Programs | |||
If you develop a new program, and you want it to be of the greatest possible | |||
use to the public, the best way to achieve this is to make it free software | |||
which everyone can redistribute and change under these terms. | |||
To do so, attach the following notices to the program. It is safest to attach | |||
them to the start of each source file to most effectively convey the exclusion | |||
of warranty; and each file should have at least the "copyright" line and a | |||
pointer to where the full notice is found. | |||
< one line to give the program's name and an idea of what it does. > | |||
Copyright (C) < yyyy > < name of author > | |||
This program is free software; you can redistribute it and/or modify it under | |||
the terms of the GNU General Public License as published by the Free Software | |||
Foundation; either version 2 of the License, or (at your option) any later | |||
version. | |||
This program is distributed in the hope that it will be useful, but WITHOUT | |||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License along with | |||
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin | |||
Street, Fifth Floor, Boston, MA 02110-1301 , USA. | |||
Also add information on how to contact you by electronic and paper mail. | |||
If the program is interactive, make it output a short notice like this when | |||
it starts in an interactive mode: | |||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes | |||
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, | |||
and you are welcome to redistribute it under certain conditions; type `show | |||
c' for details. | |||
The hypothetical commands `show w' and `show c' should show the appropriate | |||
parts of the General Public License. Of course, the commands you use may be | |||
called something other than `show w' and `show c'; they could even be mouse-clicks | |||
or menu items--whatever suits your program. | |||
You should also get your employer (if you work as a programmer) or your school, | |||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here | |||
is a sample; alter the names: | |||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' | |||
(which makes passes at compilers) written by James Hacker. | |||
< signature of Ty Coon > , 1 April 1989 Ty Coon, President of Vice This General | |||
Public License does not permit incorporating your program into proprietary | |||
programs. If your program is a subroutine library, you may consider it more | |||
useful to permit linking proprietary applications with the library. If this | |||
is what you want to do, use the GNU Lesser General Public License instead | |||
of this License. |
@ -1,3 +1,128 @@ | |||
# ISO | |||
❗**Still in progress. The ISO does not yet contain a complete configuration.**❗ | |||
But the arch installation is really quick. Just without any PwOSS configuration. | |||
[Download ISO](https://repo.pwoss.xyz/server/x86_64/iso/) | |||
A fully functional server installation | |||
| |||
# Create your own ISO | |||
You need a working Arch system to create the ISO. | |||
You can use [VirtualBox](https://wiki.archlinux.org/index.php/VirtualBox) or download the [ISO](https://repo.pwoss.xyz/server/x86_64/iso/) directly. | |||
| |||
## Dependancy | |||
`sudo pacman -S archiso` | |||
| |||
## Usage [options] | |||
iso_name: PwOSS | |||
iso_version: PWOSS_201906 | |||
iso_label: pwoss_linux | |||
publisher: PwOSS | |||
application:'PwOSS Linux' | |||
| |||
Example: | |||
``` | |||
git clone https://git.pwoss.xyz/server/iso.git | |||
cd /path/to/repo/ISO/ | |||
sudo ./build.sh -N PwOSS-Server -V 11.09.2019 -L pwoss_server -P DanSman -A 'PwOSS Server' | |||
``` | |||
| |||
## General options | |||
-N <iso_name> Set an iso filename (prefix) | |||
Default: ${iso_name}" | |||
-V <iso_version> Set an iso version (in filename) | |||
Default: ${iso_version} | |||
-L <iso_label> Set an iso label (disk label)" | |||
Default: ${iso_label}" | |||
-P <publisher> Set a publisher for the disk" | |||
Default: '${iso_publisher}'" | |||
-A <application> Set an application name for the disk" | |||
Default: '${iso_application}'" | |||
-D <install_dir> Set an install_dir (directory inside iso)" | |||
Default: ${install_dir}" | |||
-w <work_dir> Set the working directory" | |||
Default: ${work_dir}" | |||
-o <out_dir> Set the output directory" | |||
Default: ${out_dir}" | |||
-v Enable verbose output" | |||
-h This help message" | |||
| |||
# PwOSS - ISO | |||
## Necessary modifications | |||
Boot into your Live ISO and change the script __before__ running it! | |||
`nano pwoss-server.sh` | |||
You NEED to change: | |||
1. `QDISKS="" # Select the number "1" OR "2". If you have more than 2 hard drives, select 2.` | |||
2. `ENCRYPTION="" # Select "YES" OR "NO" whether you want encryption or not.` | |||
That's the absolute minimum you have to change. Of course you can also change the passwords etc.. But stay between the 2 lines! | |||
> `############################# Change only between the 2 lines` | |||
| |||
### HDD or SSD | |||
If you are installing Arch on a HDD hard disk instead of an SSD hard disk, you must delete `root_trim=yes` from grub. | |||
With Encryption: | |||
`nano etc/default/grub-luks` | |||
> `GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:root root=/dev/vg0/root resume=/dev/vg0/swap root_trim=yes"` | |||
Without Encryption: | |||
`nano etc/default/grub` | |||
> `GRUB_CMDLINE_LINUX="root_trim=yes"` | |||
| |||
## Packages | |||
You can easily add or delete your own packages. Do __NOT__ delete from package `base` to `$MICROCODE` (inlcuding $MICROCODE). | |||
| |||
## Usage | |||
``` | |||
pwoss <[options]> -u [<username>] | |||
pwoss <[options]> --username=[<username>] | |||
Options: | |||
-h --help show this message | |||
-u --username set username e.g. $USERNAME | |||
-p --password set user password e.g. $PASSWORD | |||
-r --root-password set root password e.g. $PASSWORDROOT | |||
-e --encryption set encryption e.g. $ENCRYPTION | |||
-cr --crypt-root set root password e.g. $CRYPTPWDROOT | |||
-ch --crypt-home set home password e.g. $CRYPTPWDHOME | |||
-t --timezone set timezine e.g. $TIMEZONE | |||
-q --quantity-disks set numbers of hd e.g. $QDISKS | |||
-d --disk set install disk e.g. $HARDDISK | |||
-d2 --disk2 set home disk e.g. $HARDDISK2 | |||
``` | |||
| |||
## Install on Arch ISO | |||
Boot into any Arch Linux ISO and type the following: | |||
``` | |||
pacman -Sy git | |||
git clone https://git.pwoss.xyz/server/iso.git | |||
cd ISO/releng/airootfs/ | |||
sh pwoss-server.sh | |||
``` | |||
| |||
| |||
## License | |||
[GNU GENERAL PUBLIC LICENSE Version 2](https://git.pwoss.xyz/Server/ISO/src/branch/master/LICENSE) |
@ -0,0 +1 @@ | |||
archiso |
@ -0,0 +1 @@ | |||
LANG=en_US.UTF-8 |
@ -0,0 +1,7 @@ | |||
# The broadcom-wl package requires some modules to be disabled in order to use | |||
# wl. Since the ISO image needs to cover many hardware cases, this file | |||
# overrides the default blacklist in /usr/lib/modprobe.d/ | |||
# | |||
# If you need to use wl, you may need to delete this file, then `rmmod` any | |||
# already-loaded modules that are now blacklisted before proceeding to modprobe | |||
# wl itself. |
@ -0,0 +1,26 @@ | |||
#!/bin/bash | |||
get_cmdline() { | |||
local param | |||
for param in $(< /proc/cmdline); do | |||
case "${param}" in | |||
$1=*) echo "${param##*=}"; | |||
return 0 | |||
;; | |||
esac | |||
done | |||
} | |||
mirror=$(get_cmdline mirror) | |||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv) | |||
[[ $mirror ]] || exit 0 | |||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig | |||
cat >/etc/pacman.d/mirrorlist << EOF | |||
# | |||
# Arch Linux repository mirrorlist | |||
# Generated by archiso | |||
# | |||
Server = ${mirror%%/}/\$repo/os/\$arch | |||
EOF |
@ -0,0 +1,10 @@ | |||
[Unit] | |||
Description=Choose mirror from the kernel command line | |||
ConditionKernelCommandLine=mirror | |||
[Service] | |||
Type=oneshot | |||
ExecStart=/etc/systemd/scripts/choose-mirror | |||
[Install] | |||
WantedBy=multi-user.target |
@ -0,0 +1,8 @@ | |||
[Unit] | |||
Description=Temporary /etc/pacman.d/gnupg directory | |||
[Mount] | |||
What=tmpfs | |||
Where=/etc/pacman.d/gnupg | |||
Type=tmpfs | |||
Options=mode=0755 |
@ -0,0 +1,3 @@ | |||
[Service] | |||
ExecStart= | |||
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux |
@ -0,0 +1,15 @@ | |||
[Unit] | |||
Description=Initializes Pacman keyring | |||
Wants=haveged.service | |||
After=haveged.service | |||
Requires=etc-pacman.d-gnupg.mount | |||
After=etc-pacman.d-gnupg.mount | |||
[Service] | |||
Type=oneshot | |||
RemainAfterExit=yes | |||
ExecStart=/usr/bin/pacman-key --init | |||
ExecStart=/usr/bin/pacman-key --populate archlinux | |||
[Install] | |||
WantedBy=multi-user.target |
@ -0,0 +1 @@ | |||
ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service" |
@ -0,0 +1,34 @@ | |||
#!/bin/bash | |||
script_cmdline () | |||
{ | |||
local param | |||
for param in $(< /proc/cmdline); do | |||
case "${param}" in | |||
script=*) echo "${param#*=}" ; return 0 ;; | |||
esac | |||
done | |||
} | |||
automated_script () | |||
{ | |||
local script rt | |||
script="$(script_cmdline)" | |||
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then | |||
if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then | |||
wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null | |||
rt=$? | |||
else | |||
cp "${script}" /tmp/startup_script | |||
rt=$? | |||
fi | |||
if [[ ${rt} -eq 0 ]]; then | |||
chmod +x /tmp/startup_script | |||
/tmp/startup_script | |||
fi | |||
fi | |||
} | |||
if [[ $(tty) == "/dev/tty1" ]]; then | |||
automated_script | |||
fi |
@ -0,0 +1 @@ | |||
~/.automated_script.sh |
@ -0,0 +1,2 @@ | |||
bcfg boot add 1 fs0:/EFI/arch/grubx64.efi "Manually Added" | |||
exit |
@ -0,0 +1,23 @@ | |||
#!/bin/bash | |||
set -e -u | |||
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen | |||
locale-gen | |||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime | |||
usermod -s /usr/bin/zsh root | |||
cp -aT /etc/skel/ /root/ | |||
chmod 700 /root | |||
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config | |||
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist | |||
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf | |||
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf | |||
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf | |||
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf | |||
systemctl enable pacman-init.service choose-mirror.service | |||
systemctl set-default multi-user.target |
@ -0,0 +1,13 @@ | |||
# Configuration for encrypted block devices. | |||
# See crypttab(5) for details. | |||
# NOTE: Do not list your root (/) partition here, it must be set up | |||
# beforehand by the initramfs (/etc/mkinitcpio.conf). | |||
# <name> <device> <password> <options> | |||
# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1 | |||
# data1 /dev/sda3 /etc/mypassword2 | |||
# data2 /dev/sda5 /etc/cryptfs.key | |||
# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256 | |||
# vol /dev/sdb7 none | |||
home /dev/sdb1 /etc/luks-keys/home.bin |
@ -0,0 +1,55 @@ | |||
# GRUB boot loader configuration | |||
GRUB_DEFAULT=0 | |||
GRUB_TIMEOUT=0 | |||
GRUB_DISTRIBUTOR="Arch" | |||
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet" | |||
GRUB_CMDLINE_LINUX="root_trim=yes" | |||
# Preload both GPT and MBR modules so that they are not missed | |||
GRUB_PRELOAD_MODULES="part_gpt part_msdos" | |||
# Uncomment to enable booting from LUKS encrypted devices | |||
#GRUB_ENABLE_CRYPTODISK=y | |||
# Set to 'countdown' or 'hidden' to change timeout behavior, | |||
# press ESC key to display menu. | |||
GRUB_TIMEOUT_STYLE=menu | |||
# Uncomment to use basic console | |||
GRUB_TERMINAL_INPUT=console | |||
# Uncomment to disable graphical terminal | |||
#GRUB_TERMINAL_OUTPUT=console | |||
# The resolution used on graphical terminal | |||
# note that you can use only modes which your graphic card supports via VBE | |||
# you can see them in real GRUB with the command `vbeinfo' | |||
GRUB_GFXMODE=auto | |||
# Uncomment to allow the kernel use the same resolution used by grub | |||
GRUB_GFXPAYLOAD_LINUX=keep | |||
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter | |||
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" | |||
#GRUB_DISABLE_LINUX_UUID=true | |||
# Uncomment to disable generation of recovery mode menu entries | |||
GRUB_DISABLE_RECOVERY=true | |||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper | |||
# modes only. Entries specified as foreground/background. | |||
#GRUB_COLOR_NORMAL="light-blue/black" | |||
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" | |||
# Uncomment one of them for the gfx desired, a image background or a gfxtheme | |||
#GRUB_BACKGROUND="/path/to/wallpaper" | |||
#GRUB_THEME="/path/to/gfxtheme" | |||
# Uncomment to get a beep at GRUB start | |||
#GRUB_INIT_TUNE="480 440 1" | |||
# Uncomment to make GRUB remember the last selection. This requires to | |||
# set 'GRUB_DEFAULT=saved' above. | |||
#GRUB_SAVEDEFAULT="true" | |||
@ -0,0 +1,54 @@ | |||
# GRUB boot loader configuration | |||
GRUB_DEFAULT=0 | |||
GRUB_TIMEOUT=0 | |||
GRUB_DISTRIBUTOR="Arch" | |||
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet" | |||
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:root root=/dev/vg0/root resume=/dev/vg0/swap root_trim=yes" | |||
# Preload both GPT and MBR modules so that they are not missed | |||
GRUB_PRELOAD_MODULES="part_gpt part_msdos" | |||
# Uncomment to enable booting from LUKS encrypted devices | |||
#GRUB_ENABLE_CRYPTODISK=y | |||
# Set to 'countdown' or 'hidden' to change timeout behavior, | |||
# press ESC key to display menu. | |||
GRUB_TIMEOUT_STYLE=menu | |||
# Uncomment to use basic console | |||
GRUB_TERMINAL_INPUT=console | |||
# Uncomment to disable graphical terminal | |||
#GRUB_TERMINAL_OUTPUT=console | |||
# The resolution used on graphical terminal | |||
# note that you can use only modes which your graphic card supports via VBE | |||
# you can see them in real GRUB with the command `vbeinfo' | |||
GRUB_GFXMODE=auto | |||
# Uncomment to allow the kernel use the same resolution used by grub | |||
GRUB_GFXPAYLOAD_LINUX=keep | |||
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter | |||
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" | |||
#GRUB_DISABLE_LINUX_UUID=true | |||
# Uncomment to disable generation of recovery mode menu entries | |||
GRUB_DISABLE_RECOVERY=true | |||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper | |||
# modes only. Entries specified as foreground/background. | |||
#GRUB_COLOR_NORMAL="light-blue/black" | |||
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" | |||
# Uncomment one of them for the gfx desired, a image background or a gfxtheme | |||
#GRUB_BACKGROUND="/path/to/wallpaper" | |||
#GRUB_THEME="/path/to/gfxtheme" | |||
# Uncomment to get a beep at GRUB start | |||
#GRUB_INIT_TUNE="480 440 1" | |||
# Uncomment to make GRUB remember the last selection. This requires to | |||
# set 'GRUB_DEFAULT=saved' above. | |||
#GRUB_SAVEDEFAULT="true" |
@ -0,0 +1 @@ | |||
server |
@ -0,0 +1,3 @@ | |||
127.0.0.1 localhost | |||
::1 localhost | |||
127.0.0.1 server.localdomain server |
@ -0,0 +1,11 @@ | |||
LANG=en_US.UTF-8 | |||
LC_ADDRESS=en_US.UTF-8 | |||
LC_IDENTIFICATION=en_US.UTF-8 | |||
LC_MEASUREMENT=en_US.UTF-8 | |||
LC_MONETARY=en_US.UTF-8 | |||
LC_NAME=en_US.UTF-8 | |||
LC_NUMERIC=en_US.UTF-8 | |||
LC_PAPER=en_US.UTF-8 | |||
LC_TELEPHONE=en_US.UTF-8 | |||
LC_TIME=en_US.UTF-8 | |||
LC_ALL=en_US.UTF-8 |
@ -0,0 +1,515 @@ | |||
# Configuration file for locale-gen | |||
# | |||
# lists of locales that are to be generated by the locale-gen command. | |||
# | |||
# Each line is of the form: | |||
# | |||
# <locale> <charset> | |||
# | |||
# where <locale> is one of the locales given in /usr/share/i18n/locales | |||
# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps | |||
# | |||
# Examples: | |||
# en_US ISO-8859-1 | |||
# en_US.UTF-8 UTF-8 | |||
# de_DE ISO-8859-1 | |||
# de_DE@euro ISO-8859-15 | |||
# | |||
# The locale-gen command will generate all the locales, | |||
# placing them in /usr/lib/locale. | |||
# | |||
# A list of supported locales is included in this file. | |||
# Uncomment the ones you need. | |||
# Or add your locale at the bottom of the file. | |||
# | |||
#aa_DJ.UTF-8 UTF-8 | |||
#aa_DJ ISO-8859-1 | |||
#aa_ER UTF-8 | |||
#aa_ER@saaho UTF-8 | |||
#aa_ET UTF-8 | |||
#af_ZA.UTF-8 UTF-8 | |||
#af_ZA ISO-8859-1 | |||
#agr_PE UTF-8 | |||
#ak_GH UTF-8 | |||
#am_ET UTF-8 | |||
#an_ES.UTF-8 UTF-8 | |||
#an_ES ISO-8859-15 | |||
#anp_IN UTF-8 | |||
#ar_AE.UTF-8 UTF-8 | |||
#ar_AE ISO-8859-6 | |||
#ar_BH.UTF-8 UTF-8 | |||
#ar_BH ISO-8859-6 | |||
#ar_DZ.UTF-8 UTF-8 | |||
#ar_DZ ISO-8859-6 | |||
#ar_EG.UTF-8 UTF-8 | |||
#ar_EG ISO-8859-6 | |||
#ar_IN UTF-8 | |||
#ar_IQ.UTF-8 UTF-8 | |||
#ar_IQ ISO-8859-6 | |||
#ar_JO.UTF-8 UTF-8 | |||
#ar_JO ISO-8859-6 | |||
#ar_KW.UTF-8 UTF-8 | |||
#ar_KW ISO-8859-6 | |||
#ar_LB.UTF-8 UTF-8 | |||
#ar_LB ISO-8859-6 | |||
#ar_LY.UTF-8 UTF-8 | |||
#ar_LY ISO-8859-6 | |||
#ar_MA.UTF-8 UTF-8 | |||
#ar_MA ISO-8859-6 | |||
#ar_OM.UTF-8 UTF-8 | |||
#ar_OM ISO-8859-6 | |||
#ar_QA.UTF-8 UTF-8 | |||
#ar_QA ISO-8859-6 | |||
#ar_SA.UTF-8 UTF-8 | |||
#ar_SA ISO-8859-6 | |||
#ar_SD.UTF-8 UTF-8 | |||
#ar_SD ISO-8859-6 | |||
#ar_SS UTF-8 | |||
#ar_SY.UTF-8 UTF-8 | |||
#ar_SY ISO-8859-6 | |||
#ar_TN.UTF-8 UTF-8 | |||
#ar_TN ISO-8859-6 | |||
#ar_YE.UTF-8 UTF-8 | |||
#ar_YE ISO-8859-6 | |||
#ayc_PE UTF-8 | |||
#az_AZ UTF-8 | |||
#az_IR UTF-8 | |||
#as_IN UTF-8 | |||
#ast_ES.UTF-8 UTF-8 | |||
#ast_ES ISO-8859-15 | |||
#be_BY.UTF-8 UTF-8 | |||
#be_BY CP1251 | |||
#be_BY@latin UTF-8 | |||
#bem_ZM UTF-8 | |||
#ber_DZ UTF-8 | |||
#ber_MA UTF-8 | |||
#bg_BG.UTF-8 UTF-8 | |||
#bg_BG CP1251 | |||
#bhb_IN.UTF-8 UTF-8 | |||
#bho_IN UTF-8 | |||
#bho_NP UTF-8 | |||
#bi_VU UTF-8 | |||
#bn_BD UTF-8 | |||
#bn_IN UTF-8 | |||
#bo_CN UTF-8 | |||
#bo_IN UTF-8 | |||
#br_FR.UTF-8 UTF-8 | |||
#br_FR ISO-8859-1 | |||
#br_FR@euro ISO-8859-15 | |||
#brx_IN UTF-8 | |||
#bs_BA.UTF-8 UTF-8 | |||
#bs_BA ISO-8859-2 | |||
#byn_ER UTF-8 | |||
#ca_AD.UTF-8 UTF-8 | |||
#ca_AD ISO-8859-15 | |||
#ca_ES.UTF-8 UTF-8 | |||
#ca_ES ISO-8859-1 | |||
#ca_ES@euro ISO-8859-15 | |||
#ca_ES@valencia UTF-8 | |||
#ca_FR.UTF-8 UTF-8 | |||
#ca_FR ISO-8859-15 | |||
#ca_IT.UTF-8 UTF-8 | |||
#ca_IT ISO-8859-15 | |||
#ce_RU UTF-8 | |||
#chr_US UTF-8 | |||
#cmn_TW UTF-8 | |||
#crh_UA UTF-8 | |||
#cs_CZ.UTF-8 UTF-8 | |||
#cs_CZ ISO-8859-2 | |||
#csb_PL UTF-8 | |||
#cv_RU UTF-8 | |||
#cy_GB.UTF-8 UTF-8 | |||
#cy_GB ISO-8859-14 | |||
#da_DK.UTF-8 UTF-8 | |||
#da_DK ISO-8859-1 | |||
#de_AT.UTF-8 UTF-8 | |||
#de_AT ISO-8859-1 | |||
#de_AT@euro ISO-8859-15 | |||
#de_BE.UTF-8 UTF-8 | |||
#de_BE ISO-8859-1 | |||
#de_BE@euro ISO-8859-15 | |||
#de_CH.UTF-8 UTF-8 | |||
#de_CH ISO-8859-1 | |||
#de_DE.UTF-8 UTF-8 | |||
#de_DE ISO-8859-1 | |||
#de_DE@euro ISO-8859-15 | |||
#de_IT.UTF-8 UTF-8 | |||
#de_IT ISO-8859-1 | |||
#de_LI.UTF-8 UTF-8 | |||
#de_LU.UTF-8 UTF-8 | |||
#de_LU ISO-8859-1 | |||
#de_LU@euro ISO-8859-15 | |||
#doi_IN UTF-8 | |||
#dsb_DE UTF-8 | |||
#dv_MV UTF-8 | |||
#dz_BT UTF-8 | |||
#el_GR.UTF-8 UTF-8 | |||
#el_GR ISO-8859-7 | |||
#el_GR@euro ISO-8859-7 | |||
#el_CY.UTF-8 UTF-8 | |||
#el_CY ISO-8859-7 | |||
#en_AG UTF-8 | |||
#en_AU.UTF-8 UTF-8 | |||
#en_AU ISO-8859-1 | |||
#en_BW.UTF-8 UTF-8 | |||
#en_BW ISO-8859-1 | |||
#en_CA.UTF-8 UTF-8 | |||
#en_CA ISO-8859-1 | |||
#en_DK.UTF-8 UTF-8 | |||
#en_DK ISO-8859-1 | |||
#en_GB.UTF-8 UTF-8 | |||
#en_GB ISO-8859-1 | |||
#en_HK.UTF-8 UTF-8 | |||
#en_HK ISO-8859-1 | |||
#en_IE.UTF-8 UTF-8 | |||
#en_IE ISO-8859-1 | |||
#en_IE@euro ISO-8859-15 | |||
#en_IL UTF-8 | |||
#en_IN UTF-8 | |||
#en_NG UTF-8 | |||
#en_NZ.UTF-8 UTF-8 | |||
#en_NZ ISO-8859-1 | |||
#en_PH.UTF-8 UTF-8 | |||
#en_PH ISO-8859-1 | |||
#en_SC.UTF-8 UTF-8 | |||
#en_SG.UTF-8 UTF-8 | |||
#en_SG ISO-8859-1 | |||
#en_US.UTF-8 UTF-8 | |||
#en_US ISO-8859-1 | |||
#en_ZA.UTF-8 UTF-8 | |||
#en_ZA ISO-8859-1 | |||
#en_ZM UTF-8 | |||
#en_ZW.UTF-8 UTF-8 | |||
#en_ZW ISO-8859-1 | |||
#eo UTF-8 | |||
#es_AR.UTF-8 UTF-8 | |||
#es_AR ISO-8859-1 | |||
#es_BO.UTF-8 UTF-8 | |||
#es_BO ISO-8859-1 | |||
#es_CL.UTF-8 UTF-8 | |||
#es_CL ISO-8859-1 | |||
#es_CO.UTF-8 UTF-8 | |||
#es_CO ISO-8859-1 | |||
#es_CR.UTF-8 UTF-8 | |||
#es_CR ISO-8859-1 | |||
#es_CU UTF-8 | |||
#es_DO.UTF-8 UTF-8 | |||
#es_DO ISO-8859-1 | |||
#es_EC.UTF-8 UTF-8 | |||
#es_EC ISO-8859-1 | |||
#es_ES.UTF-8 UTF-8 | |||
#es_ES ISO-8859-1 | |||
#es_ES@euro ISO-8859-15 | |||
#es_GT.UTF-8 UTF-8 | |||
#es_GT ISO-8859-1 | |||
#es_HN.UTF-8 UTF-8 | |||
#es_HN ISO-8859-1 | |||
#es_MX.UTF-8 UTF-8 | |||
#es_MX ISO-8859-1 | |||
#es_NI.UTF-8 UTF-8 | |||
#es_NI ISO-8859-1 | |||
#es_PA.UTF-8 UTF-8 | |||
#es_PA ISO-8859-1 | |||
#es_PE.UTF-8 UTF-8 | |||
#es_PE ISO-8859-1 | |||
#es_PR.UTF-8 UTF-8 | |||
#es_PR ISO-8859-1 | |||
#es_PY.UTF-8 UTF-8 | |||
#es_PY ISO-8859-1 | |||
#es_SV.UTF-8 UTF-8 | |||
#es_SV ISO-8859-1 | |||
#es_US.UTF-8 UTF-8 | |||
#es_US ISO-8859-1 | |||
#es_UY.UTF-8 UTF-8 | |||
#es_UY ISO-8859-1 | |||
#es_VE.UTF-8 UTF-8 | |||
#es_VE ISO-8859-1 | |||
#et_EE.UTF-8 UTF-8 | |||
#et_EE ISO-8859-1 | |||
#et_EE.ISO-8859-15 ISO-8859-15 | |||
#eu_ES.UTF-8 UTF-8 | |||
#eu_ES ISO-8859-1 | |||
#eu_ES@euro ISO-8859-15 | |||
#fa_IR UTF-8 | |||
#ff_SN UTF-8 | |||
#fi_FI.UTF-8 UTF-8 | |||
#fi_FI ISO-8859-1 | |||
#fi_FI@euro ISO-8859-15 | |||
#fil_PH UTF-8 | |||
#fo_FO.UTF-8 UTF-8 | |||
#fo_FO ISO-8859-1 | |||
#fr_BE.UTF-8 UTF-8 | |||
#fr_BE ISO-8859-1 | |||
#fr_BE@euro ISO-8859-15 | |||
#fr_CA.UTF-8 UTF-8 | |||
#fr_CA ISO-8859-1 | |||
#fr_CH.UTF-8 UTF-8 | |||
#fr_CH ISO-8859-1 | |||
#fr_FR.UTF-8 UTF-8 | |||
#fr_FR ISO-8859-1 | |||
#fr_FR@euro ISO-8859-15 | |||
#fr_LU.UTF-8 UTF-8 | |||
#fr_LU ISO-8859-1 | |||
#fr_LU@euro ISO-8859-15 | |||
#fur_IT UTF-8 | |||
#fy_NL UTF-8 | |||
#fy_DE UTF-8 | |||
#ga_IE.UTF-8 UTF-8 | |||
#ga_IE ISO-8859-1 | |||
#ga_IE@euro ISO-8859-15 | |||
#gd_GB.UTF-8 UTF-8 | |||
#gd_GB ISO-8859-15 | |||
#gez_ER UTF-8 | |||
#gez_ER@abegede UTF-8 | |||
#gez_ET UTF-8 | |||
#gez_ET@abegede UTF-8 | |||
#gl_ES.UTF-8 UTF-8 | |||
#gl_ES ISO-8859-1 | |||
#gl_ES@euro ISO-8859-15 | |||
#gu_IN UTF-8 | |||
#gv_GB.UTF-8 UTF-8 | |||
#gv_GB ISO-8859-1 | |||
#ha_NG UTF-8 | |||
#hak_TW UTF-8 | |||
#he_IL.UTF-8 UTF-8 | |||
#he_IL ISO-8859-8 | |||
#hi_IN UTF-8 | |||
#hif_FJ UTF-8 | |||
#hne_IN UTF-8 | |||
#hr_HR.UTF-8 UTF-8 | |||
#hr_HR ISO-8859-2 | |||
#hsb_DE ISO-8859-2 | |||
#hsb_DE.UTF-8 UTF-8 | |||
#ht_HT UTF-8 | |||
#hu_HU.UTF-8 UTF-8 | |||
#hu_HU ISO-8859-2 | |||
#hy_AM UTF-8 | |||
#hy_AM.ARMSCII-8 ARMSCII-8 | |||
#ia_FR UTF-8 | |||
#id_ID.UTF-8 UTF-8 | |||
#id_ID ISO-8859-1 | |||
#ig_NG UTF-8 | |||
#ik_CA UTF-8 | |||
#is_IS.UTF-8 UTF-8 | |||
#is_IS ISO-8859-1 | |||
#it_CH.UTF-8 UTF-8 | |||
#it_CH ISO-8859-1 | |||
#it_IT.UTF-8 UTF-8 | |||
#it_IT ISO-8859-1 | |||
#it_IT@euro ISO-8859-15 | |||
#iu_CA UTF-8 | |||
#ja_JP.EUC-JP EUC-JP | |||
#ja_JP.UTF-8 UTF-8 | |||
#ka_GE.UTF-8 UTF-8 | |||
#ka_GE GEORGIAN-PS | |||
#kab_DZ UTF-8 | |||
#kk_KZ.UTF-8 UTF-8 | |||
#kk_KZ PT154 | |||
#kl_GL.UTF-8 UTF-8 | |||
#kl_GL ISO-8859-1 | |||
#km_KH UTF-8 | |||
#kn_IN UTF-8 | |||
#ko_KR.EUC-KR EUC-KR | |||
#ko_KR.UTF-8 UTF-8 | |||
#kok_IN UTF-8 | |||
#ks_IN UTF-8 | |||
#ks_IN@devanagari UTF-8 | |||
#ku_TR.UTF-8 UTF-8 | |||
#ku_TR ISO-8859-9 | |||
#kw_GB.UTF-8 UTF-8 | |||
#kw_GB ISO-8859-1 | |||
#ky_KG UTF-8 | |||
#lb_LU UTF-8 | |||
#lg_UG.UTF-8 UTF-8 | |||
#lg_UG ISO-8859-10 | |||
#li_BE UTF-8 | |||
#li_NL UTF-8 | |||
#lij_IT UTF-8 | |||
#ln_CD UTF-8 | |||
#lo_LA UTF-8 | |||
#lt_LT.UTF-8 UTF-8 | |||
#lt_LT ISO-8859-13 | |||
#lv_LV.UTF-8 UTF-8 | |||
#lv_LV ISO-8859-13 | |||
#lzh_TW UTF-8 | |||
#mag_IN UTF-8 | |||
#mai_IN UTF-8 | |||
#mai_NP UTF-8 | |||
#mfe_MU UTF-8 | |||
#mg_MG.UTF-8 UTF-8 | |||
#mg_MG ISO-8859-15 | |||
#mhr_RU UTF-8 | |||
#mi_NZ.UTF-8 UTF-8 | |||
#mi_NZ ISO-8859-13 | |||
#miq_NI UTF-8 | |||
#mjw_IN UTF-8 | |||
#mk_MK.UTF-8 UTF-8 | |||
#mk_MK ISO-8859-5 | |||
#ml_IN UTF-8 | |||
#mn_MN UTF-8 | |||
#mni_IN UTF-8 | |||
#mr_IN UTF-8 | |||
#ms_MY.UTF-8 UTF-8 | |||
#ms_MY ISO-8859-1 | |||
#mt_MT.UTF-8 UTF-8 | |||
#mt_MT ISO-8859-3 | |||
#my_MM UTF-8 | |||
#nan_TW UTF-8 | |||
#nan_TW@latin UTF-8 | |||
#nb_NO.UTF-8 UTF-8 | |||
#nb_NO ISO-8859-1 | |||
#nds_DE UTF-8 | |||
#nds_NL UTF-8 | |||
#ne_NP UTF-8 | |||
#nhn_MX UTF-8 | |||
#niu_NU UTF-8 | |||
#niu_NZ UTF-8 | |||
#nl_AW UTF-8 | |||
#nl_BE.UTF-8 UTF-8 | |||
#nl_BE ISO-8859-1 | |||
#nl_BE@euro ISO-8859-15 | |||
#nl_NL.UTF-8 UTF-8 | |||
#nl_NL ISO-8859-1 | |||
#nl_NL@euro ISO-8859-15 | |||
#nn_NO.UTF-8 UTF-8 | |||
#nn_NO ISO-8859-1 | |||
#nr_ZA UTF-8 | |||
#nso_ZA UTF-8 | |||
#oc_FR.UTF-8 UTF-8 | |||
#oc_FR ISO-8859-1 | |||
#om_ET UTF-8 | |||
#om_KE.UTF-8 UTF-8 | |||
#om_KE ISO-8859-1 | |||
#or_IN UTF-8 | |||
#os_RU UTF-8 | |||
#pa_IN UTF-8 | |||
#pa_PK UTF-8 | |||
#pap_AW UTF-8 | |||
#pap_CW UTF-8 | |||
#pl_PL.UTF-8 UTF-8 | |||
#pl_PL ISO-8859-2 | |||
#ps_AF UTF-8 | |||
#pt_BR.UTF-8 UTF-8 | |||
#pt_BR ISO-8859-1 | |||
#pt_PT.UTF-8 UTF-8 | |||
#pt_PT ISO-8859-1 | |||
#pt_PT@euro ISO-8859-15 | |||
#quz_PE UTF-8 | |||
#raj_IN UTF-8 | |||
#ro_RO.UTF-8 UTF-8 | |||
#ro_RO ISO-8859-2 | |||
#ru_RU.KOI8-R KOI8-R | |||
#ru_RU.UTF-8 UTF-8 | |||
#ru_RU ISO-8859-5 | |||
#ru_UA.UTF-8 UTF-8 | |||
#ru_UA KOI8-U | |||
#rw_RW UTF-8 | |||
#sa_IN UTF-8 | |||
#sah_RU UTF-8 | |||
#sat_IN UTF-8 | |||
#sc_IT UTF-8 | |||
#sd_IN UTF-8 | |||
#sd_IN@devanagari UTF-8 | |||
#se_NO UTF-8 | |||
#sgs_LT UTF-8 | |||
#shn_MM UTF-8 | |||
#shs_CA UTF-8 | |||
#si_LK UTF-8 | |||
#sid_ET UTF-8 | |||
#sk_SK.UTF-8 UTF-8 | |||
#sk_SK ISO-8859-2 | |||
#sl_SI.UTF-8 UTF-8 | |||
#sl_SI ISO-8859-2 | |||
#sm_WS UTF-8 | |||
#so_DJ.UTF-8 UTF-8 | |||
#so_DJ ISO-8859-1 | |||
#so_ET UTF-8 | |||
#so_KE.UTF-8 UTF-8 | |||
#so_KE ISO-8859-1 | |||
#so_SO.UTF-8 UTF-8 | |||
#so_SO ISO-8859-1 | |||
#sq_AL.UTF-8 UTF-8 | |||
#sq_AL ISO-8859-1 | |||
#sq_MK UTF-8 | |||
#sr_ME UTF-8 | |||
#sr_RS UTF-8 | |||
#sr_RS@latin UTF-8 | |||
#ss_ZA UTF-8 | |||
#st_ZA.UTF-8 UTF-8 | |||
#st_ZA ISO-8859-1 | |||
#sv_FI.UTF-8 UTF-8 | |||
#sv_FI ISO-8859-1 | |||
#sv_FI@euro ISO-8859-15 | |||
#sv_SE.UTF-8 UTF-8 | |||
#sv_SE ISO-8859-1 | |||
#sw_KE UTF-8 | |||
#sw_TZ UTF-8 | |||
#szl_PL UTF-8 | |||
#ta_IN UTF-8 | |||
#ta_LK UTF-8 | |||
#tcy_IN.UTF-8 UTF-8 | |||
#te_IN UTF-8 | |||
#tg_TJ.UTF-8 UTF-8 | |||
#tg_TJ KOI8-T | |||
#th_TH.UTF-8 UTF-8 | |||
#th_TH TIS-620 | |||
#the_NP UTF-8 | |||
#ti_ER UTF-8 | |||
#ti_ET UTF-8 | |||
#tig_ER UTF-8 | |||
#tk_TM UTF-8 | |||
#tl_PH.UTF-8 UTF-8 | |||
#tl_PH ISO-8859-1 | |||
#tn_ZA UTF-8 | |||
#to_TO UTF-8 | |||
#tpi_PG UTF-8 | |||
#tr_CY.UTF-8 UTF-8 | |||
#tr_CY ISO-8859-9 | |||
#tr_TR.UTF-8 UTF-8 | |||
#tr_TR ISO-8859-9 | |||
#ts_ZA UTF-8 | |||
#tt_RU UTF-8 | |||
#tt_RU@iqtelif UTF-8 | |||
#ug_CN UTF-8 | |||
#uk_UA.UTF-8 UTF-8 | |||
#uk_UA KOI8-U | |||
#unm_US UTF-8 | |||
#ur_IN UTF-8 | |||
#ur_PK UTF-8 | |||
#uz_UZ.UTF-8 UTF-8 | |||
#uz_UZ ISO-8859-1 | |||
#uz_UZ@cyrillic UTF-8 | |||
#ve_ZA UTF-8 | |||
#vi_VN UTF-8 | |||
#wa_BE ISO-8859-1 | |||
#wa_BE@euro ISO-8859-15 | |||
#wa_BE.UTF-8 UTF-8 | |||
#wae_CH UTF-8 | |||
#wal_ET UTF-8 | |||
#wo_SN UTF-8 | |||
#xh_ZA.UTF-8 UTF-8 | |||
#xh_ZA ISO-8859-1 | |||
#yi_US.UTF-8 UTF-8 | |||
#yi_US CP1255 | |||
#yo_NG UTF-8 | |||
#yue_HK UTF-8 | |||
#yuw_PG UTF-8 | |||
#zh_CN.GB18030 GB18030 | |||
#zh_CN.GBK GBK | |||
#zh_CN.UTF-8 UTF-8 | |||
#zh_CN GB2312 | |||
#zh_HK.UTF-8 UTF-8 | |||
#zh_HK BIG5-HKSCS | |||
#zh_SG.UTF-8 UTF-8 | |||
#zh_SG.GBK GBK | |||
#zh_SG GB2312 | |||
#zh_TW.EUC-TW EUC-TW | |||
#zh_TW.UTF-8 UTF-8 | |||
#zh_TW BIG5 | |||
#zu_ZA.UTF-8 UTF-8 | |||
#zu_ZA ISO-8859-1 | |||
### | |||
# | |||
# Locales enabled | |||
en_US.UTF-8 UTF-8 |
@ -0,0 +1,66 @@ | |||
# vim:set ft=sh | |||
# MODULES | |||
# The following modules are loaded before any boot hooks are | |||
# run. Advanced users may wish to specify all system modules | |||
# in this array. For instance: | |||
# MODULES=(piix ide_disk reiserfs) | |||
MODULES=() | |||
# BINARIES | |||
# This setting includes any additional binaries a given user may | |||
# wish into the CPIO image. This is run last, so it may be used to | |||
# override the actual binaries included by a given hook | |||
# BINARIES are dependency parsed, so you may safely ignore libraries | |||
BINARIES=() | |||
# FILES | |||
# This setting is similar to BINARIES above, however, files are added | |||
# as-is and are not parsed in any way. This is useful for config files. | |||
FILES=() | |||
# HOOKS | |||
# This is the most important setting in this file. The HOOKS control the | |||
# modules and scripts added to the image, and what happens at boot time. | |||
# Order is important, and it is recommended that you do not change the | |||
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for | |||
# help on a given hook. | |||
# 'base' is _required_ unless you know precisely what you are doing. | |||
# 'udev' is _required_ in order to automatically load modules | |||
# 'filesystems' is _required_ unless you specify your fs modules in MODULES | |||
# Examples: | |||
## This setup specifies all modules in the MODULES setting above. | |||
## No raid, lvm2, or encrypted root is needed. | |||
# HOOKS=(base) | |||
# | |||
## This setup will autodetect all modules for your system and should | |||
## work as a sane default | |||
# HOOKS=(base udev autodetect block filesystems) | |||
# | |||
## This setup will generate a 'full' image which supports most systems. | |||
## No autodetection is done. | |||
# HOOKS=(base udev block filesystems) | |||
# | |||
## This setup assembles a pata mdadm array with an encrypted root FS. | |||
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices. | |||
# HOOKS=(base udev block mdadm encrypt filesystems) | |||
# | |||
## This setup loads an lvm2 volume group on a usb device. | |||
# HOOKS=(base udev block lvm2 filesystems) | |||
# | |||
## NOTE: If you have /usr on a separate partition, you MUST include the | |||
# usr, fsck and shutdown hooks. | |||
HOOKS=(base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck) | |||
# COMPRESSION | |||
# Use this to compress the initramfs image. By default, gzip compression | |||
# is used. Use 'cat' to create an uncompressed image. | |||
#COMPRESSION="gzip" | |||
#COMPRESSION="bzip2" | |||
#COMPRESSION="lzma" | |||
#COMPRESSION="xz" | |||
#COMPRESSION="lzop" | |||
#COMPRESSION="lz4" | |||
# COMPRESSION_OPTIONS | |||
# Additional options for the compressor | |||
#COMPRESSION_OPTIONS=() |
@ -0,0 +1,14 @@ | |||
## | |||
## Arch Linux repository mirrorlist | |||
## Filtered by mirror score from mirror status page | |||
## Generated on 2019-08-01 | |||
## | |||
## Worldwide | |||
#Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch | |||
## New Zealand | |||
Server = http://mirror.fsmg.org.nz/archlinux/$repo/os/$arch | |||
Server = http://mirror.smith.geek.nz/archlinux/$repo/os/$arch | |||
@ -0,0 +1,97 @@ | |||
## sudoers file. | |||
## | |||
## This file MUST be edited with the 'visudo' command as root. | |||
## Failure to use 'visudo' may result in syntax or file permission errors | |||
## that prevent sudo from running. | |||
## | |||
## See the sudoers man page for the details on how to write a sudoers file. | |||
## | |||
## | |||
## Host alias specification | |||
## | |||
## Groups of machines. These may include host names (optionally with wildcards), | |||
## IP addresses, network numbers or netgroups. | |||
# Host_Alias WEBSERVERS = www1, www2, www3 | |||
## | |||
## User alias specification | |||
## | |||
## Groups of users. These may consist of user names, uids, Unix groups, | |||
## or netgroups. | |||
# User_Alias ADMINS = millert, dowdy, mikef | |||
## | |||
## Cmnd alias specification | |||
## | |||
## Groups of commands. Often used to group related commands together. | |||
# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \ | |||
# /usr/bin/pkill, /usr/bin/top | |||
# Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff | |||
## | |||
## Defaults specification | |||
## | |||
## You may wish to keep some of the following environment variables | |||
## when running commands via sudo. | |||
## | |||
## Locale settings | |||
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET" | |||
## | |||
## Run X applications through sudo; HOME is used to find the | |||
## .Xauthority file. Note that other programs use HOME to find | |||
## configuration files and this may lead to privilege escalation! | |||
# Defaults env_keep += "HOME" | |||
## | |||
## X11 resource path settings | |||
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH" | |||
## | |||
## Desktop path settings | |||
# Defaults env_keep += "QTDIR KDEDIR" | |||
## | |||
## Allow sudo-run commands to inherit the callers' ConsoleKit session | |||
# Defaults env_keep += "XDG_SESSION_COOKIE" | |||
## | |||
## Uncomment to enable special input methods. Care should be taken as | |||
## this may allow users to subvert the command being run via sudo. | |||
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER" | |||
## | |||
## Uncomment to use a hard-coded PATH instead of the user's to find commands | |||
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |||
## | |||
## Uncomment to send mail if the user does not enter the correct password. | |||
# Defaults mail_badpass | |||
## | |||
## Uncomment to enable logging of a command's output, except for | |||
## sudoreplay and reboot. Use sudoreplay to play back logged sessions. | |||
# Defaults log_output | |||
# Defaults!/usr/bin/sudoreplay !log_output | |||
# Defaults!/usr/local/bin/sudoreplay !log_output | |||
# Defaults!REBOOT !log_output | |||
## | |||
## Runas alias specification | |||
## | |||
## | |||
## User privilege specification | |||
## | |||
root ALL=(ALL) ALL | |||
## Uncomment to allow members of group wheel to execute any command | |||
%wheel ALL=(ALL) ALL | |||
## Same thing without a password | |||
# %wheel ALL=(ALL) NOPASSWD: ALL | |||
## Uncomment to allow members of group sudo to execute any command | |||
# %sudo ALL=(ALL) ALL | |||
## Uncomment to allow any user to run sudo if they know the password | |||
## of the user they are running the command as (root by default). | |||
# Defaults targetpw # Ask for the password of the target user | |||
# ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw' | |||
## Read drop-in files from /etc/sudoers.d | |||
## (the '#' here does not indicate a comment) | |||
#includedir /etc/sudoers.d |
@ -0,0 +1,2 @@ | |||
These files can be necessary after the installation. | |||
Reboot after the installation and start `sh pwoss-server-conf.sh`. It installs a bunch of software and set up the configurations for your server. `nano pwoss-server-conf.sh` if you want to change the software. |
@ -0,0 +1,45 @@ | |||
#!/bin/bash | |||
# | |||
####################################################################################################################### | |||
# | |||
# Installation script for Arch Linux. | |||
# With LUKS, LVM and other packages. | |||
# Further installation for other packages and configurations. | |||
# | |||
# Visit https://git.pwoss.xyz/server/iso for latest code and other details | |||
# | |||
############################ GPLv2 License | |||
# Copyright (C) 13 Sept 2019 Daniel Sundermann for https://git.pwoss.xyz/desktop/iso | |||
# This program is free software; you can redistribute it and/or modify it under | |||
# the terms of the GNU General Public License as published by the Free Software | |||
# Foundation; either version 2 of the License, or (at your option) any later | |||
# version. | |||
# This program is distributed in the hope that it will be useful, but WITHOUT | |||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
# You should have received a copy of the GNU General Public License along with | |||
# this program; if not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>. | |||
############################ GPLv2 License end | |||
# | |||
## AUR packages and configurations | |||
# | |||
PACKAGES="freshrss seahub adminer pi-hole-server downgrade etc-update" # AUR packages | |||
# AUR Helper - pikaur | |||
git clone https://aur.archlinux.org/pikaur.git | |||
cd pikaur/ | |||
makepkg -fsri --noconfirm | |||
cd .. | |||
rm -rf pikaur/ | |||
## Packages | |||
pikaur -S $PACKAGES --noconfirm | |||
echo "ALL DONE!" |
@ -0,0 +1,8 @@ | |||
View the Arch official installation guide online at | |||
https://wiki.archlinux.org/index.php/Installation_Guide | |||
Check PwOSS - Wiki guide at | |||
https://wiki.pwoss.xyz/content/desktop/arch | |||
Create an issue at PwOSS - Gitea if you run into any problems | |||
https://git.pwoss.xyz/desktop/iso/issues |
@ -0,0 +1,665 @@ | |||
#!/bin/bash | |||
# | |||
####################################################################################################################### | |||
# | |||
# Installation script for Arch Linux. | |||
# With LUKS, LVM, KDE and other packages. | |||
# | |||
# Visit https://git.pwoss.xyz/desktop/iso for latest code and other details | |||
# | |||
############################ GPLv2 License | |||
# Copyright (C) 11 Sept 2019 Modified by Daniel Sundermann for https://git.pwoss.xyz/desktop/iso | |||
# Copyright (C) 22 June 2019 Adam Charlton at https://git.pwoss.xyz/server/iso | |||
# This program is free software; you can redistribute it and/or modify it under | |||
# the terms of the GNU General Public License as published by the Free Software | |||
# Foundation; either version 2 of the License, or (at your option) any later | |||
# version. | |||
# This program is distributed in the hope that it will be useful, but WITHOUT | |||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
# You should have received a copy of the GNU General Public License along with | |||
# this program; if not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>. | |||
############################ GPLv2 License end | |||
############################# Change only between the 2 lines | |||
AUTO_REBOOT=true # Disable auto reboot 'false' | |||
# Mirror | |||
REFLECTOR="reflector --country Australia --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist" # Change country | |||
# Defaults | |||
## User | |||
USERNAME="pwoss" | |||
PASSWORD="pwoss" | |||
## Root user | |||
PASSWORDROOT="pwoss" | |||
## LUKS password | |||
CRYPTPWDROOT="pwoss" # Root partition | |||
CRYPTPWDHOME="pwoss" # Home partition (Also gets a LUKS key.) | |||
## Quantity of hard drives | |||
QDISKS="" # Select the number "1" OR "2". If you have more than 2 hard drives, select 2. | |||
## Choose encryption | |||
ENCRYPTION="" # Select "YES" OR "NO" whether you want encryption or not. | |||
## Timezone | |||
TIMEZONE="Pacific/Auckland" # Your timezone (Command='timedatectl list-timezones') | |||
## Microcode # More info at https://wiki.archlinux.org/index.php/Microcode | |||
#MICROCODE="amd-ucode" # AMD CPU (choose amd OR intel) | |||
#MICROCODE="intel-ucode" # Intel CPU (choose amd OR intel) | |||
## Packages | |||
PACKAGES="base base-devel grub efibootmgr linux-headers openssh sudo git ufw $MICROCODE bash-completion archiso cronie mariadb nginx php reflector" # Add or delete only pkgs after '$MICROCODE' | |||
## Enable services | |||
SERVICES="sshd ufw mariadb nginx php" | |||
############################# Change only between the 2 lines | |||
# Don't change anything further down. Only if you know what you are doing. | |||
## Disk/s | |||
### HDD / SSD | |||
HARDDISK="/dev/sda" # Boot (+efi) & root disk | |||
HARDDISK2="/dev/sdb" # Home disk | |||
### LUKS | |||
CRYPTDISKROOT="/dev/mapper/root" # Root LUKS partition | |||
CRYPTDISKHOME="/dev/mapper/home" # Home LUKS partition | |||
### LVM | |||
LVMDISKROOT="/dev/vg0/root" # Root LVM logical volume | |||
LVMSWAP="/dev/vg0/swap" # Swap LVM logical volume | |||
LVMDISKHOME="/dev/vg1/home" # Home LVM logical volume | |||
### /dev/sda & /dev/sdb | |||
EFI="${HARDDISK}1" # /dev/sda1 | |||
BOOT="${HARDDISK}1" # /dev/sda1 | |||
ROOT="${HARDDISK}2" # /dev/sda2 | |||
HOME="${HARDDISK2}1" # /dev/sdb1 | |||
## UEFI or BIOS | |||
MODE="" # It gets automatically detected. | |||
## CHROOT variable | |||
CHROOT="arch-chroot /mnt" | |||
## Command when we need to handle a verbose executed command that prompts for arguments | |||
CMD="sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/'" | |||
# Detect the system boot mode | |||
[ -d /sys/firmware/efi ] && MODE="UEFI" || MODE="BIOS" | |||
function usage() { | |||
cat <<EOF | |||
Usage: | |||
pwoss <[options]> -u [<username>] | |||
pwoss <[options]> --username=[<username>] | |||
Options: | |||
-h --help show this message | |||
-u --username set username e.g. $USERNAME | |||
-p --password set user password e.g. $PASSWORD | |||
-r --root-password set root password e.g. $PASSWORDROOT | |||
-e --encryption set encryption e.g. $ENCRYPTION | |||
-cr --crypt-root set root password e.g. $CRYPTPWDROOT | |||
-ch --crypt-home set home password e.g. $CRYPTPWDHOME | |||
-t --timezone set timezine e.g. $TIMEZONE | |||
-q --quantity-disks set numbers of hd e.g. $QDISKS | |||
-d --disk set install disk e.g. $HARDDISK | |||
-d2 --disk2 set home disk e.g. $HARDDISK2 | |||
EOF | |||
} | |||
# Handle user provided arguments | |||
while getopts u:p:t:d:h- option | |||
do | |||
case "${option}" | |||
in | |||
u) USERNAME=${OPTARG};; | |||
p) PASSWORD=${OPTARG};; | |||
r) PASSWORDROOT=${OPTARG};; | |||
e) ENCRYPTION=${OPTARG};; | |||
cr) CRYPTPWDROOT=${OPTARG};; | |||
ch) CRYPTPWDHOME==${OPTARG};; | |||
q) QDISKS==${OPTARG};; | |||
d) HARDDISK=${OPTARG};; | |||
d2) HARDDISK2=${OPTARG};; | |||
t) TIMEZONE=${OPTARG};; | |||
h) usage; exit;; | |||
-) [ $OPTIND -ge 1 ] && optind=$(expr $OPTIND - 1 ) || optind=$OPTIND | |||
eval option="\$$optind" | |||
if [[ $option == *['=']* ]] | |||
then | |||
case ${option%=*} in | |||
--username) USERNAME=${option##*=};; | |||
--password) PASSWORD=${option##*=};; | |||
--root-password) PASSWORDROOT=${option##*=};; | |||
--encryption) ENCRYPTION=${option##*=};; | |||
--crypt-root) CRYPTPWDROOT=${option##*=};; | |||
--crypt-home) CRYPTPWDHOME=${option##*=};; | |||
--timezone) TIMEZONE=${option##*=};; | |||
--quantity-disks) QDISKS=${option##*=};; | |||
--disk) HARDDISK=${option##*=};; | |||
--disk2) HARDDISK2=${option##*=};; | |||
--help) usage; exit;; | |||
*) usage; exit;; | |||
esac | |||
else | |||
echo "Invalid Syntax" | |||
usage | |||
exit | |||
fi | |||
OPTIND=1 | |||
shift | |||
;; | |||
esac | |||
done | |||
# Prompt user to run script | |||
while true; do | |||
cat << EOF | |||
Account Details: | |||
Username $USERNAME | |||
Password $PASSWORD | |||
Root password $PASSWORDROOT | |||
Encryption Details: | |||
Set up encryption $ENCRYPTION | |||
Password root partition $CRYPTPWDROOT | |||
Password home partition $CRYPTPWDHOME | |||
Install Options: | |||
Timezone $TIMEZONE | |||
Desktop ENV $DESKTOP | |||
Microcode $MICROCODE | |||
Quantity Disks $QDISKS | |||
Disk $HARDDISK | |||
Disk2 $HARDDISK2 | |||
Mode $MODE | |||
Note: | |||
Customize additional files in the ~/etc directory. All files are | |||
be copied to the new system after the base install is completed | |||
WARNING!!! | |||
Operation will erase all contents on $HARDDISK and $HARDDISK2 | |||
EOF | |||
read -p ":: Proceed with installation? [y/N]" yn | |||
case $yn in | |||
[Yy]*) break;; | |||
*) exit;; | |||
esac | |||
done | |||
### | |||
### Do not edit anything below this line | |||
### | |||
# Update the system clock | |||
timedatectl set-ntp true | |||
# Create partitions for UEFI/BIOS mode and 1/2 harddrive/s | |||
## EFI Mode & 2 Disk Installation | |||
if [[ $MODE == "UEFI" && $QDISKS == "2" ]] | |||
then | |||
### EFI & root partition | |||
eval $CMD << FDISK_CMDS | sudo fdisk $HARDDISK | |||
g # create new GPT partition | |||
n # add new partition | |||
1 # partition number | |||
# default - first sector | |||
+256MiB # partition size | |||
n # add new partition | |||
2 # partition number | |||
# default first sector | |||
# partition size | |||
t # change partition type | |||
1 # partition number | |||
1 # EFI partition code | |||
w # write partition table and exit | |||
FDISK_CMDS | |||
### Home partition | |||
eval $CMD << FDISK_CMDS | sudo fdisk $HARDDISK2 | |||
g # create new GPT partition | |||
n # add new partition | |||
1 # partition number | |||
# default - first sector | |||
# default - last sector | |||
w # write partition table and exit | |||
FDISK_CMDS | |||
### EFI Partition | |||
eval $CMD << MKFS_FAT_CMDS | mkfs.fat -F32 $EFI | |||
y | |||
MKFS_FAT_CMDS | |||
## BIOS Mode & 2 Disk Installation | |||
elif [[ $MODE == "BIOS" && $QDISKS == "2" ]] | |||
then | |||
### BOOT & root partition | |||
eval $CMD << FDISK_CMDS | sudo fdisk $HARDDISK | |||
o # create new DOS partition | |||
n # add new partition | |||
p # make primary partition | |||
1 # partition number | |||
# default - first sector | |||
+512MiB # partition size | |||
n # add new partition | |||
p # make primary partition | |||
2 # partition number | |||
# default - first sector | |||
# default - last sector | |||
t # change partition type | |||
1 # partition number | |||
a # BOOT partition code | |||
w # write partition table and exit | |||
FDISK_CMDS | |||
### Home partition | |||
eval $CMD << FDISK_CMDS | sudo fdisk $HARDDISK2 | |||
o # create new DOS partition | |||
n # add new partition | |||
p # make primary partition | |||
1 # partition number | |||
# default - first sector | |||
# default - last sector | |||
w # write partition table and exit | |||
FDISK_CMDS | |||
### Boot Partition | |||
eval $CMD << MKFS_FAT_CMDS | mkfs.ext4 $BOOT | |||
y | |||
MKFS_FAT_CMDS | |||
## EFI Mode & 1 Disk Installation | |||
elif [[ $MODE == "UEFI" && $QDISKS == "1" ]] | |||
then | |||
### EFI & root partition | |||
eval $CMD << FDISK_CMDS | sudo fdisk $HARDDISK | |||
g # create new GPT partition | |||
n # add new partition | |||
1 # partition number | |||
# default - first sector | |||
+256MiB # partition size | |||
n # add new partition | |||
2 # partition number | |||
# default first sector | |||
# partition size | |||
t # change partition type | |||
1 # partition number | |||
1 # EFI partition code | |||
w # write partition table and exit | |||
FDISK_CMDS | |||
### EFI Partition | |||
eval $CMD << MKFS_FAT_CMDS | mkfs.fat -F32 $EFI | |||
y | |||
MKFS_FAT_CMDS | |||
## BIOS Mode & 1 Disk Installation | |||
elif [[ $MODE == "BIOS" && $QDISKS == "1" ]] | |||
then | |||
### BOOT & root partition | |||
eval $CMD << FDISK_CMDS | sudo fdisk $HARDDISK | |||
o # create new DOS partition | |||
n # add new partition | |||
p # make primary partition | |||
1 # partition number | |||
# default - first sector | |||
+512MiB # partition size | |||
n # add new partition | |||
p # make primary partition | |||
2 # partition number | |||
# default - first sector | |||
# default - last sector | |||
t # change partition type | |||
1 # partition number | |||
a # BOOT partition code | |||
w # write partition table and exit | |||
FDISK_CMDS | |||
### Boot Partition | |||
eval $CMD << MKFS_FAT_CMDS | mkfs.ext4 $BOOT | |||
y | |||
MKFS_FAT_CMDS | |||
else | |||
echo "Unknown mode selected or disk/s stopping installation" | |||
exit | |||
fi | |||
# Set up encryption, LVM and mount partitions | |||
if [[ $ENCRYPTION == "YES" && $QDISKS == "2" ]] | |||
then | |||
## LUKS Encryption | |||
### Root Partition | |||
#### Encryption | |||
eval $CMD << CRYPTSETUP_CMDS | cryptsetup luksFormat --type luks2 $ROOT | |||
$CRYPTPWDROOT | |||
CRYPTSETUP_CMDS | |||
#### LUKS Open | |||
eval $CMD << CRYPTSETUP_CMDS | cryptsetup luksOpen $ROOT root | |||
$CRYPTPWDROOT | |||
CRYPTSETUP_CMDS | |||
### Home Partition | |||
#### Encryption | |||
eval $CMD << CRYPTSETUP_CMDS | cryptsetup luksFormat --type luks2 $HOME | |||
$CRYPTPWDHOME | |||
CRYPTSETUP_CMDS | |||
#### LUKS Open | |||
eval $CMD << CRYPTSETUP_CMDS | cryptsetup luksOpen $HOME home | |||
$CRYPTPWDHOME | |||
CRYPTSETUP_CMDS | |||
## LVM | |||
### Root Partition | |||
#### Create Phisical Volume | |||
pvcreate $CRYPTDISKROOT | |||
#### Create Volume Group | |||
vgcreate vg0 $CRYPTDISKROOT | |||
#### Create logical Volume | |||
lvcreate -L 4G vg0 -n swap | |||
lvcreate -l 100%FREE vg0 -n root | |||
#### Format root LVM logical volume | |||
eval $CMD << MKFS_FAT_CMDS | mkfs.ext4 $LVMDISKROOT | |||
y | |||
MKFS_FAT_CMDS | |||
#### Make swap | |||
mkswap $LVMSWAP | |||
### Home Partition | |||
#### Create Phisical Volume | |||
pvcreate $CRYPTDISKHOME | |||
#### Create Volume Group | |||
vgcreate vg1 $CRYPTDISKHOME | |||
#### Create logical Volume | |||
lvcreate -l 100%FREE vg1 -n home | |||
#### Format home LVM logical volume | |||
eval $CMD << MKFS_FAT_CMDS | mkfs.ext4 $LVMDISKHOME | |||
y | |||
MKFS_FAT_CMDS | |||
## Mount partitions | |||
### root and swap | |||
mount $LVMDISKROOT /mnt | |||
swapon $LVMSWAP | |||
### boot | |||
mkdir /mnt/boot | |||