Site Tools


start:howtoinstall

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start:howtoinstall [2023/08/28 19:41] peterstart:howtoinstall [2024/01/24 19:45] (current) peter
Line 1: Line 1:
 +DATE CHECKED THIS PAGE WAS VALID: 28/08/2023
 +
 Overview: Having fun on Debian will mean we are installing Testing Branch so we get the latest most awesome software while using BTRFS. To accommodate security deficiencies in Testing we will be using a containerized version of Firefox as the default browser (and using chromium as a secondary browser for occasional emergency use). Snap security is very good, excellent even, and as the web is the main point of entry for malicious things for your install, this should be considered to prevent any issues (please don't complain you don't like snap, make your own arrangement in that case). By default Debian comes with the .deb version of Firefox ESR which is excellent but if there is a security bug in the testing branch there can be a delay before a patch arrives. In addition we will also secure a firewall on the local install (see later on in the guide). Once web is secure and a firewall is on you should be good to go so long as you don't ever run commands you saw on the internet you didn't understand, or that came outside of the official repositories. Don't make the mistake of adding repositories from 3rd parties, these can be very risky and in most cases you can use a different method, like flatpak,snap build from source etc. If you do have to, it probably means you need to log a feature request or bug to improve Debian. Overview: Having fun on Debian will mean we are installing Testing Branch so we get the latest most awesome software while using BTRFS. To accommodate security deficiencies in Testing we will be using a containerized version of Firefox as the default browser (and using chromium as a secondary browser for occasional emergency use). Snap security is very good, excellent even, and as the web is the main point of entry for malicious things for your install, this should be considered to prevent any issues (please don't complain you don't like snap, make your own arrangement in that case). By default Debian comes with the .deb version of Firefox ESR which is excellent but if there is a security bug in the testing branch there can be a delay before a patch arrives. In addition we will also secure a firewall on the local install (see later on in the guide). Once web is secure and a firewall is on you should be good to go so long as you don't ever run commands you saw on the internet you didn't understand, or that came outside of the official repositories. Don't make the mistake of adding repositories from 3rd parties, these can be very risky and in most cases you can use a different method, like flatpak,snap build from source etc. If you do have to, it probably means you need to log a feature request or bug to improve Debian.
 +
 +Note: Two video guides from YT creators showing a differing perspective / alternate view on how to do this is shown here: https://www.youtube.com/watch?v=MoWApyUb5w8 and here (using snapper instead of timeshift): https://www.youtube.com/watch?v=b4vTKg-qW_0
 +
 +Note 2: This guide purposefully leaves @home broken so this can be show, how to fix afterwards. This is crucial if you are not versed in btrfs and snapshots so you can develop an understanding how these subvolumes work, and can be manipulated. If you do understand you should be able to resolve during the setup, the creation of @home yourself. However if you cant complete the steps on your own, then following Step2, then Step3 will bring you into the understanding you need and resolve the @home missing. Its split purposefully over 2 Steps so you can learn and gain a better understanding.
  
 ==== Ventoy ==== ==== Ventoy ====
Line 197: Line 203:
 btrfs subvol list . btrfs subvol list .
 Old Debian 11 command: Old Debian 11 command:
-mount -o defaults,compress=lzo,autodefrag,space_cache,subvolid=258 /dev/vda3 /target+mount -o defaults,compress=lzo,space_cache,subvolid=258 /dev/vda3 /target
 New Debian 12 command: New Debian 12 command:
-mount -o defaults,compress=lzo,autodefrag,space_cache=v2,subvol=@ /dev/vda3 /target/+mount -o defaults,compress=lzo,space_cache=v2,subvol=@ /dev/vda3 /target/
 </code> </code>
  
Line 230: Line 236:
 I cant easily show you the edits as it spans more than the screen but all I did was edit the fstab options to: I cant easily show you the edits as it spans more than the screen but all I did was edit the fstab options to:
  
