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

From Funtoo
Jump to navigation Jump to search
m (damn pesky gnomes)
m (note that this is legacy mode & point to uefi changes to be merged in)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==A linux nomadbsd alternative==
==A linux nomadbsd alternative==
{{tip|this is for legacy mode, uefi is in progress, see [[Talk:Undead_USB_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.
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.
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.


I'm using gparted on xubuntu to delete the flash key fat32 partition and create a single jfs / partition labeled as funtoo, and mount it to /mnt/funtoo.  We're using JFS because we want as much raw speed, and power from the install possible.
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.  We're using JFS because we want as much raw speed, and power from the install possible.


we want our USB to be targeting generic hardware so we can have our root funtoo compatible with most hardware.  We will use the generic 64 subarch.  If a systems 32, you probably don't want to be doing much computing on it anyways, but do as you will.  we will be using a gnome stage3 tarball.  prefer nouveau drivers over nvidia because KMS loads intel and possibly other video card systems.
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.
 
https://www.funtoo.org/Generic_64


{{console|body=
{{console|body=
Line 95: Line 94:
###i## rm /var/cache/portage/distfiles/*.tar.gz
###i## rm /var/cache/portage/distfiles/*.tar.gz
}}
}}
Past this the USB should work on almost anything x86_64 with a USB port.
uefi isnt booting yet...  i don't have equipment to test this method on.
uefi looks like a disaster, suggesting setting uefi bios to support legacy mode for now.
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda


==Xfce4==
==Xfce4==
Line 112: Line 105:


==gparted==
==gparted==
you can emerge gparted, and use funtoo undead usb instructions to install funtoo on another usb, or to an actual hard drive.
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=
{{console|body=
###i## emerge gparted}}
###i## emerge gparted}}


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


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


==dnscrypt==
i use dnscrypt proxy to encrypt all dns requests so 100% of the web traffic from my undead stick is encrypted.  
i use dnscrypt proxy to encrypt all dns requests so 100% of the web traffic from my undead stick is encrypted.  
[[Package:Dnscrypt]]
[[Package:Dnscrypt]]
Line 141: Line 132:
[[Package:Eselect]]
[[Package:Eselect]]


==Brave==
==Browser==
emerge firefox-bin or install brave
[[Package:Brave]]
[[Package:Brave]]


==branding==
==Branding==
add fortunes piped through cowsay to the shells
add fortunes piped through cowsay to the shells
{{console|body=
{{console|body=

Revision as of 08:31, October 6, 2020

A linux nomadbsd alternative

   Tip

this is for legacy mode, uefi is in progress, see Talk:Undead_USB_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.

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. We're using JFS because we want as much raw speed, and power from the install possible.

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.

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

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.

   /etc/portage/make.conf - compile in RAM instead of on disk
PORTAGE_TMPDIR="/run"
root # rc-update del swap boot
root # passwd
root # echo "LABEL=funtoo / jfs noauto,noatime 0 1" >> /etc/fstab
root # ego sync && emerge jfsutils grub haveged linux-firmware media-fonts/noto debian-sources

Name your host name to reflect that this is your undead media.

root # mv /etc/conf.d/hostname /etc/conf.d/.hostname
root # echo 'hostname="undead"' > /etc/conf.d/hostname

use old school mbr method of installing grub.

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

final install size is around 11,500 MB

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

remove nomodeset from /etc/boot.conf and change timeout to 0

root # nano /etc/boot.conf


If you're having problems with nouveau not playing sound over HDMI emerge pavucontrol:

root # emerge pavucontrol

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

Xfce4

to install from a minimal tarball and build up xfce4 the merge commands are

root # ego profile flavor desktop
root # ego profile mix-in xfce
root # ego profile mix-in X
root # 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.

root # emerge gparted

further securing

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

i use 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. Package:Dnscrypt

eix

use eix to browse portage to see packages you can emerge.

Package:Eix

eselect

use eselect to set various system options

Package:Eselect

Browser

emerge firefox-bin or install brave Package:Brave

Branding

add fortunes piped through cowsay to the shells

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

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