Slitaz Ultimate guide - personal notes

Aller au contenu | Aller au menu | Aller à la recherche

samedi 12 octobre 2019

reinstall grub without reinstall slitaz

just a little help doc to reinstall grub, after the installation of another operating system for example; boot on slitaz usb key, then open terminal :

    grub

then :

    root (hd0,0) #or (hd0,1)
    setup (hd0)

this will reinstall grub on the main hard drive.

dimanche 19 mai 2019

slitaz as an hotspot - share your wired or phone/usb connection through laptop wifi

here another howto for sharing your internet connection from wired ethernet cable or usb thethering to wifi using your computer as an hotspot

overview :

    smartphone android device acting as tethering interface, is usb0
    wired or cable ethernet interface is eth0
    wireless or wifi lan, as WLAN, is wlan0


first, plug and enable your wan interface then regarding what type of interface...
for an usb tethering, ask for a DHCP lease to your phone, after enabled it on your android device :

    udhcpc -i usb0

for a cable/wired rj45 interface, as eth0 on your linux system, just do :

    udhcpc -i eth0


Now, setup the LAN side, as using the WLAN (for Wireless or Wifi Lan interface) as a router :

    ip l set wlan0 up
    ip a add 192.168.55.1/24 dev wlan0


so here we have a wlan interface with ip address on it, now let's enable hotspot on it :

  • first install hostapd software
  • then in /etc/hostapd/hostapd.conf :
    interface=wlan0
    driver=nl80211
    ssid=myhotspot
    hw_mode=g
    channel=1
    auth_algs=1
    wpa=3
    wpa_passphrase=0987654321
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP
    wpa_pairwise=CCMP
    beacon_int=100
    dtim_period=2
    max_num_sta=255
    rts_threshold=2347
    fragm_threshold=2346



then don't forget to install dnsmasq
then edit /etc/dnsmasq.conf :

    interface=wlan0
    bind-interfaces
    domain=example.com
    dhcp-option=3,192.168.55.1
    dhcp-option=6,192.168.55.1
    dhcp-range=192.168.55.10,192.168.55.30,12h



then dont forget to enable routing :

    echo 1 > /proc/sys/net/ipv4/ip_forward

then iptables routing :

    iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE

then to start services !

    /etc/init.d/dnsmasq start
    /etc/init.d/hostapd start

normally, it shoud work itself

mercredi 14 février 2018

slitaz 3 : enable ipv6 for applications (ssh, dropbear..)

if you are running slitaz 3, installed linux-ipv6, you can use ipv6 on your computer.. but incoming packets are gonna mess if you dont enable bind ipv6 in the sysctl.

i explain : by default slitaz 3 doesnt handle ipv6. You can install it.

then you will see that only ping/icmp can reach your computer by ipv6, but ssh is not allowed on v6.

to fix this, just add in you /etc/init.d/local.sh :

    sysctl -w net.ipv6.bindv6only=1

with this, ssh should allow incoming ipv6 connections

lundi 8 janvier 2018

slitaz mount hard disk HDD partition at startup

here you can see how to automount your HDD/windows partition when slitaz starts:

just enter in /etc/fstab :

    /dev/sdaN      ntfs     defauts

mardi 2 janvier 2018

Libreoffice slitaz dont fuck anymore with get-something

hello

this is for people who encouter issues with libreoffice installation on slitaz;
as expercienced, get-libreoffice, or others get-LibreOffice are not always working on slitaz repo, so here is the link of libreoffice.tazpkg, which can be installed just by a tazpkg install :

LibreOffice-5.4.0.tazpkg

vendredi 3 novembre 2017

lx panel - restart it normally

on some PC running slitaz, it happens that you are doing an activity which takes too much memory/ram.
in this case, your GUI/panel just goes down and disappear; it's a problem of memory, it could be restarted by the following one:

    /usr/bin/killall lxpanel && /usr/bin/lxpanel --profile slitaz &



if its not working, just do :

    lxpanel --profile slitaz&

Access to LVM volumes

if you have another linux installation, or if you just want to enable access on LVM volumes with slitaz, just do :

    vgchange -ay
    mount /path/to/your/lvm/volume /media/foldertomount

dimanche 27 août 2017

[from dl0r4h.free.fr] slitaz x86/32bits: opera / google chrome web-browsers

english will follow



