Arch Linux: Difference between revisions
No edit summary |
m Text replacement - "<code>" to "{{code|" |
||
| Line 35: | Line 35: | ||
# Create a file system | # Create a file system | ||
# Mount the file system to /mnt | # Mount the file system to /mnt | ||
# Run | # Run {{code|pacstrap /mnt/base</code> | ||
# Generate fstab | # Generate fstab {{code|genfstab -p /mnt >> /mnt/etc/fstab</code> | ||
# Chroot into the new system | # Chroot into the new system {{code|arch-chroot /mnt</code> | ||
# Set the hostname | # Set the hostname {{code|echo "hostname" >> /etc/hostname</code> | ||
# Set the timezone | # Set the timezone {{code|ln -sf /usr/share/zoneinfo/America/Edmonton /etc/localtime</code> | ||
# Locales | # Locales | ||
#* Comment out any locales you want in | #* Comment out any locales you want in {{code|/etc/locale.gen</code> | ||
#* Run | #* Run {{code|locale-gen</code> | ||
# Set the default locale | # Set the default locale {{code|echo LANG=\"en_US.UTF-8\" > /etc/locale.conf</code> | ||
# Set up networking configs ?? | # Set up networking configs ?? | ||
# Console font | # Console font {{code|/etc/vconsole.conf</code> | ||
#* echo KEYMAP=\"us\" > /etc/vconsole.conf | #* echo KEYMAP=\"us\" > /etc/vconsole.conf | ||
#* echo FONT=\"latarcyrheb-sun16\" >> /etc/vconsole.conf | #* echo FONT=\"latarcyrheb-sun16\" >> /etc/vconsole.conf | ||
# Rebuild ram disk | # Rebuild ram disk {{code|mkinitcpio -p linux</code> | ||
# Set the root password | # Set the root password {{code|passwd</code> | ||
# Install a bootloader | # Install a bootloader | ||
#* pacman -Sy grub | #* pacman -Sy grub | ||
#* | #* {{code|grub-install --target=i386-pc --recheck /dev/sda</code> | ||
#* | #* {{code|grub-mkconfig -o /boot/grub/grub.cfg</code> | ||
| Line 61: | Line 61: | ||
You may use systemd to configure the network | You may use systemd to configure the network | ||
/etc/systemd/network | /etc/systemd/network | ||
Create a file named | Create a file named {{code|wired.network</code> with: | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
[Match] | [Match] | ||
| Line 75: | Line 75: | ||
== Building Packages == | == Building Packages == | ||
Install the | Install the {{code|base-devel</code> package group. | ||
To build packages, create a PKGBUILD script. Run this as a non-root user. | To build packages, create a PKGBUILD script. Run this as a non-root user. | ||
| Line 81: | Line 81: | ||
=== 'Converting' RPM to an ArchLinux package === | === 'Converting' RPM to an ArchLinux package === | ||
Install the | Install the {{code|rpmextract</code> package. | ||
Use the spec to pkgbuild script to convert the RPM SPEC files to a packagebuild script. | Use the spec to pkgbuild script to convert the RPM SPEC files to a packagebuild script. | ||
| Line 90: | Line 90: | ||
# Create a new directory | # Create a new directory | ||
# Copy all packages to the directory | # Copy all packages to the directory | ||
# Run: | # Run: {{code|repo-add reponame.db.tar.gz *.xz | ||
Use the URL to the directory as the repository location. Make sure that the reponame matches that of the database. | Use the URL to the directory as the repository location. Make sure that the reponame matches that of the database. | ||
Revision as of 19:12, 24 February 2017
PXE
If you already have a PXE server, create a new entry that boots their iPXE kernel:
cd /tftpboot/images/ArchLinux/ wget https://releng.archlinux.org/pxeboot/ipxe.lkrn
The default config (or the config your computer boots off of) should contain:
LABEL ArchLinux
MENU LABEL ArchLinux
kernel /images/ArchLinux/ipxe.lkrn
You can customize the kernel to automate installs.
Installation
The PXE rom that you can download from ArchLinux's website points iPXE to fetch PXE data from a remote HTTP server, http://releng.archlinux.org/pxeboot/boot/cfg/. The PXE configs will then boot the live image from one of the many available mirrors that is selected in the boot menu.
Remastering
Side Note: You may alter the iPXE script to use a different server by recompiling the iPXE kernel and automate the install process by appending to the airoot customize script.
pacman -S archiso cp -r /usr/share/archiso/configs/releng /root # edit relang/airootfs/root/custom* ./build.sh -v
mkarchiso -w work/x86_64 -C work/pacman.conf -D arch init arch-chroot work/x86_64/airootfs mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img mksquashfs work/airootfs.img work/iso/arch/x86_64/airootfs.sfs -noappend -comp xz -no-progress
Steps
After booting into the live image, you need to:
- Read the install.txt file
- Create a file system
- Mount the file system to /mnt
- Run {{code|pacstrap /mnt/base
- Generate fstab {{code|genfstab -p /mnt >> /mnt/etc/fstab
- Chroot into the new system {{code|arch-chroot /mnt
- Set the hostname {{code|echo "hostname" >> /etc/hostname
- Set the timezone {{code|ln -sf /usr/share/zoneinfo/America/Edmonton /etc/localtime
- Locales
- Comment out any locales you want in {{code|/etc/locale.gen
- Run {{code|locale-gen
- Set the default locale {{code|echo LANG=\"en_US.UTF-8\" > /etc/locale.conf
- Set up networking configs ??
- Console font {{code|/etc/vconsole.conf
- echo KEYMAP=\"us\" > /etc/vconsole.conf
- echo FONT=\"latarcyrheb-sun16\" >> /etc/vconsole.conf
- Rebuild ram disk {{code|mkinitcpio -p linux
- Set the root password {{code|passwd
- Install a bootloader
- pacman -Sy grub
- {{code|grub-install --target=i386-pc --recheck /dev/sda
- {{code|grub-mkconfig -o /boot/grub/grub.cfg
Reboot and hope it works.
Networking
You may use systemd to configure the network
/etc/systemd/network
Create a file named {{code|wired.network with:
[Match]
Name=eno1
[Network]
DHCP=v4
You may need to get a list of all network interfaces using:
networkctl list | tail -n+2 | head -n+2 | grep -v loopback | awk '{print $2}'
Building Packages
Install the {{code|base-devel package group.
To build packages, create a PKGBUILD script. Run this as a non-root user.
makepkg -p buildscript.pkgbuild
'Converting' RPM to an ArchLinux package
Install the {{code|rpmextract package.
Use the spec to pkgbuild script to convert the RPM SPEC files to a packagebuild script.
Creating a repository
Creating a repository is very simple and comprises of making a directory which contains a database file with a bunch of packages.
- Create a new directory
- Copy all packages to the directory
- Run: {{code|repo-add reponame.db.tar.gz *.xz
Use the URL to the directory as the repository location. Make sure that the reponame matches that of the database.
Package List
gnome-desktop nvidia-304xx-libgl lightdm lightdm-gtk-greeter qt dmidecode accountsservices salt-zmq
Mirroring
rsync -rtlH --delete-after --exclude='*i686*' --delay-updates --copy-links --safe-links --max-delete=1000 --progress rsync://mirror.csclub.uwaterloo.ca/archlinux/community .