From 35de97d950cae3900bf3765c2e40d89e5d52b599 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Sat, 4 Jan 2025 14:24:44 -0500 Subject: Initial install instructions concept, file tweaks, remove direct compression in build config --- build.sh | 3 +- build.sh~ | 3 ++ files/.exrc | 8 ++++ index.md | 111 ++++++++++++++++++++++++++++++++++++++++-- index.md~ | 118 +++++++++++++++++++++++++++++++++++++++++++++ public/index.html | 133 +++++++++++++++++++++++++++++++++++++++++++++++++-- public/index.html.gz | Bin 642 -> 0 bytes public/style.css.gz | Bin 559 -> 0 bytes 8 files changed, 367 insertions(+), 9 deletions(-) create mode 100644 build.sh~ create mode 100644 files/.exrc create mode 100644 index.md~ delete mode 100644 public/index.html.gz delete mode 100644 public/style.css.gz diff --git a/build.sh b/build.sh index 313f5a8..a3d3920 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,2 @@ # ! /bin/sh -(cat _header.html; multimarkdown index.md; cat _footer.html) > public/index.html -find public -type f \( -name "*.html" -o -name "*.css" \) -exec gzip -k -f {} \; \ No newline at end of file +(cat _header.html; multimarkdown index.md; cat _footer.html) > public/index.html \ No newline at end of file diff --git a/build.sh~ b/build.sh~ new file mode 100644 index 0000000..313f5a8 --- /dev/null +++ b/build.sh~ @@ -0,0 +1,3 @@ +# ! /bin/sh +(cat _header.html; multimarkdown index.md; cat _footer.html) > public/index.html +find public -type f \( -name "*.html" -o -name "*.css" \) -exec gzip -k -f {} \; \ No newline at end of file diff --git a/files/.exrc b/files/.exrc new file mode 100644 index 0000000..3c3f804 --- /dev/null +++ b/files/.exrc @@ -0,0 +1,8 @@ +set showmatch +set autoindent +set number +set ruler +set tabstop=4 +set shiftwidth=4 +set expandtab +set ignorecase diff --git a/index.md b/index.md index 1a32d71..ab34d63 100644 --- a/index.md +++ b/index.md @@ -1,12 +1,117 @@ -Setup OpenBSD as a daily driver using only the included, base programs. +Setup OpenBSD as a daily driver using only the included, core programs. Based on OpenBSD 7.6. --- {{TOC}} -## Getting Started +## Requirements -Coming soon... +- USB device +- Ethernet connection (with active internet) +- A cup of coffee + +The real requirements are having patience and a passion for keeping things minimal. It's important to remeber that this setup isn't the most user-friendly. There will be no config files to edit or download in this guide. We will be using the `xenodm` login manager paired with the default stacked window manager `fvwm`. And that's it. + +You have been warned! + +## Installation + +Make sure you have the latest OpenBSD image formatted on a USB device (or burned to a CD if that's your cup of tea!) and that your computer/laptop is set to boot from USB via the BIOS. Also make sure you are connected to the internet via ethernet cable (don't worry, we'll setup WiFi in a minute!) + +Boot into the device and input the following when guided through the installer: + +1. Boot from USB +2. Choose `Install` +3. Keyboard layout: `us` +4. Hostname: `x220` (or whatever you choose) +5. Network: `em0` +6. IPv4: `autoconf` +7. IPv6: `none` +8. Network interface: `done` +9. Password for root +10. Start sshd by default? `yes` +11. X Window System start with xenodm? `no` +12. Setup user? `username` (follow setup user steps) +13. Allow root ssh login? `no` +14. Timezone +15. Which disk? Use internal (`sd0` etc.) +16. Encrypt root disk? `no` +17. Use `WHOLE` disk +18. Use `AUTO` layout +19. Which disk to initialize: `done` +20. Location of sets: `http` +21. HTTP Proxy URL? `none` +22. HTTP Server? `1` (Toronto) +23. Confirm again +24. Server directory? `pub/OpenBSD/7.6/amd64` +25. Set names? `done` +26. Drink some coffee while it verifies (depends on network speed) +27. Location of sets? `done` +28. Congrats! +29. Reboot and remove USB device + +## First Boot Tweaks + +### User Permissions + +Before we do anything, we should give our main user full access via `doas`. Login as `root` and run the following: + + su - + echo "permit nopass :wheel" >> /etc/doas.conf + +Now you can logout or reboot the machine. + + doas reboot + +Running any of the commands might present you with a permissions error. If that happens, simply add `doas` to the start of every command. + +### Firmware + +Once your machine reboots, login as your created user. The next steps will help you ensure you have the latest firmware. + +Simply run the command: `fw_update` + + +### WiFi + +To enable wifi on your device, run the following command (filling in the proper details where need be) + + ifconfig iwn0 up + ifconfig iwn0 scan + echo "join WIFI-NAME wpakey PASSPHRASE" >> /etc/hostname.iwn0 + echo "dhcp" >> /etc/hostname.iwn0 + echo "inet6 autoconf" >> /etc/hostname.iwn0 + echo "up powersave" >> /etc/hostname.iwn0 + dhclient iwn0 + +Take note of the `iwn0`, as this might differ on your machine. (You can check this by running `ifconfig`) + +You might also need to run `doas sh /etc/netstart` after. + + +### Performance Boost + +This step is optional and targeted towards devices with batteries (laptops, IoT devices etc). Properly setup apmd: + + rcctl enable apmd + rcctl set apmd flags -A + rcctl start apmd + +## Login Manager + +Remember when we chose `No` when the installer asked us "X Window System start with xenodm?". Well, now we want to enable that before our next reboot: + + doas rcctl enable xenodm + +Now reboot your device again. + + doas reboot + +## The First *Real* Login + +## Configs + +Okay, I *know* I said there wouldn't be any configs included in this guide. Frankly, you should be having zero problems working with all those defaults now that you've run through this guide! BUT - I wanted to include some *very minor* configuration tweaks that might make things a little more intuitive for newcomers. Feel free to ignore these entirely! ## Contribute diff --git a/index.md~ b/index.md~ new file mode 100644 index 0000000..37ba1d7 --- /dev/null +++ b/index.md~ @@ -0,0 +1,118 @@ +Setup OpenBSD as a daily driver using only the included, base programs. Based on OpenBSD 7.6. + +--- + +{{TOC}} + +## Requirements + +- USB device +- Ethernet connection (with active internet) +- A cup of coffee + +The real requirements are having patience and a passion for keeping things minimal. It's important to remeber that this setup isn't the most user-friendly. There will be no config files to edit or download in this guide. We will be using the `xenodm` login manager paired with the default stacked window manager `fvwm`. And that's it. + +You have been warned! + +## Installation + +Make sure you have the latest OpenBSD image formatted on a USB device (or burned to a CD if that's your cup of tea!) and that your computer/laptop is set to boot from USB via the BIOS. Also make sure you are connected to the internet via ethernet cable (don't worry, we'll setup WiFi in a minute!) + +Boot into the device and input the following when guided through the installer: + +1. Boot from USB +2. Choose `Install` +3. Keyboard layout: `us` +4. Hostname: `x220` (or whatever you choose) +5. Network: `em0` +6. IPv4: `autoconf` +7. IPv6: `none` +8. Network interface: `done` +9. Password for root +10. Start sshd by default? `yes` +11. X Window System start with xenodm? `no` +12. Setup user? `username` (follow setup user steps) +13. Allow root ssh login? `no` +14. Timezone +15. Which disk? Use internal (`sd0` etc.) +16. Encrypt root disk? `no` +17. Use `WHOLE` disk +18. Use `AUTO` layout +19. Which disk to initialize: `done` +20. Location of sets: `http` +21. HTTP Proxy URL? `none` +22. HTTP Server? `1` (Toronto) +23. Confirm again +24. Server directory? `pub/OpenBSD/7.6/amd64` +25. Set names? `done` +26. Drink some coffee while it verifies (depends on network speed) +27. Location of sets? `done` +28. Congrats! +29. Reboot and remove USB device + +## First Boot Tweaks + +### User Permissions + +Before we do anything, we should give our main user full access via `doas`. Login as `root` and run the following: + + su - + echo "permit nopass :wheel" >> /etc/doas.conf + +Now you can logout or reboot the machine. + + doas reboot + +Running any of the commands might present you with a permissions error. If that happens, simply add `doas` to the start of every command. + +### Firmware + +Once your machine reboots, login as your created user. The next steps will help you ensure you have the latest firmware. + +Simply run the command: `fw_update` + + +### WiFi + +To enable wifi on your device, run the following command (filling in the proper details where need be) + + ifconfig iwn0 up + ifconfig iwn0 scan + echo "join WIFI-NAME wpakey PASSPHRASE" >> /etc/hostname.iwn0 + echo "dhcp" >> /etc/hostname.iwn0 + echo "inet6 autoconf" >> /etc/hostname.iwn0 + echo "up powersave" >> /etc/hostname.iwn0 + dhclient iwn0 + +Take note of the `iwn0`, as this might differ on your machine. (You can check this by running `ifconfig`) + +You might also need to run `doas sh /etc/netstart` after. + + +### Performance Boost + +This step is optional and targeted towards devices with batteries (laptops, IoT devices etc). Properly setup apmd: + + rcctl enable apmd + rcctl set apmd flags -A + rcctl start apmd + +## Login Manager + +Remember when we chose `No` when the installer asked us "X Window System start with xenodm?". Well, now we want to enable that before our next reboot: + + doas rcctl enable xenodm + +Now reboot your device again. + + doas reboot + +## The First *Real* Login + +## Configs + +Okay, I *know* I said there wouldn't be any configs included in this guide. Frankly, you should be having zero problems working with all those defaults now that you've run through this guide! BUT - I wanted to include some *very minor* configuration tweaks that might make things a little more intuitive for newcomers. Feel free to ignore these entirely! + +## Contribute + +I'm far from an OpenBSD expert! Please [help improve this project](https://git.sr.ht/~bt/openbased)! diff --git a/public/index.html b/public/index.html index 3296cb9..89335cd 100644 --- a/public/index.html +++ b/public/index.html @@ -11,21 +11,146 @@

