Debian_12_on_imac_2017/README.md
2025-07-31 23:16:59 +08:00

219 lines
5.4 KiB
Markdown

# Debian 12 in Imac 2017
### Installare l'installer su pen drive
caricare la versione iso di debian 12 e installarlo in una chiavetta utilizzando Balena-Etcher
### Autorizzare lo user per lavorare come su (sudoers)
su
nano /etc/sudoers
inserire questa riga con user lo user che vuoi che abbia i privilegi di root
user ALL=(ALL:ALL) ALL
uscita da su
exit
## Bootloader nel disco corretto
usare questo comando per vedere dove è installato
df
risultato
```sh
Filesystem 1K-blocks Used Available Use% Mounted on
udev 8091944 0 8091944 0% /dev
tmpfs 1627184 1768 1625416 1% /run
/dev/sdb2 489634808 7081020 457608280 2% /
tmpfs 8135912 0 8135912 0% /dev/shm
tmpfs 5120 12 5108 1% /run/lock
/dev/nvme0n1p1 306472 78560 227912 26% /boot/efi
tmpfs 1627180 84 1627096 1% /run/user/1000
```
lo si vede anche in /etc/fstab
```sh
# / was on /dev/sdb2 during installation
UUID=2c24b19e-30dc-42ce-bb86-fa0709a4871c / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=5F66-17ED /boot/efi vfat umask=0077 0 1
# swap was on /dev/sdb3 during installation
UUID=97d280b9-8a9d-4e36-ad83-718fed957065 none swap sw 0 0
```
se come in questo caso non è nella partizione del disco sdb va copiato tutto la directory /boot/uefi
creare dir per il mounting ma prima entrare in su
su
mkdir -p /mnt/a
montare il disco efi della partizione corretta
mount /dev/sdb1 /mnt/a
spostarsi nella efi corrente
cd /boot/efi
copiare tutto nella efi nuova
cp -a -R * /mnt/a
smontare la efi nuova
umount /mnt/a
uscire da su
exit
modificare il file fstab
con blkid si vedono tutti gli uuid
sudo blkid
vedere solo quello che ci interessa
sudo blkid /dev/sdb1
risultato
/dev/sdb1: UUID="4385-0998" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="6e3268ec-1913-4f7d-81e0-36d373554d40"
copiare l'UUID corretto per la partizione /boot/efi in questo caso UUID=4385-0998
editando
sudo nano /etc/fstab
uscire e riavviare
ora con df si può ricontrollare e /boot/efi ora è su /dev/sdb1
```sh
Filesystem 1K-blocks Used Available Use% Mounted on
udev 8091944 0 8091944 0% /dev
tmpfs 1627184 1776 1625408 1% /run
/dev/sdb2 460269616 6107712 430708004 2% /
tmpfs 8135912 0 8135912 0% /dev/shm
tmpfs 5120 12 5108 1% /run/lock
/dev/sdb1 497684 59768 437916 13% /boot/efi
tmpfs 1627180 92 1627088 1% /run/user/1000
```
### Installare sound su linux Debian 12 in un iMac 18.2 (late 2017)
sudo apt-get install linux-headers-$(uname -r)
sudo apt install build-essential
sudo apt install git
git clone http://forgit.patachina.it/Fabio/snd-hda-codec-cs8409.git
cd snd-hda-codec-cs8409
make
sudo make install
fare il reboot
deriva da [git link](https://github.com/egorenar/snd-hda-codec-cs8409)
### Installare tutti i pacchetti per Debian 12
copiare il file per un backup
sudo cp /etc/apt/sources.list .
editare sources.list
sudo nano /etc/apt/sources.list
cancellare tutto e inserire
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
# deb-src https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
fare update e upgrade
sudo apt update
sudo apt upgrade
## Installare mesa (accellerazione grafica)
sudo apt-get install mesa-utils
verificare con
glxinfo
con
glxinfo | grep OpenGL
dovrebbe risultare qualcosa del tipo
OpenGL vendor string: Intel Open Source Technology Center # The manufacturer
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop # The type of the chip
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.3.2 # The OpenGL version fully supported, here 3.3 thanks to Mesa 10.3.2 .
OpenGL core profile shading language version string: 3.30 # The GLSL version fully supported
con il comando si verifica accellerazione 3D
glxinfo | grep rendering
dovrebbe dare
direct rendering: Yes
per vedere i frame per secondo
glxgears -info
## Installare l'ultima versione di mesa
sudo apt install -t bookworm-backports mesa-vulkan-drivers
## Verificare webcam
1. con l'uso del comando lsusb
```sh
lsusb | grep -E -i 'camera|webcam|video'
```
2. Usando v4l2-ctl
installare
sudo apt-get install v4l-utils
verificare con
v4l2-ctl --list-devices
si può anche guardare i vari nodi
v4l2-ctl -d /dev/video0 --all
3. usando l'applicazione con il comando
cheese