dans ce billet sont à disposition les navigateurs web version x86 (32bits) Opera et google chrome. Opera est disponible ici, et ici ; pour l'installer, il suffit de decompresser l'archive et de lancer le ./install en suivant les instructions;



pour chrome, il est disponible ici sous forme de tazpkg (fonctionnel sous slitaz 5), et permet donc d'etre installé en ligne de commande via tazpkg install xx.tazpkg



in this one are available x86 (32bits) web-browsers for Opera and google chrome opera is available here, and here. To install it, you just have to extract the archive and to launch the ./install following the instructions



for google chrome, it's available here, through a .tazpkg (working on slitaz 5) and could be installed in command line using tazpkg install xx.tazpkg

hope this helps




ADBLOCK+ for chrome:

chrome adblock plus :
install the extension by clic-dropping to the extension zone ( download adblock extension here )
click on install when asked
you can disable non intrusive advertising
enable both adblock lists
allow adblock in privacy mode

lundi 21 août 2017

Slitaz : Failed to execute login commande - Resolution - Fix it

A - check your / and your /home containts AT LEAST 10MB free space

B - check permission on personnal file:

     tux@slitaz:~$ ls -la .Xauthority
     -rw--- 1 tux users 51 Feb 25 14:50 .Xauthority







approved by slitaz community/mojo:

if /root/.xinitrc is deleted or missing:

     root@slitaz: cp  /home/tux/.xinitrc  /root/.xinitrc



then check his permissions:

     tux@slitaz:~$ ls -la /root/.xinitrc
     -rw-rr    1 root     root          681 Jun 23 23:21 /root/.xinitrc



if does not match with RW/R/R do:

     root@slitaz: chmod 644 /root/.xinitrc



if problem of file owner :

     root@slitaz: chown root:root /root/.xinitrc

lundi 22 mai 2017

SSH X11 FORWARDING SLITAZ

you probably get the following error :

    OpenSSL version mismatch. Built against 1000100f, you have 1000004f
    Warning: untrusted X11 forwarding setup failed: xauth key data not generated
    Warning: No xauth data; using fake authentication data for X11 forwarding.

or

    WARNING : Ignoring unknown option -X
    WARNING : Ignoring unknown option -C



that's mean your dropbear client doesnt support X11 xorg forwarding.
Dropbear server supports it, but not client one.

SO you will have to replace dropbear's ssh client with openssh client.

Firstly, download the follow :

    http://download.tuxfamily.org/slitaz//packages/3.0/libcrypto-0.9.8l.tazpkg
    http://download.tuxfamily.org/slitaz//packages/3.0/openssh-5.4p1.tazpkg
    http://download.tuxfamily.org/slitaz//packages/3.0/openssl-0.9.8l.tazpkg

you will need to remove openssh and openssl by :

    tazpkg remove openssl
    tazpkg remove openssh

answer Y for the first, N for the second, for both SSH/SSL to avoid removing dependencies



then, tazpkg install of all three downloaded packets.
then you have an ssh client working, just add these few lines to the .ssh/config to allow xorg forwarding :

then add in .ssh/config:

    Host *
    ForwardX11Trusted yes
    ForwardX11 yes



then it SHOULD work





Important Update!

to avoid SSL problems with ssh/wget/wpa_supplicants and more, please ensure that you have both : libcrypto.so.1.0.0 libcrypto.so.0.9.8 into your /usr/lib directory

otherwise some apps may not working at all

SSH OPENSSL Warning: untrusted X11 forwarding setup failed: xauth key data not generated Warning: No xauth data; using fake authentication data for X11 forwarding. How To Fix It

in the case to connect to an SSH server using X11 with XorgForwarding, you can get this error :

    Warning: untrusted X11 forwarding setup failed: xauth key data not generated

Warning: No xauth data; using fake authentication data for X11 forwarding.


that mean your openssl/openssh versions mismatch. To fix it, you have to find a way to get the same version for both of them. The better way is to uninstall both openssl/openssh, then installing them from a common repository, released at the same time, to avoid issues.

eg, with slitaz, you get the error :

    OpenSSL version mismatch. Built against 1000100f, you have 1000004f



then you have to

    tazpkg remove openssl

answer first by Y and then by N then to

    tazpkg remove openssh

answer first by T then by N

then download or wget the follow :

