|
home /
infca / t60
(navigation links)
|
Uno sueña siempre con repetir la felicidad de la juventud
|
Think Pad T60
go 2 top
|
Type 1951,
specs here
Enter BIOS using F1
Enable virtualization :
- enter BIOS
- "Config" + "CPU"
- Intel Virtualization Technology := 'enabled'
- after any change in this option. system must be powered off to take effect
sebas@t60:~$ uname -a
Linux t60 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:44:23 UTC 2020 i686 i686 i686 GNU/Linux
sebastia@t60:~$ lscpu
Architecture: i686
CPU op-mode(s): 32-bit
It cannot run Ubuntu 22.04 (or any modern Ubuntu release).
|
Esquema
T400
|
.--- CPU :
|
.--- RAM :
|
.--- VDU :
|
.--- Display :
|
.--- Network --.-- eth0
| |
| .-- wlan0
|
.--- HD
|
.--- PCI Slot
|
Comandes per visualitzar la ferralla
Configuracio de xarxa
- Ubuntu 18.04 vol fer servir el
Network Manager -
fitxer de configuracio :
sebas@T60ubuntu:~$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no
- veure estat :
sebas@T60ubuntu:~$ sudo service network-manager status
â NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-10-18 19:20:05 CEST; 13min ago
Docs: man:NetworkManager(8)
Main PID: 740 (NetworkManager)
Tasks: 3 (limit: 4915)
CGroup: /system.slice/NetworkManager.service
ââ740 /usr/sbin/NetworkManager --no-daemon
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.8911] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.9002] manager: (irda0): new Generic device (/org/freedesktop/NetworkManager/Devices/3)
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.9160] wifi-nl80211: (wlan0): using nl80211 for WiFi device control
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.9174] device (wlan0): driver supports Access Point (AP) mode
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.9245] manager: (wlan0): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/4)
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.9353] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
oct 18 19:20:09 T60ubuntu NetworkManager[740]: <info> [1571419209.9931] manager: NetworkManager state is now CONNECTED_GLOBAL
oct 18 19:20:10 T60ubuntu NetworkManager[740]: <info> [1571419210.0959] modem-manager: ModemManager available
oct 18 19:20:10 T60ubuntu NetworkManager[740]: <info> [1571419210.2077] supplicant: wpa_supplicant running
oct 18 19:20:10 T60ubuntu NetworkManager[740]: <info> [1571419210.2593] manager: startup complete
- aturar Network Manager :
sebas@T60ubuntu:~$ sudo service network-manager stop
- nmcli - command-line tool for controlling NetworkManager
sebas@T60ubuntu:~$ nmcli general status
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
connected unknown enabled disabled enabled disabled
- desinstalem Network Manager :
sebas@T60ubuntu:~$ sudo apt install ifupdown resolvconf
sebas@T60ubuntu:~$ sudo apt remove nplan netplan.io
- editem /etc/network/interfaces amb les dades inalambriques :
- auto wlan0
- iface wlan0 inet static
- address 192.168.1.120
- netmask 255.255.255.0
- gateway 192.168.1.1
- reiniciem la xarxa : "sudo ifdown -a" + "sudo ifup -a"
- reiniciem les xarxes :
sebas@T60ubuntu:~$ sudo systemctl restart networking
Job for networking.service failed because the control process exited with error code.
See systemctl status networking.service and journalctl -xe
- editem /etc/network/interfaces per posar una IP fixe pel cable :
sebas@T60ubuntu:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.60
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
- nameserver : posar "8.8.8.8" a "/etc/resolv.conf"
compte que es sobre-escriu - el "original" es troba a /etc/resolvconf/resolv.conf.d/head
sebas@T60ubuntu:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 8.8.8.8
nameserver 8.8.4.4
El servei que ho fa es "sudo systemctl status resolvconf.service"
- assignar les MACs :
sebas@T60ubuntu:~$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x109a (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:7e:14:2d:14", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x1014 (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:cf:5b:4d:a6", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
- mostrem Default Gateway :
sebas@T60ubuntu:~$ ip route
default via 192.168.1.1 dev eth0 onlink
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.60
- mirem rutes :
sebas@T60ubuntu:~$ arp -a
? (192.168.1.94) at 00:21:6a:b6:cd:56 [ether] on eth0
_gateway (192.168.1.1) at 44:d9:e7:7f:6f:fa [ether] on eth0
- com es manega el wifi des command line ?
iwconfig does not support WPA/WPA2 negotiation & authentication when connecting to a wlan network
how do you connect to a WPA-TKIP/WPA2-AES enabled wlan?
The answer is you have to use yet another program like
wpa_supplicant
If you're not too crazy about the commandu line method, use a gui network manager like
wicd manager
Per ordre :
- iwconfig {veiem "wlan0"}
- sudo ifconfig wlan0 up
- sudo iwlist wlan0 scan | grep ESSID
if "device busy", wait 3 seconds and retry
- sudo apt install wpasupplicant
- wpa_passphrase convidatS 22.22 | sudo tee /etc/wpa_supplicant.conf ; create /etc/wpa_supplicant.conf
- sudo wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 ; get a nice set of messages
- by default, wpa_supplicant runs in the foreground
open up another terminal window and run "iwconfig" -
you can see that the wireless interface is now associated with an access point
- you can press CTRL+C to stop the current wpa_supplicant process and run it in the background by adding the -B flag :
$ sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0 ; mind "sudo ifdown eth0" - also remove "auto" from "/etc/network/interfaces"
- if "rfkill: WLAN hard blocked" then A
- switch the hardware "wifi" switch "on"
- verify "Fn + F5"
- reboot - Ubuntu does NOT get that switch change "on the fly"
- if "rfkill: WLAN soft blocked" then "sudo rfkill unblock wifi"
- auto-connect at boot time using wpa_supplicant :
- sudo cp /lib/systemd/system/wpa_supplicant.service /etc/systemd/system/wpa_supplicant.service
- edit it : sudo vi /etc/systemd/system/wpa_supplicant.service
- change "ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant"
into "ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant.conf -i wlan0"
- comment this line "Alias=dbus-fi.w1.wpa_supplicant1.service" by adding a "#" at the beginning
- enable wpa_supplicant service to start at boot time : "sudo systemctl enable wpa_supplicant.service"
- reboot
- dislay wpa_supplicant service status : "sudo systemctl status wpa_supplicant.service"
- cat /var/log/syslog | grep wlan0 - "Reason: 3=DEAUTH_LEAVING"
- remove "NetworkManager" service : "sudo systemctl stop NetworkManager" + "sudo systemctl disable NetworkManager"
- quina diferencia hi ha entre
sudo service NetworkManager status ; "service" -> System V init script or systemd unit
sudo systemctl status NetworkManager ; "systemctl" -> control the systemd system and service manager
sudo systemctl status NetworkManager.service ;
sudo service network-manager status ;
sudo systemctl status network-manager ;
sudo systemctl status network-manager.service ;
- if "wpa_supplicant" doews not work, install WICD :
- sudo apt-get install wicd-gtk
- could not connect to wicd's D-bus : "rm /etc/resolv.conf"
- el log es troba a "/var/log/wicd/wicd.log"
- sudo systemctl stop wpa_supplicant
- sudo systemctl disable wps_supplicant
- sudo rm /etc/systemd/system/wpa_supplicant.service
- resum :
sebas@T60ubuntu:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:24:7e:14:2d:14 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.60/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::224:7eff:fe14:2d14/64 scope link
valid_lft forever preferred_lft forever
3: irda0: <NOARP> mtu 2048 qdisc noop state DOWN group default qlen 8
link/irda 00:00:00:00 brd ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:16:cf:5b:4d:a6 brd ff:ff:ff:ff:ff:ff
- tornem a NM :
- sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
- sudo systemctl stop wpa_supplicant.service
- sudo systemctl disable wpa_supplicant.service
- set /etc/NetworkManager/NetworkManager.conf "managed=true" in "ifupdown" section + sudo service network-manager restart"
- NM tools : "nmcli" and "nmtui"
- "nm-connection-editor" : files in "/etc/NetworkManager/system-connections/"
Solution so /etc/network/interfaces values come into work : "sudo ifup wlan0"
interfaces man page
reinstalem NM
Primer esborrem el wpa_supplicant :
- apt list --installed | grep wpa
- sudo apt-get remove wpa_supplicant (removes network-manager, to my surprise)
- reboot
- configure eth0 using /etc/network/interfaces
- apt list --installed | grep net
- sudo apt install network-manager
- reboot (nm and wpa are dead)
- eth0 ok, wlan0 ko
To display NM version, do :
sebas@T60ubuntu:~$ journalctl -b 0 -u NetworkManager | grep version
May 19 11:03:28 nicolau-desktop NetworkManager[840]: [1589879008.9294] NetworkManager (version 1.10.6) is starting...
nmcli / nmtui
nmtui - Text User Interface for controlling NetworkManager
Software - hi posem un Ubuntu Server
Ubuntu server - ubuntu-18.04.2-live-server-amd64.iso via USB and Rufus
Software updates
Ho inhibim per la GUI :
- en el Desktop, obrir "Apps"
- escollim "Software & Updates"
- under "Updates" tab, select "Never" in "AAutomatically check for updates"
- crec que resulta en el fitxer /etc/apt/apt.conf.d/10periodic
Serveis
- llistar serveis que hi ha :
- sudo service --status-all
- sudo systemctl list-unit-files
- mirar el estat de un servei :
- sudo service network-manager status
- aturar un servei :
- re-engegar un servei :
- sudo service network-manager restart
Eines
Ens agraden :
- display Ubuntu level : lsb_release -a = "bionic"
- update modules : sudo apt-get update
Que hi instalem :
install mutt (see bellow) : sudo apt-get install mutt
install 7z : sudo apt install p7zip-full
vim (vi with colors) : sudo apt install vim
sudo npm install -g npm-check-updates
npm install superagent-logger -save
npm install -g npm-check
install htop - use F5 to see "tree"
vim install
Per a tenir color en editar documents ".sh", ".js", cal instalar "vim"
mutt install & config
- sudo apt-get install mutt
- mkdir -p ~/.mutt/cache/headers mkdir ~/.mutt/cache/bodies touch ~/.mutt/certificates
- create .muttrc in home directory and fill it properly (or general /etc/Muttrc) - see bellow
- run "mutt" and accept two SSL certificates from Google
- in google, do enable IMAP
- google account - permetre acces des aplicacions menys segures
- debug running interactive email creation :
- mutt -d 5 -a /home/sebas/.muttrc -s "interactive MUTT with CFG." -- desti@domain.cat
- reading "~/.muttdebug0"
- fix server certificate expired
- run manual backup - see bellow
- run monthly backup - t60:/etc/cron.monthly $ sudo ln -s /home/sebas/eines/backup/fer_backup.sh envia_backup
url
.muttrc for gmail
# A basic .muttrc for Gmail
# Change the following six lines to match your Gmail account details
set imap_user = "pasta.2015@gmail.com"
set imap_pass = "sagpasta"
# set smtp_url = "smtp://pasta.2015@smtp.gmail.com:587/"
set smtp_url = "smtps://pasta.2015@smtp.gmail.com:465/"
set smtp_pass = "sagpasta"
set from = "pasta.2015@gmail.com"
set realname = "Soc Pastanaga"
# Change the following line to a different editor you prefer.
set editor = "vi"
# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set imap_check_subscribed
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[GMail]/Drafts"
set record = "+[GMail]/Sent Mail"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set ssl_verify_host = no
set ssl_verify_dates = no
set move = no
set include
set sort = "threads"
set sort_aux = "reverse-last-date-received"
set auto_tag = yes
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc
alternative_order text/plain text/html *
auto_view text/html
bind editor <Tab> complete-query
bind editor ^T complete
bind editor <space> noop
# Gmail-style keyboard shortcuts
macro index,pager y "<enter-command>unset trash\n <delete-message>" "Gmail archive message"
macro index,pager d "<enter-command>set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n <delete-message>" "Gmail delete message"
macro index,pager gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index,pager ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index,pager gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
macro index,pager gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
Monitoritzacio T60
Fem periodicament :
llistar les meves IPs cada 5 minuts :
{sudo crontab -l} /home/sebas/cron_jobs/my_crons /home/sebas/cron_jobs/get_ip.sh /home/sebas/logs/get_ip.log
gravar la ruta des el T60 a 8.8.8.8
{/etc/cron.hourly/} trassa_8888 -> /home/sebas/eines/monit_t60/veure_t60.sh -> /home/sebas/logs/monit_t60.log
enviar 7z a yndx
{/etc/cron.hourly/} t60_send_yndx -> /home/sebas/eines/envia_ip/envia.sh -> /home/sebas/logs/envia_7z.log
What gateway are we using ?
Similar to "/home/mate/cron-jobs/monit_pomnia.sh" :
sebas@T60ubuntu:~/eines/monit_t60$ cat veure_t60.sh
#!/bin/bash
# /etc/cron.hourly
# sudo ln -s /home/sebas/eines/monit_t60/veure_t60.sh trassa_8888
fn_LOG="/home/sebas/logs/monit_t60.log"
echo -e "\n=== (`date -R`) === ($HOSTNAME) === ($0) === ($(whoami)) ===" >> $fn_LOG 2>&1
traceroute -n 8.8.8.8 >> $fn_LOG 2>&1
exit 0
webmin i acces des l'exterior
Instalem webmin al Ubuntu del T60 : url
Hi obrim acces des l'exterior : url
Backup mensual T60
- programa : /home/sebas/eines/backup/fer_backup.sh
- configuracio : /home/sebas/eines/backup/llista_fitxers.txt
- log : /home/sebas/logs/fer_backup.log
- destinacio : envia a z.beto@tine.kat (pomnia a pru.era@tine.kat)
- fitxers :
- network configuration : /etc/network/interfaces
- DNS configuration : /etc/resolv.conf
- netplan configuration : /etc/netplan/50-cloud-init.yaml
- Network Manager configuration : /etc/NetworkManager/NetworkManager.conf
- /etc/ssh/sshd_banner.txt i /etc/ssh/sshd_config
bash code
$ cat /home/sebas/eines/backup/fer_backup.sh
szBody="[$HOSTNAME] [$time_stamp] ($0) mutt sends ($cnt) files from T60."
szSubj=$szBody
echo "$szBody" | mutt -d 5 -s "$szSubj" -a "$fn_final" -- $DESTI
rv=$?
echo "mail rc" $rv
df -h from Ubuntu
sebas@T60ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 74G 52M 70G 1% /mnt/hdd-80GB *** dead 20190305 ***
/dev/sdb1 146G 8,1G 131G 6% /
udev 1,5G 0 1,5G 0% /dev
tmpfs 302M 5,1M 297M 2% /run
tmpfs 1,5G 208K 1,5G 1% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 1,5G 0 1,5G 0% /sys/fs/cgroup
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 302M 68K 302M 1% /run/user/1000
/dev/sda
sebas@T60ubuntu:~$ sudo hdparm -i /dev/sda
/dev/sda:
Model=HTS541080G9AT00, FwRev=MB4IA60A, SerialNo=MPB4AAX6GR2U9F
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=DualPortCache, BuffSize=7539kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a: ATA/ATAPI-2,3,4,5,6
* signifies the current active mode
/dev/sdb
sebas@T60ubuntu:~$ sudo hdparm -i /dev/sdb
/dev/sdb:
Model=HITACHI HTS723216L9SA60, FwRev=FC2ZC50B, SerialNo=090704FC1220NCH8VHKH
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=DualPortCache, BuffSize=15058kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312581808
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
Drive conforms to: unknown: ATA/ATAPI-2,3,4,5,6,7
* signifies the current active mode
lshw
sebas@T60ubuntu:~$ sudo lshw -C network
*-network
description: Ethernet interface
product: 82573L Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 00
serial: 00:24:7e:14:2d:14
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.5-1 ip=192.168.1.60 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:29 memory:ee000000-ee01ffff ioport:2000(size=32)
*-network
description: Wireless interface
product: AR5212 802.11abg NIC
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlan0
version: 01
serial: 00:16:cf:5b:4d:a6
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath5k driverversion=4.15.0-101-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:17 memory:edf00000-edf0ffff
lspci from Ubuntu
sebas@T60ubuntu:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 4 (rev 02)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02)
02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller
03:00.0 Ethernet controller: Qualcomm Atheros AR5212 802.11abg NIC (rev 01)
15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
T60 wireless card
Per saber-ne el tipus, fem servir "lspci" :
sebas@T60ubuntu:~$ lspci
03:00.0 Ethernet controller: Qualcomm Atheros AR5212 802.11abg NIC (rev 01)
drivers in use
Com saber quin driver fa servir la tarja de wifi "Qualcomm Atheros AR5212" ?
USB bits under ubuntu
Te una boca a l'esquerra i dos ala dreta.
Format USB
- $ df -h : identify volume - /dev/sdc1
- $ sudo umount /dev/sdc1 : un-mount
- $ sudo mkfs.ext4 /dev/sdc1 : format
quan posem un USB ...
lateral esquerre
sebas@T60ubuntu:~$ tail -f /var/log/syslog
Mar 4 10:40:04 T60ubuntu kernel: [ 234.972057] usb 1-5: new high-speed USB device number 2 using ehci-pci
Mar 4 10:40:04 T60ubuntu kernel: [ 235.130809] usb 1-5: New USB device found, idVendor=0930, idProduct=6545
Mar 4 10:40:04 T60ubuntu kernel: [ 235.130816] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 4 10:40:04 T60ubuntu kernel: [ 235.130820] usb 1-5: Product: USB Flash Memory
Mar 4 10:40:04 T60ubuntu kernel: [ 235.130825] usb 1-5: Manufacturer:
Mar 4 10:40:04 T60ubuntu kernel: [ 235.130829] usb 1-5: SerialNumber: 001D0F0C73BFB910331500C8
Mar 4 10:40:04 T60ubuntu mtp-probe: checking bus 1, device 2: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5"
Mar 4 10:40:04 T60ubuntu mtp-probe: bus: 1, device: 2 was not an MTP device
Mar 4 10:40:05 T60ubuntu kernel: [ 235.513855] usb-storage 1-5:1.0: USB Mass Storage device detected
Mar 4 10:40:05 T60ubuntu kernel: [ 235.531894] scsi host6: usb-storage 1-5:1.0
Mar 4 10:40:05 T60ubuntu kernel: [ 235.533869] usbcore: registered new interface driver usb-storage
Mar 4 10:40:05 T60ubuntu kernel: [ 235.621647] usbcore: registered new interface driver uas
Mar 4 10:40:05 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5
Mar 4 10:40:05 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0
Mar 4 10:40:06 T60ubuntu kernel: [ 236.581650] scsi 6:0:0:0: Direct-Access USB Flash Memory PMAP PQ: 0 ANSI: 0 CCS
Mar 4 10:40:06 T60ubuntu kernel: [ 236.585963] sd 6:0:0:0: Attached scsi generic sg2 type 0
Mar 4 10:40:07 T60ubuntu kernel: [ 238.299652] sd 6:0:0:0: [sdc] 15687680 512-byte logical blocks: (8.03 GB/7.48 GiB)
Mar 4 10:40:07 T60ubuntu kernel: [ 238.301565] sd 6:0:0:0: [sdc] Write Protect is off
Mar 4 10:40:07 T60ubuntu kernel: [ 238.301571] sd 6:0:0:0: [sdc] Mode Sense: 23 00 00 00
Mar 4 10:40:07 T60ubuntu kernel: [ 238.302255] sd 6:0:0:0: [sdc] No Caching mode page found
Mar 4 10:40:07 T60ubuntu kernel: [ 238.302265] sd 6:0:0:0: [sdc] Assuming drive cache: write through
Mar 4 10:40:10 T60ubuntu kernel: [ 240.585045] sdc: sdc1
Mar 4 10:40:10 T60ubuntu kernel: [ 240.590826] sd 6:0:0:0: [sdc] Attached SCSI removable disk
Mar 4 10:40:14 T60ubuntu systemd[1]: Created slice system-clean\x2dmount\x2dpoint.slice.
Mar 4 10:40:14 T60ubuntu systemd[1]: Started Clean the /media/sebas/20190108-CO mount point.
Mar 4 10:40:14 T60ubuntu udisksd[744]: Mounted /dev/sdc1 at /media/sebas/20190108-CO on behalf of uid 1000
lateral dret (any)
sebas@T60ubuntu:~$ tail -f /var/log/syslog
Mar 4 10:44:35 T60ubuntu kernel: [ 505.612063] usb 1-2: new high-speed USB device number 3 using ehci-pci
Mar 4 10:44:35 T60ubuntu kernel: [ 505.770832] usb 1-2: New USB device found, idVendor=1d0d, idProduct=0213
Mar 4 10:44:35 T60ubuntu kernel: [ 505.770840] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 4 10:44:35 T60ubuntu kernel: [ 505.770844] usb 1-2: Product: Trans-It Drive
Mar 4 10:44:35 T60ubuntu kernel: [ 505.770848] usb 1-2: Manufacturer: TDKMedia
Mar 4 10:44:35 T60ubuntu kernel: [ 505.770852] usb 1-2: SerialNumber: 0793021703CF
Mar 4 10:44:35 T60ubuntu kernel: [ 505.776506] usb-storage 1-2:1.0: USB Mass Storage device detected
Mar 4 10:44:35 T60ubuntu kernel: [ 505.781139] scsi host7: usb-storage 1-2:1.0
Mar 4 10:44:35 T60ubuntu mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2"
Mar 4 10:44:35 T60ubuntu mtp-probe: bus: 1, device: 3 was not an MTP device
Mar 4 10:44:35 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0
Mar 4 10:44:35 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2
Mar 4 10:44:36 T60ubuntu kernel: [ 506.820508] scsi 7:0:0:0: Direct-Access TDKMedia Trans-It Drive PMAP PQ: 0 ANSI: 0 CCS
Mar 4 10:44:36 T60ubuntu kernel: [ 506.823025] sd 7:0:0:0: Attached scsi generic sg3 type 0
Mar 4 10:44:38 T60ubuntu kernel: [ 508.672091] sd 7:0:0:0: [sdd] 15630336 512-byte logical blocks: (8.00 GB/7.45 GiB)
Mar 4 10:44:38 T60ubuntu kernel: [ 508.672692] sd 7:0:0:0: [sdd] Write Protect is off
Mar 4 10:44:38 T60ubuntu kernel: [ 508.672698] sd 7:0:0:0: [sdd] Mode Sense: 23 00 00 00
Mar 4 10:44:38 T60ubuntu kernel: [ 508.673313] sd 7:0:0:0: [sdd] No Caching mode page found
Mar 4 10:44:38 T60ubuntu kernel: [ 508.673324] sd 7:0:0:0: [sdd] Assuming drive cache: write through
Mar 4 10:44:40 T60ubuntu kernel: [ 510.950380] sdd: sdd1
Mar 4 10:44:40 T60ubuntu kernel: [ 510.955560] sd 7:0:0:0: [sdd] Attached SCSI removable disk
Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Version 2017.3.23 integrated FUSE 28
Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Mounted /dev/sdd1 (Read-Write, label "sag_8gb", NTFS 3.1)
Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Cmdline options: rw,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2
Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Mount options: rw,nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdd1,blkdev,blksize=4096
Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Global ownership and permissions enforced, configuration type 7
Mar 4 10:44:41 T60ubuntu systemd[1]: Started Clean the /media/sebas/sag_8gb mount point.
How to disable GUI
# disable GUI on boot
sebas@T60ubuntu:~$ sudo systemctl set-default multi-user.target
Created symlink /etc/systemd/system/default.target â /lib/systemd/system/multi-user.target.
sudo systemctl set-default graphical.target # enable GUI again
sudo systemctl start gdm3.service # start Gnome session on a system without a current GUI
sudo systemctl stop gdm3.service # shutdown GDM once started manually
askubuntu
Reinstall Ubuntu (desktop) in T60
Com que la xarxa wifi no funciona en el Ubuntu-server que tenia,
primer provo de pujar a v 20 :
$ sudo do-release-upgrade
Sorry, no more upgrades for this system
There will not be any further Ubuntu releases for this system's 'i386' architecture.
Aixi, reinstalo Ubuntu, ara en el "flavor" de "Desktop" :
- get ubuntu-18.04.4-desktop-amd64.iso.torrent -> ubuntu-18.04.4-desktop-amd64.iso
- insert USB and launch "Startup Disk Creator"
- if all parameters are ok, click "Make Startup Disk"
- boot from USB and follow on-screen instructions
- "this kernel requires an x86-64 CPU but it only detects an i686 CPU"
- get 32-bit 16.04 : ubuntu-16.04.6-desktop-i386.iso
- s'instala perfectament :
sebas@t60:~$ uname -a
Linux t60 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:44:23 UTC 2020 i686 i686 i686 GNU/Linux
sebas@t60:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
- per treballar remotament, posem :
$ sudo apt-get install openssh-server
- posem la IP fixe ; network wlan0 configuration to set fixed IP : /etc/NetworkManager/system-connections/WLAN_GAS2
[ipv4]
method=manual
dns=8.8.8.8;8.8.4.4;
address1=192.168.1.121/24,192.168.1.1
- detectem una versio superior : upgrade - there is a new version of Ubuntu : 18.04 Bionic Beaver - la instalem
sebas@t60:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
- reposem codi propi :
- nou codi :
- la webcam via USB es veu a /dev/video0
servei engegada T60
Fem
- definim una feina a fer :
sebas@t60:~$ cat /home/sebastia/eines/t60_servei_start.sh
#!/bin/bash
szLfn='/home/sebastia/logs/servei_engegar.log'
date_name=`date +"Y%y/M%m/D%d"`
time_name=`date +"h%H:m%M"`
szTs="$date_name - $time_name"
szTG="($szTs) ([$HOSTNAME]) boot."
echo '+++ RC servei enviar TG = '$szTG >> $szLfn
/home/sebastia/python/telegram/client.py "$szTG"
rc=$?
echo '--- RC servei enviar TG = '$rc >> $szLfn
exit 0
- definim el servei :
sebastia@t60:~$ cat /home/sebastia/.config/systemd/user/t60_start.service
[Unit]
Description=Servei de engegada del T60
[Service]
Type=idle
ExecStartPre=/bin/sleep 30
ExecStart=/home/sebastia/eines/t60_servei_start.sh
[Install]
WantedBy=default.target
- enable the service :
sebastia@t60:~/eines$ systemctl --user enable t60_start.service
Created symlink /home/sebastia/.config/systemd/user/default.target.wants/t60_start.service → /home/sebastia/.config/systemd/user/t60_start.service
- reboot
- verify the service status :
sebastia@t60:~/.config/systemd/user$ systemctl status --user t60_start.service
● t60_start.service - Servei de engegada del T60
Loaded: loaded (/home/sebastia/.config/systemd/user/t60_start.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2020-06-22 23:04:41 CEST; 7min ago
Process: 1999 ExecStart=/home/sebastia/eines/t60_servei_start.sh (code=exited, status=0/SUCCESS)
Process: 1385 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
Main PID: 1999 (code=exited, status=0/SUCCESS)
jun 22 23:04:08 t60 systemd[1372]: Started Servei de engegada del T60.
- verify the job was done : '/home/sebastia/logs/servei_engegar.log'