OpenBASED


-

Setup OpenBSD as a daily driver using only the included, base programs.

+

Setup OpenBSD as a daily driver using only the included, core programs. Based on OpenBSD 7.6.


-

Getting Started

+

Requirements

+ + + +

The real requirements are having patience and a passion for keeping things minimal. It’s important to remeber that this setup isn’t the most user-friendly. There will be no config files to edit or download in this guide. We will be using the xenodm login manager paired with the default stacked window manager fvwm. And that’s it.

+ +

You have been warned!

+ +

Installation

+ +

Make sure you have the latest OpenBSD image formatted on a USB device (or burned to a CD if that’s your cup of tea!) and that your computer/laptop is set to boot from USB via the BIOS. Also make sure you are connected to the internet via ethernet cable (don’t worry, we’ll setup WiFi in a minute!)

+ +

Boot into the device and input the following when guided through the installer:

+ +
    +
  1. Boot from USB
  2. +
  3. Choose Install
  4. +
  5. Keyboard layout: us
  6. +
  7. Hostname: x220 (or whatever you choose)
  8. +
  9. Network: em0
  10. +
  11. IPv4: autoconf
  12. +
  13. IPv6: none
  14. +
  15. Network interface: done
  16. +
  17. Password for root
  18. +
  19. Start sshd by default? yes
  20. +
  21. X Window System start with xenodm? no
  22. +
  23. Setup user? username (follow setup user steps)
  24. +
  25. Allow root ssh login? no
  26. +
  27. Timezone
  28. +
  29. Which disk? Use internal (sd0 etc.)
  30. +
  31. Encrypt root disk? no
  32. +
  33. Use WHOLE disk
  34. +
  35. Use AUTO layout
  36. +
  37. Which disk to initialize: done
  38. +
  39. Location of sets: http
  40. +
  41. HTTP Proxy URL? none
  42. +
  43. HTTP Server? 1 (Toronto)
  44. +
  45. Confirm again
  46. +
  47. Server directory? pub/OpenBSD/7.6/amd64
  48. +
  49. Set names? done
  50. +
  51. Drink some coffee while it verifies (depends on network speed)
  52. +
  53. Location of sets? done
  54. +
  55. Congrats!
  56. +
  57. Reboot and remove USB device
  58. +