-defaults,noatime,compress=lzo,autodefrag,discard=async,space_cache=v2,subvol=@ (edit the @ at the end from @rootfs that no longer exxists). +defaults,noatime,compress=lzo,discard=async,space_cache=v2,subvol=@ (edit the @ at the end from @rootfs that no longer exxists). 
  
 Note: Dont forget if you opted to use space_cache=v2 you must continue to use that or it wont mount (space_cache=v2 is newer and better, suggest Debian12 users use this). Note: Dont forget if you opted to use space_cache=v2 you must continue to use that or it wont mount (space_cache=v2 is newer and better, suggest Debian12 users use this).
Line 244: Line 250:
  
 **EXAMPLE LINE: **EXAMPLE LINE:
-UUID=383732b1-5e87-4b68-a15a-f044bc559877 /               btrfs   defaults,noatime,compress=lzo,autodefrag,discard=async,space_cache=v2,subvol=@ 0       1+UUID=383732b1-5e87-4b68-a15a-f044bc559877 /               btrfs   defaults,noatime,compress=lzo,discard=async,space_cache=v2,subvol=@ 0       1
 ** **
  
Line 268: Line 274:
 Debian desktop environment, GNOME, SSH server, standard system utils. Then continue when those 4 things are selected (or choose others if you require). Debian desktop environment, GNOME, SSH server, standard system utils. Then continue when those 4 things are selected (or choose others if you require).
  
-Then the installer just runs along and does its thing. Really basic to be honest. Once its done, it moves onto installing the GRUB boot loader. Select that option. It will sometimes moan about efi or some rubbish about not booting just ignore it and say no when it wants to install to removable media paths. That's for losers, and we are winners who don't do that.+Then the installer just runs along and does its thing. Really basic to be honest. Once its done, it moves onto installing the GRUB boot loader. Select that option. It will sometimes moan about efi or some rubbish about not booting just ignore it and **say no when it wants to install to removable media paths**. That's for losers, and we are winners who don't do that. You can update NVRAM variables though. If you have another OS you can also probe for it or not if you don't..
  
 Next is finish the installation. Select that. It asks about setting the clock so do that, and we are done. It wants to reboot so make sure you remove the install media and reboot like it tells you. Next is finish the installation. Select that. It asks about setting the clock so do that, and we are done. It wants to reboot so make sure you remove the install media and reboot like it tells you.
Line 276: Line 282:
 Next section in the guide here (or go back to the start page by clicking on the logo on this page at the top left): Next section in the guide here (or go back to the start page by clicking on the logo on this page at the top left):
 [[Start:Timeshift|How To Install Timeshift And Snapshot The Disk And Then Revert Any Problems Really Fast(And Be Cool)]]  [[Start:Timeshift|How To Install Timeshift And Snapshot The Disk And Then Revert Any Problems Really Fast(And Be Cool)]] 
