Difference between revisions of "User:Pnoecker/Undead USB Install"

From Funtoo
Jump to navigation Jump to search
m (hijacked cat command from LFS manuals =D)
m (removing gparted hot garbage, remove nomodeset deletion from before multi kernel entries, remove xfce4 because i can link to that later along with cinnamon and other DE's)
Line 48: Line 48:
###i## echo "tmpfs /run tmpfs rw,nodev,nosuid 0 0" >> /etc/fstab
###i## echo "tmpfs /run tmpfs rw,nodev,nosuid 0 0" >> /etc/fstab
###i## echo 'hostname="undead"' > /etc/conf.d/hostname
###i## echo 'hostname="undead"' > /etc/conf.d/hostname
###i## ego sync && emerge jfsutils grub haveged linux-firmware discord-bin firefox-bin media-fonts/noto}}
###i## ego sync && emerge jfsutils grub haveged linux-firmware discord-bin firefox-bin media-fonts/noto eix}}
 
you can also install [[Package:Brave]]


funtoo's official chat:
funtoo's official chat:
Line 75: Line 77:
###i## ego profile mix-in -gfxcard-nvidia}}
###i## ego profile mix-in -gfxcard-nvidia}}


remove nomodeset from /etc/boot.conf and change timeout to 0
If you're having problems with nouveau not playing sound over HDMI restart pulse audio:
{{console|body=
###i## nano /etc/boot.conf}}
 
 
If you're having problems with nouveau not playing sound over HDMI emerge pavucontrol:


{{console|body=
{{console|body=
###i## emerge pavucontrol}}
###i## ps aux | grep -i pulse
###i## kill -n 9 26543}}


to fix the clock to eastern standard time:
to fix the clock to eastern standard time:
Line 89: Line 87:
###i## rm /etc/localtime
###i## rm /etc/localtime
###i## ln -s /usr/share/zoneinfo/America/Detroit /etc/localtime}}
###i## ln -s /usr/share/zoneinfo/America/Detroit /etc/localtime}}


The magic words to update:
The magic words to update:
Line 96: Line 93:
###i## emerge -av --depclean
###i## emerge -av --depclean
###i## ego boot update}}
###i## ego boot update}}


every so often you will want to purge sources to keep the stick as low memory usage as possible
every so often you will want to purge sources to keep the stick as low memory usage as possible
Line 105: Line 101:
###i## rm /var/cache/portage/distfiles/*.tar.gz
###i## rm /var/cache/portage/distfiles/*.tar.gz
}}
}}
==Xfce4==
to install from a minimal tarball and build up xfce4 the merge commands are
{{console|body=
###i## ego profile flavor desktop
###i## ego profile mix-in xfce
###i## emerge alsa-utils xfce4-meta xorg-x11 networkmanager
}}
==gparted==
you can emerge gparted, and use funtoo undead usb instructions to install funtoo on another usb, or deploy to an actual hard drive.
{{console|body=
###i## emerge gparted}}


==further securing==
==further securing==
i use a sudo user, disable root login, & have a 1tb home partition for my home theater massive media storage.
i use [[Package:Sudo]], and disable root login.
[[Package:Sudo]]


i use dnsmasq to block advertising, and cache dns traffic to accelerate web browsing.
i use [[Package:Dnsmasq]] to block advertising, and cache DNS traffic to accelerate web browsing.
[[Package:Dnsmasq]]


i use dnscrypt proxy to encrypt all dns requests so 100% of the web traffic from my undead stick is encrypted.  
i use [[Package:Dnscrypt]] to encrypt all dns requests so the vast majority of the web traffic from my undead usb is encrypted.  
[[Package:Dnscrypt]]


==eix==
==Admining==


use eix to browse portage to see packages you can emerge.
use [[Package:Eix]] to browse portage to see packages you can emerge.


[[Package:Eix]]
use [[Package:Eselect]] to set various system options.
 
==eselect==
 
use eselect to set various system options
 
[[Package:Eselect]]
 
==Browser==
emerge firefox-bin or install brave
[[Package:Brave]]


==Branding==
==Branding==
add fortunes piped through cowsay to the shells
{{console|body=
###i## emerge fortune-mod cowsay
###i## cd && echo "fortune {{!}} cowsay" >> .bashrc
}}


{{console|body=
{{console|body=
Line 158: Line 121:
}}
}}


==Alternate Drives==
add fortunes piped through cowsay to the shells
I have a jfs home drive labeled HOME.  This is the fstab entry to have funtoo use my rotating hard drive as /home


{{console|body=
{{console|body=
###i## echo "LABEL=HOME /home jfs noatime 0 2" >> /etc/fstab
###i## emerge fortune-mod cowsay
###i## cd && echo "fortune {{!}} cowsay" >> .bashrc
}}
}}
==Swapping by file==
under construction, turning swapping back on with a swap file!
https://wiki.archlinux.org/index.php/swap#Swap_file
LOL arch does my cyber chores for me while i build this section.


==Disable DPMS==
==Disable DPMS==
Line 191: Line 148:
EndSection
EndSection
}}
}}
==Alternate Drives==
{{warning|avoid adding fstab entries for drives that will not be present on other computers.  JFS will mount read only if fsck fails!}}
I have a jfs home drive labeled HOME.  This is the fstab entry to have funtoo use my rotating hard drive as /home
{{console|body=
###i## echo "LABEL=HOME /home jfs noatime 0 2" >> /etc/fstab
}}
==Swapping by file==
under construction, turning swapping back on with a swap file!
https://wiki.archlinux.org/index.php/swap#Swap_file
LOL arch does my cyber chores for me while i build this section.


==windows 10 utc==
==windows 10 utc==

Revision as of 09:45, October 15, 2020

A linux nomadbsd alternative

   Tip

GPT for everybody, see Talk:Undead_USB_Install for a uEFI forward compatible install

This is an install strategy to target a USB flash stick as / instead of a traditional hard drive or internal solid state drive. this isn't a live cd, this is a persistent root funtoo install that changes will keep living on.

In this run i will use a 64gb 100 mb/s sandisk, 32gb minimum for gnome, 16gb are ok for xfce lxde lxqt type builds. get a fast usb3 drive even if you dont have usb3 ports as the flash memory on them is much faster than the flash memory on usb2 keys which will improve usability.

   Tip

this section is for mbr partitioning with gparted, use uefi with bios boot partition for legacy support

I'm using gparted on xubuntu (any running linux system with gparted should be able to follow this guide) to delete the flash key fat32 partition and create a single jfs / partition labeled as FUNTOO, and mount it to /mnt/funtoo. USE JFS, IT'S FAST!!! ext is a turtle, and it's fsck is slow, XFS is fast but doesn't have mature fscking, JFS has a mature fsck, and it's fast.

we want our USB to be targeting generic hardware so we can have our root funtoo compatible with most modern hardware. prefer nouveau drivers over nvidia because KMS loads intel and possibly other video card systems.

you can also pull your Subarches gnome tarball if you're installing to specific hardware.

root # cd /mnt/funtoo
root # wget https://build.funtoo.org/1.4-release-std/x86-64bit/generic_64/gnome-latest.tar.xz
root # tar --numeric-owner -xpf *gnome* && rm -f *gnome*
root # mount -t tmpfs tmpfs /run
root # mount -t proc none proc
root # mount --rbind /sys sys
root # mount --rbind /dev dev
root # mount --rbind /run run

were using googles name server simply because its universal, and anyone can access it anywhere.

root # cd /mnt/funtoo && env -i HOME=/root TERM=$TERM chroot . bash -l
root # echo "nameserver 8.8.8.8" > /etc/resolv.conf && passwd
root # mv /etc/fstab /etc/fstab.backup

If you're using gpt partitioning run this block:

root # echo "LABEL=BOOT /boot vfat noauto,noatime 0 0" >> /etc/fstab

were disabling swap because we didn't partition for it, and switching the compile directory to ram instead of on disk. im compiling on 16gb of ram but 8 should be sufficient, possibly even 4gb or less if you avoid large packages. Were setting the host name, and merging a handful of packages.

root # echo 'PORTAGE_TMPDIR="/run"' > /etc/portage/make.conf && rc-update del swap boot
root # echo "LABEL=FUNTOO / jfs noatime 0 1" >> /etc/fstab
root # echo "tmpfs /run tmpfs rw,nodev,nosuid 0 0" >> /etc/fstab
root # echo 'hostname="undead"' > /etc/conf.d/hostname
root # ego sync && emerge jfsutils grub haveged linux-firmware discord-bin firefox-bin media-fonts/noto eix

you can also install Package:Brave

funtoo's official chat: https://discord.gg/BNUSpUU

Install grub in legacy mode.

root # grub-install --target=i386-pc --no-floppy /dev/sdc 
root # ego boot update && rc-update add haveged && rc-update del sshd

final install size is around 14,500MB gnome can fit in a 16gb usb stick, but it's a tight squeeze and unix file systems degrade in performance at around 80%-90% full. 32gb keys are good, 64gb are excellent, 128gb keys can emerge the world.

rebuild the kernel video drivers modules.

root # emerge -1 x11-drivers/nvidia-kernel-modules

DONE!

When you boot into your new system use nmtui to setup networking:

root # nmtui

to not run nvidia:

root # ego profile mix-in gfxcard-nouveau
root # ego profile mix-in -gfxcard-nvidia

If you're having problems with nouveau not playing sound over HDMI restart pulse audio:

root # ps aux

to fix the clock to eastern standard time:

root # rm /etc/localtime
root # ln -s /usr/share/zoneinfo/America/Detroit /etc/localtime

The magic words to update:

root # emerge -avuND @world 
root # emerge -av --depclean
root # ego boot update

every so often you will want to purge sources to keep the stick as low memory usage as possible

root # rm /var/cache/portage/distfiles/*.tar.bz2
root # rm /var/cache/portage/distfiles/*.tar.xz
root # rm /var/cache/portage/distfiles/*.tar.gz

further securing

i use Package:Sudo, and disable root login.

i use Package:Dnsmasq to block advertising, and cache DNS traffic to accelerate web browsing.

i use Package:Dnscrypt to encrypt all dns requests so the vast majority of the web traffic from my undead usb is encrypted.

Admining

use Package:Eix to browse portage to see packages you can emerge.

use Package:Eselect to set various system options.

Branding

root # echo "www.funtoo.org" > /etc/motd

add fortunes piped through cowsay to the shells

root # emerge fortune-mod cowsay
root # cd && echo "fortune | cowsay" >> .bashrc

Disable DPMS

dpms disrespects screen blanking settings, so you can't watch movies in VLC without the screen turning off.

root # xset s off -dpms
root # cat > /etc/X11/xorg.conf.d/10-monitor.conf << "EOF"
Section "Extensions"
    Option      "DPMS" "Disable"
EndSection
EOF
   /etc/X11/xorg.conf.d/10-monitor.conf - Disable DPMS blanking
Section "Extensions"
    Option      "DPMS" "Disable"
EndSection

Alternate Drives

   Warning

avoid adding fstab entries for drives that will not be present on other computers. JFS will mount read only if fsck fails!

I have a jfs home drive labeled HOME. This is the fstab entry to have funtoo use my rotating hard drive as /home

root # echo "LABEL=HOME /home jfs noatime 0 2" >> /etc/fstab

Swapping by file

under construction, turning swapping back on with a swap file! https://wiki.archlinux.org/index.php/swap#Swap_file LOL arch does my cyber chores for me while i build this section.

windows 10 utc

if you're running ntp on undead usb you will want to set any dual booting windows clocks to be universal. in an administrator run command prompt run this:

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_QWORD /f