more secretwiki

This commit is contained in:
Francesco Mecca 2023-06-02 23:16:55 +02:00
parent 17efde8549
commit ed822f0a0f
5 changed files with 226 additions and 5 deletions

View File

@ -2,6 +2,10 @@
#+TITLE: Trains, trains, trains
WIP
- [[https://www.interrail.eu/en/plan-your-trip/tips-and-tricks/rail-planner-app][railplanner]], the interrail app
- prenotazioni interrail:
+ sito interrail
+ b-europe funziona?
+ trainplanet.com
* Live information on trains
live info su arrivi e partenze in base alla stazione:
https://www.bahn.de/hilfe/view/pk/en/ticketbuchung/ris.shtml

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2023-05-30 Tue 15:35 -->
<!-- 2023-06-02 Fri 22:50 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Lezzo secret wiki</title>
@ -17,9 +17,9 @@
<p>
Ogni pagina è disponibile anche in org-mode sostituendo .org a.html.
</p>
<div id="outline-container-org40fa0db" class="outline-2">
<h2 id="org40fa0db">Pagine</h2>
<div class="outline-text-2" id="text-org40fa0db">
<div id="outline-container-orgcd25ced" class="outline-2">
<h2 id="orgcd25ced">Pagine</h2>
<div class="outline-text-2" id="text-orgcd25ced">
<ul class="org-ul">
<li><a href="./hosts.html">Lezzonet: gli host</a></li>
<li><a href="./rete.html">Lezzonet: la configurazione di rete</a></li>
@ -29,13 +29,14 @@ Ogni pagina è disponibile anche in org-mode sostituendo .org a.html.
<li><a href="./sonarr.html">Sonarr</a></li>
<li><a href="./ffmpeg.html">Appunti su ffmpeg</a></li>
<li><a href="./raspi.html">Raspberry pi model table</a></li>
<li><a href="./qemu-libvirt.html">QEMU e libvirt - comandi utili</a></li>
</ul>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: bparodi</p>
<p class="date">Created: 2023-05-30 Tue 15:35</p>
<p class="date">Created: 2023-06-02 Fri 22:50</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -9,3 +9,4 @@ Ogni pagina è disponibile anche in org-mode sostituendo .org a.html.
- [[./sonarr.html][Sonarr]]
- [[./ffmpeg.html][Appunti su ffmpeg]]
- [[./raspi.html][Raspberry pi model table]]
- [[./qemu-libvirt.html][QEMU e libvirt - comandi utili]]

View File

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2023-06-02 Fri 23:16 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Lezzo secret wiki</title>
<meta name="author" content="bparodi" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="./stylesheet.css"/>
</head>
<body>
<div id="content" class="content">
<h2>[ Lezzo secret wiki ]</a></h2>
<div id="outline-container-org0e43b68" class="outline-2">
<h2 id="org0e43b68"><b>~</b> QEMU e libvirt - comandi utili</h2>
<div class="outline-text-2" id="text-org0e43b68">
</div>
<div id="outline-container-org7608206" class="outline-3">
<h3 id="org7608206">Incrementa il disco virtuale della VM</h3>
<div class="outline-text-3" id="text-org7608206">
<p>
A macchina spenta, supponendo che l'immagine si chiami "macchina.qcow2":
</p>
<pre class="example">
root@hypervisor # qemu-img resize /var/lib/libvirt/images/macchina.qcow2 +10G
</pre>
<p>
Poi bisogna usare <code>resize2fs /dev/vda1</code>, probabilmente rifacendo anche la
partizione tramite fdisk. Un esempio:
</p>
<pre class="example">
root@orazio ~# fdisk /dev/vda -l
Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E
Device Start End Sectors Size Type
/dev/vda1 2048 1050623 1048576 512M BIOS boot
/dev/vda2 1050624 50331614 49280991 23.5G Linux filesystem
</pre>
<p>
Nota come <code>Disk /dev/vda: 60 GiB</code> ma <code>/dev/vda2 ... 23.5G</code>.
</p>
<pre class="example">
root@orazio ~# fdisk /dev/vda
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): p
Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E
Device Start End Sectors Size Type
/dev/vda1 2048 1050623 1048576 512M BIOS boot
Command (m for help): n
Partition number (2-128, default 2):
First sector (1050624-125829086, default 1050624):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-125829086, default 125827071):
Created a new partition 2 of type 'Linux filesystem' and of size 59.5 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): w
The partition table has been altered.
Syncing disks.
root@orazio ~# resize2fs /dev/vda2
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/vda2 is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 8
The filesystem on /dev/vda2 is now 15597056 (4k) blocks long.
</pre>
<p>
Potrebbe anche presentarsi questo errore:
</p>
<pre class="example">
root@orazio ~ # fdisk /dev/vda
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (50331647 != 125829119) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
</pre>
<p>
In tal caso semplicemente riscrivi la tavola premendo <code>w</code> e ricomincia la procedura.
</p>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: bparodi</p>
<p class="date">Created: 2023-06-02 Fri 23:16</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>

View File

@ -0,0 +1,87 @@
#+INCLUDE: header.org
* *~* QEMU e libvirt - comandi utili
** Incrementa il disco virtuale della VM
A macchina spenta, supponendo che l'immagine si chiami "macchina.qcow2":
#+begin_src
root@hypervisor # qemu-img resize /var/lib/libvirt/images/macchina.qcow2 +10G
#+end_src
Poi bisogna usare ~resize2fs /dev/vda1~, probabilmente rifacendo anche la
partizione tramite fdisk. Un esempio:
#+begin_src
root@orazio ~# fdisk /dev/vda -l
Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E
Device Start End Sectors Size Type
/dev/vda1 2048 1050623 1048576 512M BIOS boot
/dev/vda2 1050624 50331614 49280991 23.5G Linux filesystem
#+end_src
Nota come ~Disk /dev/vda: 60 GiB~ ma ~/dev/vda2 ... 23.5G~.
#+begin_src
root@orazio ~# fdisk /dev/vda
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): p
Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E
Device Start End Sectors Size Type
/dev/vda1 2048 1050623 1048576 512M BIOS boot
Command (m for help): n
Partition number (2-128, default 2):
First sector (1050624-125829086, default 1050624):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-125829086, default 125827071):
Created a new partition 2 of type 'Linux filesystem' and of size 59.5 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): w
The partition table has been altered.
Syncing disks.
root@orazio ~# resize2fs /dev/vda2
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/vda2 is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 8
The filesystem on /dev/vda2 is now 15597056 (4k) blocks long.
#+end_src
Potrebbe anche presentarsi questo errore:
#+begin_src
root@orazio ~ # fdisk /dev/vda
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (50331647 != 125829119) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
#+end_src
In tal caso semplicemente riscrivi la tavola premendo ~w~ e ricomincia la procedura.