-==== Ubuntu ==== 
- 
-The procedure for installing Ubuntu Testing is directly from the ISO on cdimage. This is very easy to do. Lets see what we need to complete this. Instructions assume this will be your only OS (not dual boot). 
- 
-Step 1: Follow Ventoy steps above and ensure UEFI is enabled and secure boot is off. As mentioned secure boot needs to temporarily be off to install, but afterwards can be turned on if you use Windows or Ubuntu. Debian has a little trouble still if you have proprietary drivers so your mileage may vary. 
- 
-You will then get to the stage where you boot into the relevant ISO using Ventoy and Step 2 continues from this point. It should be easy but essentially all you are doing is getting Ventoy working and booting from the relevant ISO file you wish to install from. 
- 
-Step 2: Boot the ISO and select Ubuntu.  
- 
-{{:images:ubuntubooting.png|}} 
-{{:images:ubuntuinstall2.png|}} 
- 
-Note how we see 2 different installers. It is important you see the UEFI settings option or you are booting into legacy mode. We dont use legacy mode around here, so fix it if you have not done so. Do not install in legacy mode. Install in UEFI mode. 
- 
-Step 3: Once into Ubuntus' setup (takes a while to boot) we will choose Install Ubuntu and then the usual settings like language etc. For simple stuff I wont bother with a screenshot. Just make sure you do a normal install and tick the install 3rd party software option. If you use Ubuntu, Secure boot works great. You can tick the secure boot option and set a password. This password is used by your BIOS when rebooting. If you didn't enable secure boot you can enable it later on its no big deal. 
- 
-On the Partition settings where it suggests erase disk and install Ubuntu just choose something else so we can manage our own partition sizes. 
- 
-My disk is called /dev/vda so I will click "new partition table" and then in the free space do the following: 
-1GB (1024MB) EFI partition first. 
-A swap partition equal to double the amount of RAM in the system (8GB - 8192MB in my case for this VM). 
-The rest a btrfs for / OR if you have a nice big disk you can make 512GB for / and the rest an ext4 filesystem for VM disk images etc as BTRFS is not the best for those kind of files. 
- 
-Either way it will look something like this: 
- 
-{{:images:installubupart.png|}} 
- 
-Next you will need to select the correct location for the bootloader or the system will not boot. From the screenshot you see I chose /dev/vda in my case. You will select the appropriate location for your setup (likely different). 
-Click Install now and then continue, choose your timezone then type your Account info. Don't forget to call your PC name something cool, like Nightwing or something. 
- 
-Once it is installed you can reboot and remove the USB/ISO and move on to the next thing in the guide. Ubuntu has a very easy install to be honest. It truly is a testament to how much time the Ubuntu developers have put into making Ubuntu for everyone. Very nice! 
- 
-To add the same performance improvements for BTRFS as we did in Debian just edit the fstab and add them: 
- 
-<code> 
-sudo nano /etc/fstab 
-</code> 
- 
-Here you see that on line 9 and 13 I have added 'compress=lzo,autodefrag,space_cache' to the options. Don't add ssd option anymore for btrfs - it is depreciated. 
- 
-Addendum: Please note - btrfs space_cache is now replaced by a newer version space_cache=v2. If you see “space_cache” it can be replaced with “space_cache=v2” instead. Once its upgraded to v2 you cant mount the fs with just space_cache anymore so be aware and consistent in what you use or it will appear like you broke it (but actually just mounted with the wrong one). 
- 
-{{:images:btrfstune.png|}} 
- 
-Once you reboot they will take effect. 
- 
-If the system does not boot (I got this with Ubuntu for some reason), then it didn't like space_cache being v1. Its not a big deal, just choose 'advanced options for ubuntu' during grub boot and move the highlight to a kernel with (recovery mode) next to it. Once one is highlighted press 'e' and change the 'ro' to 'rw' (read only to read write). Also remain consistant in using space_cache=v2 if you use that. 
- 
-{{:images:rwchange.png|}} 
- 
-Then press f10 after making that single change to boot. Then drop to the root shell prompt on the purple screen (press enter after it tells you), and type: 
- 
-<code> 
-nano /etc/fstab 
-</code> 
- 
-Now where you had previously just 'space_cache' change it to 'space_cache=v2' (ie add =v2 on there): 
- 
-{{:images:cachev2.png|}} 
- 
-ctrl -x and enter to save. 
- 
-Type reboot to reboot. System should reboot fine. If not you can revert all the edits you made in fstab to try find what is breaking the system. 
- 
-When a system breaks, you can fix it as you can see. So a broken system is just a challenge, not something to stress you out! Fixing Linux is fun! There is actually a way to clear the space cache in BTRFS. See if you can clear it and mount the filesystem with just 'space_cache' in the fstab and get it booting. Its a fun little project for you to do if you want to learn. Or come back to it when you feel more confident in Linux. Thats ok too. Note: space_cache=v2 is the newer option and should be used when possible. 
- 
  
  
  
start/howtoinstall.1693251687.txt.gz · Last modified: 2023/08/28 19:41 by peter