http://download.tuxfamily.org/slitaz//packages/3.0/libcrypto-0.9.8l.tazpkg
http://download.tuxfamily.org/slitaz//packages/3.0/openssh-5.4p1.tazpkg
http://download.tuxfamily.org/slitaz//packages/3.0/openssl-0.9.8l.tazpkg


when downloaded, just do a tazpkg install package.tazpkg for all three.

then add in your .ssh.config:

    Host *
    ForwardX11Trusted yes
    ForwardX11 yes

it SHOULD work





Important Update!

to avoid SSL problems with ssh/wget/wpa_supplicants and more, please ensure that you have both : libcrypto.so.1.0.0 libcrypto.so.0.9.8 into your /usr/lib directory

otherwise some apps may not working at all

SSH OpenSSL version mismatch. Built against 1000100f, you have 1000004f - SOLUTION - HOWTO FIX IT

in the case to connect to an SSH server using X11 with XorgForwarding, you can get this error :

    OpenSSL version mismatch. Built against 1000100f, you have 1000004f


that mean your openssl/openssh versions mismatch. To fix it, you have to find a way to get the same version for both of them. The better way is to uninstall both openssl/openssh, then installing them from a common repository, released at the same time, to avoid issues.

eg, with slitaz, you get the error :

    OpenSSL version mismatch. Built against 1000100f, you have 1000004f



then you have to

    tazpkg remove openssl

answer first by Y and then by N then to

    tazpkg remove openssh

answer first by T then by N

then download or wget the follow :

http://download.tuxfamily.org/slitaz//packages/3.0/libcrypto-0.9.8l.tazpkg
http://download.tuxfamily.org/slitaz//packages/3.0/openssh-5.4p1.tazpkg
http://download.tuxfamily.org/slitaz//packages/3.0/openssl-0.9.8l.tazpkg


when downloaded, just do a tazpkg install package.tazpkg for all three.

then add in your .ssh.config:

    Host *
    ForwardX11Trusted yes
    ForwardX11 yes

it SHOULD work



Important Update!

to avoid SSL problems with ssh/wget/wpa_supplicants and more, please ensure that you have both : libcrypto.so.1.0.0 libcrypto.so.0.9.8 into your /usr/lib directory

otherwise some apps may not working at all

mercredi 10 mai 2017

ipv6 : discover neighboors hosts - command line

to discover for hosts on an ipv6 local network, just do :
eth0 = ethernet interface (wlan0..)

    ping6 ff02::1%eth0
ip -6 neigh

jeudi 2 mars 2017

[slitaz 3/5] update time by ntp - mettre a jour l'heure par internet

in slitaz to update the time, you can do : on slitaz 5 :

    ntpd -p pool.ntp.org

on slitaz 3 :

    rdate -s nets.org.sg

and after, to write it in the bios :

    hwclock -w




sous slitaz pour mettre à jour l'heure vous pouvez entrer: sur slitaz 5 :

    ntpd -p pool.ntp.org

sur slitaz 3 :

    rdate -s nets.org.sg

ensuite, pour mettre à jour l'heure du bios :

    hwclock -w

dimanche 12 février 2017

slitaz as a router - connection sharing, wired an wifi - partage de connexion wifi et cablé

slitaz : use your laptop as a router, to share through wifi your wired connection (as an hotspot), or through wired network your wifi connection (as a wifi client)

Wifi as wireless WAN on eth0
Wired network as LAN on eth1

    eth0 is up, with an IP from DHCP on the WAN side
    eth1 is up, on the LAN side



first, install iptables:

    tazpkg get-install iptables

then, enable the packet forwarding :

    echo 1 > /proc/sys/net/ipv4/ip_forward

add the 192.168.1.1 ip to the lan interface (eth1) as follow:

    ip address add 192.168.1.1/24 dev eth1

then ask to iptables to do Network Address Translation to ensure internet will be accessible from the lan network :

    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


then ensure you've got a dhcp server running on eth1 or use static ip on your network

keywords : wifi sharing to wired ethernet slitaz as a router iptables lan wan

jeudi 19 janvier 2017

Slitaz: customize your resolution - changer sa définition d'écran

in slitaz sometimes you are blocked to a resolution depending on your graphic card, but which does not match to your screen resolution. For example, slitaz could set a resolution at 800x600 even if your screen allows 1024x768 or higher.

