Lors du provisioning d'une image Packer Ubuntu, l'installation de packages échoue parfois avec l'erreur Package 'XXX' has no installation candidate
car le setup cloud-init n'est pas terminé.
La doc Packer recommande d'ajouter la step suivante:
{
"type": "shell",
"inline": [
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done"
]
}
Il est aussi possible d'utiliser /usr/bin/cloud-init status --wait
(hashicorp/packer#2639).
Sur les distribs disposant de python < 2.7.9 (ubuntu 14.04 par exemple), les modules ansible apt_key et apt_repository ne gèrent pas les urls en HTTPS.
example:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for packages.elastic.co:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine (the python executable used (/usr/bin/python) is version: 2.7.6 (default, Nov 13 2018, 12:45:42) [GCC 4.8.4]) or you can install the `urllib3`, `pyOpenSSL`, `ndg-httpsclient`, and `pyasn1` python modules to perform SNI verification in python >= 2.6. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The exception msg was: hostname 'packages.elastic.co' doesn't match 'e.sni.fastly.net'."}
Il est nécessaire d'installer les packages python-urllib3
, python-openssl
, python-pyasn1
, python-pip
et pip ndg-httpsclient
pour que cela soit fonctionnel.
example:
- name: Debian - ensure python-urllib3, python-openssl, python-pyasn1 & python-pip are installed
apt:
name: python-urllib3,python-openssl,python-pyasn1,python-pip
state: present
when: ansible_distribution_release == "trusty"
- name: Debian - ensure ndg-httpsclient pip is installed
pip:
name: ndg-httpsclient
state: present
when: ansible_distribution_release == "trusty"
xdg-open
permet d'ouvrir un fichier avec son application par défaut depuis le terminal.
Exemples:
- files pour un répertoire
- evince pour un pdf
- gedit pour un fichier texte
- firefox pour une url
- ...
Pour supprimer ou modifier les raccourcis dans la sidebar du gestionaire de fichier sous Ubuntu: vim ~/.config/user-dirs.dirs
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
$ sudo apt-get autoremove
$ sudo apt-get clean
$ sudo apt-get install update-manager-core
$ sudo do-release-upgrade
et pour upgrader depuis 14.04LTS:
http://www.tecmint.com/upgrade-ubuntu-14-04-to-16-04/
gsettings set org.gnome.settings-daemon.plugins.power button-power 'suspend'
Pour sauvegarder sur S3 avec Deja Dup sur Ubuntu:
- create your bucket on S3 without 'dot' in the name (https://github.com/boto/boto/issues/2836)
- create your iam user and attach it the following iam policy:
{"Version": "2012-10-17","Statement": [ {"Effect": "Allow","Action": ["s3:ListAllMyBuckets","s3:GetBucketLocation","s3:ListBucket"], "Resource": ["arn:aws:s3:::<MY-BUCKET-NAME>"]}, {"Effect": "Allow","Action": ["s3:DeleteObject","s3:GetObject","s3:PutObject"], "Resource": ["arn:aws:s3:::<MY-BUCKET-NAME>"]}, ]}
sudo apt install python-boto python-cloudfiles dconf-tools
- open deja-dup and select Storage -> S3 then enter your AWS Access Key
- edit the bucket name used by deja-dup with dconf:
dconf write /org/gnome/deja-dup/s3/bucket "'<MY-BUCKET-NAME>'"
- restart deja-dup then launch backup (your AWS Secure Key will be asked
Bug #1245081 “macbook keyboard layout maps the tilde key to some...” : Bugs : linux package : Ubuntu
Pour inverser le mapping des touches #@ et <> sur un clavier mac sous linux:
echo "echo 0 > /sys/module/hid_apple/parameters/iso_layout" >> /etc/rc.local
Comment installer Ubuntu sur MacOS X El Captain. C'est le créateur de Refind qui répond à la question. Testé et approuvé
- Boot the Ubuntu installer into "try without installing mode."
- Open a Terminal program window.
- In the Terminal, type ubiquity -b. This will run the Ubuntu installer, but -b tells it to not install a boot loader. If you follow advanced installation options, be sure to use ext4fs as your filesystem. Do not use a separate /boot partition unless you use LVM, RAID, or an encrypted root (/) partition. You may need to shrink your OS X partition to make room for Ubuntu (or you can do that before you start).
- When you're done, reboot, but hold down Command+R to boot into the OS X recovery environment.
- Launch a Terminal window and type csrutil disable to disable SIP.
- Reboot. The system should boot OS X normally.
- Install rEFInd.