+ +

First Boot Tweaks

+ +

User Permissions

+ +

Before we do anything, we should give our main user full access via doas. Login as root and run the following:

+ +
su -
+echo "permit nopass :wheel" >> /etc/doas.conf
+
+ +

Now you can logout or reboot the machine.

+ +
doas reboot
+
+ +

Running any of the commands might present you with a permissions error. If that happens, simply add doas to the start of every command.

+ +

Firmware

+ +

Once your machine reboots, login as your created user. The next steps will help you ensure you have the latest firmware.

+ +

Simply run the command: fw_update

+ +

WiFi

+ +

To enable wifi on your device, run the following command (filling in the proper details where need be)

+ +
ifconfig iwn0 up
+ifconfig iwn0 scan
+echo "join WIFI-NAME wpakey PASSPHRASE" >> /etc/hostname.iwn0
+echo "dhcp" >> /etc/hostname.iwn0
+echo "inet6 autoconf" >> /etc/hostname.iwn0
+echo "up powersave" >> /etc/hostname.iwn0
+dhclient iwn0
+
+ +

Take note of the iwn0, as this might differ on your machine. (You can check this by running ifconfig)

+ +

You might also need to run doas sh /etc/netstart after.

+ +

Performance Boost

+ +

This step is optional and targeted towards devices with batteries (laptops, IoT devices etc). Properly setup apmd:

+ +
rcctl enable apmd
+rcctl set apmd flags -A
+rcctl start apmd
+
+ +

Login Manager

+ +

Remember when we chose No when the installer asked us “X Window System start with xenodm?”. Well, now we want to enable that before our next reboot:

+ +
doas rcctl enable xenodm
+
+ +

Now reboot your device again.

+ +
doas reboot
+
+ +

The First Real Login

+ +

Configs

-

Coming soon…

+

Okay, I know I said there wouldn’t be any configs included in this guide. Frankly, you should be having zero problems working with all those defaults now that you’ve run through this guide! BUT - I wanted to include some very minor configuration tweaks that might make things a little more intuitive for newcomers. Feel free to ignore these entirely!

Contribute

diff --git a/public/index.html.gz b/public/index.html.gz deleted file mode 100644 index 6a85762..0000000 Binary files a/public/index.html.gz and /dev/null differ diff --git a/public/style.css.gz b/public/style.css.gz deleted file mode 100644 index 7e43e1b..0000000 Binary files a/public/style.css.gz and /dev/null differ -- cgit v1.2.3-70-g09d2