Created
December 14, 2021 16:00
-
-
Save decuser/27356ba41d1080267468481d8ab16e73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#******************************************************************** | |
#** _00-readme-freebsd-11.1-imac.txt | |
#** This note describes the proces of installing FreeBSD 11.1 | |
#** on an Intel iMac (early 2008) | |
#** xref _00-readme-freebsd-11.txt | |
#** last update 20170822.2034 | |
#******************************************************************** | |
--------------------------------------------------------------------- | |
-- System Specifications: | |
--------------------------------------------------------------------- | |
iMac 20 inch Aluminum, early 2008, iMac8,1 | |
Native Resolution - 1680x1050 32-Bit Color | |
Intel Core 2 Duo, 2.4 GHz | |
6GB 800MHz DDR 2 SDRAM | |
ATI Radeon HD 2400 PCIe GPU 128MB VRAM | |
Intel High Definition Audio | |
--------------------------------------------------------------------- | |
-- Create a memstick version of the install media | |
--------------------------------------------------------------------- | |
curl -O http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/11.1/FreeBSD-11.1-RELEASE-amd64-memstick.img.xz | |
unxz FreeBSD-11.1-RELEASE-amd64-memstick.img.xz | |
insert a usb drive | |
diskutil list | |
diskutil unmountdisk /dev/disk2 | |
sudo dd if=FreeBSD-11.1-RELEASE-amd64-memstick.img of=/dev/rdisk2 bs=1m | |
diskutil eject /dev/disk2 | |
on FreeBSD prepare the USB stick (or follow the manual boot method in the notes section) | |
su - | |
geom disk list | |
gpart show /dev/da1 | |
mount -t ufs /dev/da1p3 /mnt | |
vi /mnt/boot/loader.conf | |
load /boot/kernel/radeonkmsfw_RV610_pfp.ko | |
load /boot/kernel/radeonkmsfw_RV610_me.ko | |
load /boot/kernel/radeonkmsfw_R600_rlc.ko | |
load /boot/kernel/radeonkms.ko | |
set kern.vty=vt | |
sync | |
sync | |
umount /mnt | |
--------------------------------------------------------------------- | |
-- Boot from install media and install the base system | |
--------------------------------------------------------------------- | |
Insert the USB stick in a free USB port on the iMac | |
While booting, hold down the alt key (option) to see the USB drive | |
Select an external drive labeled EFI Boot | |
Select Install at the Welcome screen | |
Select Continue to use the default US keymap | |
Set the hostname - host.home | |
Select lib32, ports, src packages | |
Select Guided On Root ZFS | |
Select ada0 for the disk | |
Confirm the selection | |
The BSD installer installs the selections to disk | |
Set root password and confirm | |
Select ue0 | |
Select IPv4 | |
Select DHCP | |
Select No fro IPv6 | |
At the Network configuration screen enter sentech.home in the field labeled Search | |
Select OK to confirm Network configuration | |
Select Yes to choose UTC for local clock | |
Select 2. America | |
49. United States | |
11. Central Time | |
Select Yes for CDT | |
Select sshd, moused, ntpd, powerd, dumpdev as services to start at boot | |
Select Yes to add user | |
set Username, Full name, wheel operator, and password | |
Select Yes to save | |
Select No to stop adding users | |
Select Exit to apply configurations | |
Select Yes for manual configuration | |
at the prompt: | |
vi /boot/loader.conf | |
radeonkmsfw_RV610_pfp_load="YES" | |
radeonkmsfw_RV610_me_load="YES" | |
radeonkmsfw_R600_rlc_load="YES" | |
radeonkms_load="YES" | |
kern.vty=vt | |
autoboot_delay="1" | |
kern.ipc.shmmax=67108864 | |
kern.ipc.shmall=32768 | |
vi /etc/rc.conf | |
add the following before ntpd_enable="YES" | |
netwait_enable="YES" | |
netwait_ip="192.168.0.1" | |
vi /boot/device.hints | |
hint.hdaa.0.config="ovref" | |
hint.hdaa.0.gpio_config="0=set" | |
hint.hdaa.0.nid20.config="as=4 seq=15" | |
exit | |
Select Reboot and remove media after it unmounts | |
--------------------------------------------------------------------- | |
-- Post install | |
--------------------------------------------------------------------- | |
login as normal user and become root | |
su - | |
sync the time | |
ntpdate -u pool.ntp.org | |
if the ntp service wasn't selected at install, sync the time offline | |
ntpdate -s time.nist.gov | |
bring the system up to date (will install the pkg system) | |
pkg upgrade | |
pkg install sudo bash | |
mount -t fdescfs fdescfs /dev/fd | |
visudo and activate wheel with no password | |
exit | |
as user | |
sudo ls to test | |
chsh | |
/usr/local/bin/bash | |
exit | |
login as user | |
echo $BASH to test | |
sudo pkg install git-gui | |
git config --global user.name "Name" | |
git config --global user.email [email protected] | |
git config --global push.default simple | |
git config --global core.pager "less -e -F -R -X" | |
git config --global core.excludesfile "~/.gitignore_global" | |
confirm the settings | |
git config --global -e | |
vi ~/.gitignore_global | |
*~ | |
\#*\# | |
/.emacs.desktop | |
/.emacs.desktop.lock | |
*.elc | |
auto-save-list | |
tramp | |
.\#* | |
sudo vi /etc/hosts | |
::1 localhost localhost.my.domain | |
127.0.0.1 localhost localhost.my.domain | |
add hosts | |
ssh-keygen | |
sudo vi /etc/fstab | |
add bash and openjdk required entries | |
# bash requires devfs | |
fdesc /dev/fd fdescfs rw 0 0 | |
# openjdk and others require proc | |
proc /proc procfs rw 0 0 | |
prepare for cups | |
sudo vi /etc/devfs.rules | |
[system=10] | |
add path 'unlpt*' mode 0660 group cups | |
add path 'ulpt*' mode 0660 group cups | |
add path 'lpt*' mode 0660 group cups | |
sudo vi /boot/loader.conf | |
kern.geom.label.disk_ident.enable="0" | |
kern.geom.label.gptid.enable="0" | |
zfs_load="YES" | |
radeonkmsfw_RV610_pfp_load="YES" | |
radeonkmsfw_RV610_me_load="YES" | |
radeonkmsfw_R600_rlc_load="YES" | |
radeonkms_load="YES" | |
kern.vty=vt | |
autoboot_delay="1" | |
kern.ipc.shmmax=67108864 | |
kern.ipc.shmall=32768 | |
sudo vi /etc/rc.conf | |
hostname="host.home" | |
ifconfig_ue0="DHCP" | |
sshd_enable="YES" | |
moused_enable="YES" | |
netwait_enable="YES" | |
netwait_ip="192.168.0.1" | |
ntpd_enable="YES" | |
powerd_enable="YES" | |
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable | |
dumpdev="AUTO" | |
zfs_enable="YES" | |
#kde | |
dbus_enable="YES" | |
hald_enable="YES" | |
kdm4_enable="YES" | |
#cups | |
cupsd_enable="YES" | |
devfs_system_ruleset="system" | |
#xrdp | |
xrdp_enable="YES" | |
xrdp_sesman_enable="YES" | |
vi ~/.xinitrc | |
exec /usr/local/bin/startkde | |
sudo pkg install xorg virtuoso kde vim firefox xrdp emacs25 xf86-video-ati | |
uncomment the path setting in startwm.sh | |
sudo vi /usr/local/etc/xrdp/startwm.sh | |
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" | |
export PATH=$PATH | |
reboot and test kde, sound, etc., then xrdp | |
--------------------------------------------------------------------- | |
-- Printer Configuration (list of files to link came from | |
-- pkg info -l cups-base |grep lp|grep bin | |
-- an orig list came from | |
-- pkg info -l cups-base |grep lp|grep bin|sed 's/local\///' | |
-- the confirmation is ls -l `which lpadmin` | |
--------------------------------------------------------------------- | |
xref http://localhost:631/help/options.html | |
xref http://srobb.net/cups.html | |
cat > fixcupslp.sh << "EOF" | |
#!/usr/local/bin/bash | |
bdirs=("/usr/bin/" "/usr/sbin/") | |
tdirs=("/usr/local/bin/" "/usr/local/sbin/") | |
files=( "lp" "lpq" "lpr" "lprm" "lpstat" "lpadmin" "lpc" "lpinfo" "lpmove" ) | |
#echo "checking for the existence of cups via ${tdirs[0]}lp" | |
if ! [ -e ${tdirs[0]}lp ]; | |
then | |
echo "did you install cups?" | |
exit 0 | |
fi | |
x=0 | |
y=0 | |
for i in "${tdirs[@]}" | |
do | |
for j in "${files[@]}" | |
do | |
if [ -f "$i$j" ]; | |
then | |
# check if a file exists, if it does, back it up and link it | |
if [ -h ${bdirs[$x]}$j ]; | |
then | |
echo "rm ${bdirs[$x]}$j" | |
rm ${bdirs[$x]}$j | |
echo "ln -s $i$j ${bdirs[$x]}" | |
ln -s $i$j ${bdirs[$x]} | |
(( y=y+1 )) | |
elif [ -f ${bdirs[$x]}$j ]; | |
then | |
echo "mv ${bdirs[$x]}$j ${bdirs[$x]}$j.o" | |
mv ${bdirs[$x]}$j ${bdirs[$x]}$j.o | |
echo "ln -s $i$j ${bdirs[$x]}" | |
ln -s ln -s $i$j ${bdirs[$x]} | |
(( y=y+1 )) | |
# otherwise, check if it is in the wrong directory | |
else | |
if [ $x == 0 ] && [ -e ${bdirs[1]}$j ]; | |
then | |
echo "$j found in ${bdirs[1]}, expected it to be in ${bdirs[0]}" | |
elif [ $x == 1 ] && [ -e ${bdirs[0]}$j ]; | |
then | |
echo "$j found in ${bdirs[0]}, expected it to be in ${bdirs[1]}" | |
else | |
echo "ln -s $i$j ${bdirs[$x]}" | |
ln -s $i$j ${bdirs[$x]} | |
(( y=y+1 )) | |
fi | |
fi | |
fi | |
done | |
(( x=x+1 )) | |
done | |
echo "Finished... linked $y files" | |
EOF | |
sudo bash ./fixcupslp.sh | |
expect | |
Finished... linked 9 files | |
to keep upgrades from screwing things up | |
sudo vi /etc/make.conf | |
uncomment | |
#NO_LPR= | |
add | |
CUPS_OVERWRITE_BASE=yes | |
sudo /etc/rc.d/devfs restart | |
sudo /usr/local/etc/rc.d/cupsd restart | |
browse to http://localhost:631 | |
add printer | |
choose ipp | |
url: ipp://192.168.0.120:631/ipp | |
MFC-8670DN | |
browse to ppd | |
Set default options (page won't return, just browse back to the admin page) | |
print a self test page | |
set as server default | |
configure kde | |
configure kate print margins | |
print a test | |
get the name of the available printers | |
lpstat -a | |
# create a duplicate with duplex | |
sudo lpoptions -p MFC-8670DN/duplex -o sides=two-sided-long-edge | |
set it as the default destination | |
#lpoptions -d MFC-8670DN/duplex | |
lpoptions -d MFC-8670DN | |
printf "Hello\nOn\nMultiple\nLines\n" | lpr | |
celebrate | |
options can be set with the call to lp | |
lp -o lpi=8 -o cpi=12 -o page-left=54 -o page-right=54 -o page-top=54 -o page-bottom=54 -o prettyprint _00-readme-freebsd-10.2.txt | |
If you have trouble as root, confirm that TMPDIR is set | |
echo $TMPDIR | |
export TMPDIR='/tmp' | |
--------------------------------------------------------------------- | |
-- OpenJDK (requires fdesc and proc, both of which have been added to fstab) | |
--------------------------------------------------------------------- | |
# sudo pkg install openjdk8 | |
java -version | |
openjdk version "1.8.0_112" | |
OpenJDK Runtime Environment (build 1.8.0_112-b16) | |
OpenJDK 64-Bit Server VM (build 25.112-b16, mixed mode) | |
--------------------------------------------------------------------- | |
-- Notes: | |
--------------------------------------------------------------------- | |
When booting from the USB stick: | |
Press 3 at the Welcome to FreeBSD menu to drop into the loader prompt which will display OK | |
type boot-conf and return | |
press the space bar after kernel, text, and syms load to return to the loader prompt (the kernel will now be loaded) | |
at the loader prompt, type: | |
load /boot/kernel/radeonkmsfw_RV610_pfp.ko | |
load /boot/kernel/radeonkmsfw_RV610_me.ko | |
load /boot/kernel/radeonkmsfw_R600_rlc.ko | |
load /boot/kernel/radeonkms.ko | |
set kern.vty=vt | |
boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment