Compare commits

..

9 Commits

Author SHA1 Message Date
3ed59855ea Added more distro info
fixed link

fixed link

fixed link
2025-12-14 16:53:00 -06:00
e54ec98017 Added information on package management 2025-12-14 16:17:30 -06:00
5c206e0d95 fixed typo 2025-12-14 14:08:18 -06:00
00f856ddd5 Adjusted headers 2025-12-14 14:05:56 -06:00
3795484fa2 Added bullet points 2025-12-14 14:03:51 -06:00
fcb8c8b56e Renamed Setup.md
Added ArchSetup
2025-12-14 14:00:51 -06:00
c660d3fd8d Removed old files 2025-12-14 13:56:21 -06:00
dd81aa72b8 Renamed files and further fixed links 2025-12-14 13:55:35 -06:00
98a2626c94 Fixed Links 2025-12-14 12:53:40 -06:00
6 changed files with 1 additions and 275 deletions

51
Arch.md
View File

@@ -8,21 +8,10 @@ tags:
## Package Management ## Package Management
### pacman ### pacman
#### Info
- The package manager for Arch distributions - The package manager for Arch distributions
- Graphical Software Management tools are not compatible and the command line must be used - Graphical Software Management tools are not compatible and the command line must be used
- It's worth checking the [Arch News](https://archlinux.org/news/) before running an update, or if you have any issues with an update. The Arch maintainers will always put known update issues there and how to resolve them.
- Due to the fast moving pace of Arch you should aim to update your system at least once per week
- It shouldn't be a problem if you take longer, but it helps minimize risk.
- It's usually smart to not do system updates right before you need the computer for an important task.
- [System Snapshots](ArchSetup.md#bootable-system-snapshots) can help reduce this issue by having the option to just rollback
#### Usage
- Packages are installed with `pacman -S <package>` - Packages are installed with `pacman -S <package>`
- `pacman -Syu` will update all the software on your system - `pacman -Syu` will update all the software on your system
- `pacman -Rs <package>` will uninstall a package and its otherwise unused dependencies
- `pacman -Qdtq | pacman -Rns -` will remove orphaned packages (was installed as a dependency but not longer needed as one)
- Check [this wiki page](https://wiki.archlinux.org/title/Pacman/Tips_and_tricks) for more tips
### pacnew ### pacnew
Sometimes while updating you system you may get a warning about a ".pacnew" file being created. Sometimes while updating you system you may get a warning about a ".pacnew" file being created.
@@ -54,43 +43,3 @@ This does mean that any issues are eventually caught, but as with any case of do
It is also a good idea to inspect the pkgbuild yourself, especially pay attention to the URLs within the file and ensure they are pointing to the correct place. It is also a good idea to inspect the pkgbuild yourself, especially pay attention to the URLs within the file and ensure they are pointing to the correct place.
Packages in the AUR are not offically supported or considered by the Arch Maintainers when pushing updates, so if anything on your system will break from an update, it's more likely to be an AUR package. Packages in the AUR are not offically supported or considered by the Arch Maintainers when pushing updates, so if anything on your system will break from an update, it's more likely to be an AUR package.
## System Recovery
### Snapshot Usage
For setup see [Snapshot Setup](ArchSetup.md#bootable-system-snapshots).
When you preform a system update a snapshots should automatically be created.
You can also manually create snapshots from the timeshift program.
In either case they can be booted into from GRUB, or activated in timeshift (see below).
If you boot into a snapshot or otherwise want to use a snapshot, first open timeshift and `restore` the snapshot you want to use (or are booted into) and then reboot.
This will properly restore the system to that snapshot.
### Chroot
In the case where a system is no longer bootable, it is possible to access and hopfully repair the system.
1. Create an Arch or Endeavour install media (Endeavour media has the bonus of being able to open a web browser at the time time)
2. Boot into the USB (you will need to disable secure boot if enabled)
3. From the console run `lsblk` to get a list of device and partition names names (sda, nvme0n1, ect with a trailing number for the partition number)
4. Determine your system partitions and mount them manually, in the case of Endeavour's btrfs install it would be done like so:
1. `mount -o subvol=@ /dev/nvme0n1p2 /mnt` (adjust to your actual disk name if different)
2. `mount -o subvol=@home /dev/nvme0n1p2 /mnt/home`
3. `arch-chroot /mnt`
4. `mount /efi` or `mount /boot/efi` depending on where your efi partition is
5. Begin to fix issues.
### Possible Issues
#### Broken GRUB
Sometimes you GRUB install can get messed up or removed, most commonly from Windows overwriting it.
Note: replace `esp` with the location of your efi partition (commonly `/efi` or `/boot/efi`)
First check if `grubx64.efi` still exists under `esp/EFI/...`, if it does, either delete it, or skip step 1
1. Reinstall GRUB with `grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB`
- If you are using secure boot with shim you will need to install GRUB with the needed modules per https://wiki.archlinux.org/title/GRUB#Shim-lock
- Then remember to resign GRUB with `sbsign --key /path/to/MOK.key --cert /path/to/MOK.crt --output esp/EFI/BOOT/grubx64.efi esp/EFI/BOOT/grubx64.efi`
2. Regenerate the GRUB config with `grub-mkconfig -o /boot/grub/grub.cfg`
#### Broken Kernel/initramfs
If GRUB loads but the kernel or initramfs don't and snapshots are not available you can reinstall the kernel (and regernate the initramfs) with `pacman -S linux`

View File

@@ -8,7 +8,6 @@ The wiki is wrong and your ${GRUB_MODULES} needs to be in ""
1. [Install grub following the shim-lock info ](https://wiki.archlinux.org/title/GRUB#Shim-lock) 1. [Install grub following the shim-lock info ](https://wiki.archlinux.org/title/GRUB#Shim-lock)
- If you do not have any drives with a ZFS filesystem, you should exclude the zfs* modules (As they require the ZFS [DKMS](https://wiki.archlinux.org/title/DKMS) Module) - If you do not have any drives with a ZFS filesystem, you should exclude the zfs* modules (As they require the ZFS [DKMS](https://wiki.archlinux.org/title/DKMS) Module)
2. Move `grubx64.efi` into the `esp/EFI/BOOT` directory and ensure is has that name. 2. Move `grubx64.efi` into the `esp/EFI/BOOT` directory and ensure is has that name.
- `esp` being your efi directory, usually `/efi` or `/boot/efi`
3. [Follow the steps to setup shim](https://wiki.archlinux.org/title/Secure_Boot#Set_up_shim) (shim with key), including the mkinicpio hook to automatically sign the kernel on update. 3. [Follow the steps to setup shim](https://wiki.archlinux.org/title/Secure_Boot#Set_up_shim) (shim with key), including the mkinicpio hook to automatically sign the kernel on update.
- If you are using EndeavourOS, you will need to install `mkinitcpio` and uninstall `dracut` and `eos-dracut` - If you are using EndeavourOS, you will need to install `mkinitcpio` and uninstall `dracut` and `eos-dracut`
4. [Generate the GRUB config file](https://wiki.archlinux.org/title/GRUB#Generate_the_main_configuration_file) 4. [Generate the GRUB config file](https://wiki.archlinux.org/title/GRUB#Generate_the_main_configuration_file)
@@ -16,23 +15,3 @@ The wiki is wrong and your ${GRUB_MODULES} needs to be in ""
5. Enable Secure Boot and import your MOK.cer into shim's MOK list. 5. Enable Secure Boot and import your MOK.cer into shim's MOK list.
**Note:** If you ever re-install the GRUB `grubx64.efi` file (to get a newer version of GRUB for example), make sure to do so with the modules as described above, and you will need to re-sign the file with `sbsign`. **Note:** If you ever re-install the GRUB `grubx64.efi` file (to get a newer version of GRUB for example), make sure to do so with the modules as described above, and you will need to re-sign the file with `sbsign`.
## Bootable System Snapshots
### Setup
**Note:** For the below to work Arch must be installed on a btrfs filesystem with seperate root (@) and home (@home) subvolumes. (This is the default for EndeavourOS when you select btrfs.) And you must be using GRUB as your bootloader.
1. Install the following packages:
- `btrfs-progs` - Utilies for btrfs
- `grub-btrfs` - automatically adds Snapshots to the GRUB menu
- `timeshift` - creates and manages snapshots
- `inotify-tools` - used by grub-btrfs to spot new snapshots
2. Open timeshift and go through the setup, I recommend not including @home in snapshots.
3. Run `sudo systemctl edit --full grub-btrfsd` and adjust the `ExecStart=` line to be `ExecStart=/usr/bin/grub-btrfsd --syslog --timeshift-auto`
4. Enable grub-btrfs with `sudo systemctl enable --now grub-btrfsd`
5. Install `timeshift-autosnap` from the AUR
6. Edit the timeshift-autosnap config as desired, but be sure to disable it updating GRUB and that will conflict with `grub-btrfs`
Note: If you want Timeshift's scheduled shapshots to happen you need to either enable cron with `sudo systemctl enable --now cronie.service`. Or install `timeshift-systemd-timer` from the AUR and enable the timers with `sudo systemctl enable --now timeshift-boot.timer && sudo systemctl enable --now timeshift-hourly.timer`
### Usage
See [Snapshot Usage](Arch.md#snapshot-usage)

View File

@@ -1,44 +0,0 @@
# Setup Boot to Windows
In a dual boot setup where the default boot is Linux, you may want to be able to directly reboot into Windows without having to manually interrupt your bootloader (like GRUB) or your UEFI boot priority.
## From Linux
1. `efibootmgr` will be required, so install that from your distro's package manager.
2. Create the file `/usr/local/bin/boot-windows` and put the following script into it: (source: Bazzite windows-boot script)
```sh
#!/bin/bash
# Look up the boot number for Windows in the EFI records
boot_number=$(echo $(efibootmgr) | grep -Po "(?<=Boot)\S{4}(?=( |\* )Windows)" | head -n1)
# Check that Windows EFI entry was found
if [ -z "$boot_number" ]; then
echo "Cannot find Windows boot in EFI, exiting"
exit 1
fi
# Set the next boot to be Windows and reboot the machine
sudo efibootmgr -n "${boot_number}" && reboot
```
3. Run `sudo chmod +x /usr/local/bin/boot-windows` to make the script executable.
4. To let `sudo efibootmgr` run without needing a password add the file `/etc/sudoers.d/efibootmgr-config` with the following text: (source: Bazzite)
```
%wheel ALL=(root) NOPASSWD: /usr/sbin/efibootmgr
```
5. Optionally create a button in your desktop environment that will run that script when clicked.
Note: if running this script does work but you have to manually trigger a reboot, you may need to edit the last part of the last line to be `sudo reboot` instead of just `reboot`
## From Windows
If you want to be able to reboot back into windows from windows without changing the boot order you will need to do the below:
1. Navigate to a Folder like your Documents folder or somewhere else out of the way.
2. Ensure you have enabled viewing file extensions, and create a new "Text Document" but rename it to `reboot-to-windows.bat`
3. Right-click on the file and Open in Notepad (or your text editor of choice) and add the following lines:
```
bcdedit /set {fwbootmgr} bootsequence {bootmgr}
shutdown /r /t 0
```
4. Save and close the file, then right-click on it and `More Options -> Create a Shortcut` to it.
5. Right-click the shortcut and click Properties. Then click `Advanced...` and check "Run as administrator"
6. Click OK and OK to exit out of those menus.
7. Rename that shortcut and move it as you please. When you run that shortcut you should reboot back into windows.

View File

@@ -1,102 +0,0 @@
---
tags:
- Arch
- Bazzite
---
## Important Notes
1. Make sure you can connect to the share using hostname.local. see [Local Host Names](LocalHostNames.md)
2. **If changing location of the scripts** you need to update the script name to match the path exactly
3. Replace `<server-name>` everywhere below with the name of your server
4. If running [Bazzite](Bazzite.md),  becuase of how fedora immutable distros are setup you need to use `/var/mnt`. the actual path is `/var/mnt` and `/mnt` is just linked to it.
## Create systemd mount file
Create a file called `.<server-name>-creds` in your home dir and set it so it's only readable by you like before.
Put
```
username=<username>
password=<password>
```
in the file
create the file `/etc/systemd/system/mnt-<servername>.mount`
(this will be mounted to `/mnt/<server-name>`)
In the file put the below:
```
[Unit]
Description=Mount SMB share <server-name>
# We require network connection before proceeding.
Requires=network-online.target
After=network-online.target systemd-resolved.service
Wants=network-online.target systemd-resolved.service
[Mount]
"What" is what will be mounted. ie our NAS SMB share
What=//<server-name>.local/<shared-folder>
# "Where" is where it will be mounted in the filesystem
Where=/mnt/<server-name>
Type=cifs
# Let the mounted filesystem be read/write-able
# Let the mounted filesystem be owned by the 'tess' user/group
# Use the specified credential file for the connection
Options=rw,uid=<uid>,gid=<gid>,nofail,credentials=/home/**username**/.<server-name>-creds
# Lets quit trying after 30 seconds
TimeoutSec=30
[Install]
WantedBy=multi-user.target
```
Also replace `uid=<uid>,gid=<gid>` with your user and group id respectively.
They will probably both be 1000 (so `uid=1000,gid=1000`), but you can check with `id` or `id **username**`
This is telling systemd how to mount your drive.
## Create systemd automount file
Now create the automount file `/etc/systemd/system/mnt-<server-name>.automount`
In that file put:
```
[Unit]
Description=Automount SMB share <server-name>
[Automount]
# Adjust mount location to match yours.
Where=/mnt/<server-name>
[Install]
WantedBy=multi-user.target`
```
## Test and Apply configuration
Now we want to make the directory it will be mounting to
`sudo mkdir /mnt/<server-name>`
Then we reload systemd
`sudo systemctl daemon-reload`
First we start the .mount, and check for errors
```
sudo systemctl start mnt-<server-name>.mount
systemctl status mnt-<server-name>.mount
```
Then if there's no issues we can stop the normal mount and enable automount
```
sudo systemctl stop mnt-<server-name>.mount
sudo systemctl enable --now mnt-<server-name>.automount
```
(`enable` means we are telling it to run on boot, and `--now` it telling it to also start it now)
We could just enable the normal mount and have it mount on boot, but automount will mean it will only connect to the samba drive when we try to access it.
Now we should see it show up under `/mnt/<server-name>`
And if we reboot it should show up still.
## Additional Notes
For reference Aiden based it off of  [This](https://www.reddit.com/r/SteamDeck/comments/ymjnjy/mounting_smb_shares_with_systemd/) this post, just modified to this situation and me

View File

@@ -1,34 +0,0 @@
# How to create an install media
## From Windows
1. Install [rufus](https://rufus.ie)
2. Select the desired device **ensure it is the correct device, all data will be DELETED**
3. On the right side click `SELECT` and select the desired .iso file
4. Re-verify correct device and click `START`
Note, for linux iso files select dd mode when prompted.
## From Linux
### For linux .iso
1. use `lsblk` or other methods to determine correct device, such as `sda`
2. **Ensure it is the correct device, all data will be DELETED**
3. Ensure the device is not mounted
4. run `sudo pv -Y -o /dev/sda /path/to/iso` where `sda` is the desired storage device
### For Windows install .iso
1. use `lsblk` or other methods to determine correct device, such as `sda`
2. **Ensure it is the correct device, all data will be DELETED**
3. Ensure the device is not mounted
4. run `sudo wipefs -a /dev/sda` where sda is the desired device **all data will be deleted**
5. Use a partition tool such as `cfdisk` to create 2 partitions, the first one will be 2GB big, the other will use the rest of the space.
6. Assuming the disk is sda (replace to match yours) run
- `sudo mkfs.fat -F 32 /dev/sda1`
- `sudo mkfs.exfat /dev/sda2` exfat-utils may need to be installed
7. Mount the iso file to access it
1. `sudo mkdir /media/windows-iso`
2. `sudo mount /path/to/iso /media/windows-iso`
8. Mount both partitions
1. `sudo mkdir /media/win-boot && sudo mkdir /media/win-data`
2. `sudo mount /dev/sda1 /media/win-boot && sudo mount /dev/sda2 /media/win-data`
9. Copy everything from `/media/windows-iso` **except** for `sources` folder to `/media/win-boot`
10. Create a `sources` in `/media/win-boot` and copy over `/media/windows-iso/sources/boot.wim` into it.
11. Copy everything from `/media/windows-iso/` into `/media/win-data`
12. Unmount everything, USB should now function as a windows install media

View File

@@ -25,29 +25,7 @@ You tell it what software you want, it'll download it and all its dependencies a
- Flatpak programs can be installed system-wide or just for a single user. - Flatpak programs can be installed system-wide or just for a single user.
- There have been no known cases of malware from flathub, but the usual disclaimers of downloading programs applies. - There have been no known cases of malware from flathub, but the usual disclaimers of downloading programs applies.
- Flatpak packages are often maintained by community members. - Flatpak packages are often maintained by community members.
- "Verified" only means that the developers of that software are the ones maintaining that package. - "Verified" only means that the devlopers of that software are the ones maintaining that package.
### Graphical Package Management
There are a number of graphical programs that allow you to install, update and otherwise manage the software on your computer.
They still use your package manager to preform actions under the hood, but they provide a nice graphical interface to do so.
#### Discover
Discover by KDE is the graphical software manager for KDE Plasma Desktop.
Adding Flatpak support and the Flathub software repository may be desirable for desktop users, especially on a distribution like debian where all the software tends to stay on older versions for the sake of absolute stability.
There is also a number of programs that may not be packaged by your linux distribution, and may only be available through flathub.
You can add Flatpak support and the Flathub repository with the following steps (tested on debian 13):
1. Open Discover and select the Settings tab
2. At the bottom under "Missing Backends" click the install button next to the "Integrates Flatpak Applications into Discover"
3. Once the install is complete you can close and reopen Discover.
4. At the top of settings you should now see "Add Flathub" on the top-right, if not log out and back in. Click this button.
5. Log out and back in, or restart. You should now see flatpak apps, and have the option to install the flatpak version of exisiting apps.
6. If you wish, under settings you can select "Make Default" next to Flatpak, to always install from flatpak when available.
Note: Flathub packages are not verified for usability or security by the debian maintainers. This is usually not any issue, but something to be aware of. See [above](#flatpak) for more info.
## Immutable OS ## Immutable OS
There are now some Linux Distrobutions which are refered to as "Immutable" There are now some Linux Distrobutions which are refered to as "Immutable"