The solution described below permit to increase your screen resolution, by updating your xorg configuration as follow :


slitaz vous restreint parfois à une résolution en fonction de la carte graphique, sans prendre en compte celle de votre écran. Par exemple, il arrive que slitaz limite votre résolution à 800x600 meme si votre écran sait gérer 1024x768 pixels ou plus. Il faut alors mettre à jour votre fichier de configuration xorg comme suit :


    Section "monitor"
    HorizSync 28-73
    SubSection "Display"
    Depth 16
    Modes "1024x768"


With this, your resolution should be updated

vendredi 16 décembre 2016

linux : easily change the mac address of an ethernet card

to easily change the mac address of an interface with linux, you have to (where wlan0 is your ethernet card):

    ip link set wlan0 down
    ip link set dev wlan0 address ea:ba:12:ef:4a:2c
    ip link set wlan0 up



with this the chosen ethernet card is supposed to be using the new mac address




pour changer facilement l'adresse mac d'une interface sous linux, il est possible d'utiliser la commande ip :

    ip link set wlan0 down
    ip link set dev wlan0 address ea:ba:12:ef:4a:2c
    ip link set wlan0 up

avec ca la carte réseau choisir est supposée utiliser la nouvelle adresse mac définie

mercredi 2 novembre 2016

slitaz: set date and time by NTP

with slitaz, the best embedded-tool to set up time from the ntp servers is this one :

    ntpd -p nl.pool.ntp.org

then, it's possible to write it directly into the bios :

    hwclock -w

samedi 28 mai 2016

[Linux/Slitaz 3/5] enable dropbear ssh server at startup boot on a customized port -- activer le service ssh dropbear au démarrage sur un port spécifique

in slitaz it is possible to enable dropbear ssh server at startup as a service, and to open ssh connections on port 12345
In root, first open the file :

    /etc/rcS.conf

and then add like :

    RUN_DAEMONS="firewall httpd dropbear"

it will automatically start the dropbear ssh daemon at each startup
to change the ssh connection port of dropbear :
in root edit the file :

    /etc/daemons.conf

and then change as :

    DROPBEAR_OPTIONS="-w -g -b /etc/dropbear/banner -p 12345"

and it should be then listening for connections on port 12345

FR: sous slitaz, il est possible de démarrer automatiquement le serveur ssh via dropbear au démarrage, et d'en changer son port d'écoute.
Pour le démarrer automatiquement, éditer en root le fichier

    /etc/rcS.conf

et ensuite ajouter tel :

    RUN_DAEMONS="firewall httpd dropbear"

Ceci ajoutera automatiquement le service ssh dropbear au démarrage.
Il est également possible d'en changer le port d'écoute:
Editer en root le fichier

    /etc/daemons.conf

et ensuite modifier tel :

    DROPBEAR_OPTIONS="-w -g -b /etc/dropbear/banner -p 12345"

Le serveur ssh devrait ensuite écouter sur le port 12345

[Linux/slitaz 3/5] Automatic force fsck file system check at each startup -- fsck : vérification du système de fichiers à chaque démarrage

Forcefsck is the way to ask linux to do a filesystem check a the next startup. You can add manually your forcefsck file at the / root of your filesystem, but you may create it each time you need it.
There is a way to automatically create it on slitaz :
In root, edit the file :

    /etc/init.d/local.sh

and add the following just before the exit 0:

    /bin/touch /forcefsck
    /bin/touch /home/forcefsck
    exit 0

and now your computer will create at each startup the /forcefsck file in your root partition and your home partition (if separated) to ask a filesystem check the next boot.

FR : Forcefsck est une fonctionnalité permettant à linux de vérifier le système de fichier au prochain démarrage. Vous pouvez ajouter manuellement votre fichier forcefsck à la racine / de votre système de fichier ,mais vous devrez le recréer manuellement chaque fois que nécessaire.
Il existe un moyen permettant de le créer automatiquement sur slitaz :
en root, éditer le fichier :

    /etc/init.d/local.sh

et ajouter ceci juste avant le exit 0:

    /bin/touch /forcefsck
    /bin/touch /home/forcefsck
    exit 0

et maintenant l'ordinateur va créer à chaque démarrage le fichier /forcefsck dans la partition racine ainsi que la partition home (si séparée) pour demander une vérification du système de fichier au prochain démarrage

- page 1 de 2

-->