Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Pagina non alterabile
  • Informazioni
  • Allegati
  • Differenze per "jeremie2/Prove10"
Differenze tra le versioni 4 e 35 (in 31 versioni)
Versione 4 del 10/10/2018 20.01.20
Dimensione: 4738
Autore: jeremie2
Commento:
Versione 35 del 28/03/2026 18.22.18
Dimensione: 5286
Autore: jeremie2
Commento:
Le cancellazioni sono segnalate in questo modo. Le aggiunte sono segnalate in questo modo.
Linea 1: Linea 1:
#format wiki
#LANGUAGE it
## page was renamed from GruppoDocumentazione/NuovoRilascio/ScriptHashSHA256Sum
#page created by wilecoyote
<<Indice(depth=2)>>
Linea 4: Linea 5:
<<Indice>>
<<Informazioni(forum="http://forum.ubuntu-it.org/viewtopic.php?f=46&t=597941")>>
<<Informazioni(forum=http://forum.ubuntu-it.org/viewtopic.php?t=641900; rilasci="22.04 24.04 25.10 26.04")>>
Linea 9: Linea 9:
In questa pagina vengono elencati i collegamenti da cui è possibile scaricare le immagini `iso` di '''Ubuntu 18.10 «Cosmic Cuttlefish»''' e delle sue derivate tramite protocollo [[http://it.wikipedia.org/wiki/BitTorrent|BitTorrent]]. Nelle pagine di download di Ubuntu, oltre alle immagini '''iso''' del sistema operativo, è regolarmente presente il file '''SHA256SUM''' con l'elenco delle impronte SHA256Sum di ciascun file `iso`.
Linea 11: Linea 11:
Fare riferimento alla pagina [[Installazione/RequisitiDiSistema|requisti di sistema]] per scegliere la distribuzione più adatta alla propria configurazione hardware. In questa pagina viene mostrato l'utilizzo di uno '''script''' in grado di rilevare dalle pagine di download tutte le impronte SHA256Sum di Ubuntu e derivate a seconda del numero di versione (22.04, 24.04, ecc..).<<BR>>
Per ogni versione verrà creato un file con l'elenco delle hash per le `iso` di Ubuntu e derivate.
Linea 13: Linea 14:
Se si possiede un pc con processore a 64bit con architettura [[http://it.wikipedia.org/wiki/AMD64|x86-64]], si consiglia di installare la [[Hardware/Architettura64Bit|versione per amd64]]. = Script =
Linea 15: Linea 16:
## start Il seguente script richiede l'[[AmministrazioneSistema/InstallareProgrammi|installazione]] del pacchetto [[apt://aiohttp-wsgi-serve|aiohttp-wsgi-serve]]. In caso di problemi è possibile utilizzare uno script [[#alternativo|alternativo]].
Linea 17: Linea 18:
= 18.10 LTS =
== Ubuntu ==
{{{
import aiohttp
import asyncio
Linea 20: Linea 22:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<#f7f7f7>'''Desktop DVD'''|| [[http://old-releases.ubuntu.com/releases/cosmic/ubuntu-18.10-desktop-amd64.iso.torrent|amd64]] ||
||<#f7f7f7>'''Server'''|| [[http://old-releases.ubuntu.com/releases/cosmic/ubuntu-18.10-live-server-amd64.iso.torrent|amd64]] ||
from sys import argv
script, ubu_version = argv
Linea 24: Linea 25:
## le vecchie point release delle derivate danno sempre errore: Requested download is not authorized for use with this tracker.
## basta aggiungere l'ultima point release
## per ubuntu invece le vecchie point release sono semplicemente spostate in old-releases.ubuntu.com
ubuntu_flavours = ("kubuntu", "ubuntu-mate", "xubuntu", "lubuntu", "ubuntu-unity", "ubuntu-budgie", "ubuntustudio", "ubuntukylin", "ubuntucinnamon")
Linea 28: Linea 27:
== Kubuntu ==
Linea 30: Linea 28:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/kubuntu/releases/18.10/release/kubuntu-18.10-desktop-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/kubuntu/releases/18.10/release/kubuntu-18.10-desktop-amd64.iso.torrent|amd64]]||
def create_versions_list():
    versions = []
    versions.append("UBUNTU")
Linea 34: Linea 32:
== Lubuntu ==     for version in ubuntu_flavours:
        versions.append(version.upper())
Linea 36: Linea 35:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/lubuntu/releases/18.10/release/lubuntu-18.10-desktop-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/lubuntu/releases/18.10/release/lubuntu-18.10-desktop-amd64.iso.torrent|amd64]]||
||<|2 #f7f7f7>'''Alternate CD'''|| [[http://cdimage.ubuntu.com/lubuntu/releases/18.10/release/lubuntu-18.10-alternate-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/lubuntu/releases/18.10/release/lubuntu-18.10-alternate-amd64.iso.torrent|amd64]]||
    versions.append("SERVER_POWERPC")
    return versions
Linea 42: Linea 38:
== Ubuntu Budgie ==
Linea 44: Linea 39:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/ubuntu-budgie/releases/18.10/release/ubuntu-budgie-18.10-desktop-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/ubuntu-budgie/releases/18.10/release/ubuntu-budgie-18.10-desktop-amd64.iso.torrent|amd64]]||
def create_urls_collection():
    urls = []
Linea 48: Linea 42:
== Ubuntu Kylin ==     # Link hash Ubuntu
    link = f"https://releases.ubuntu.com/{ubu_version}/SHA256SUMS"
    urls.append(link)
Linea 50: Linea 46:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/ubuntukylin/releases/18.10/release/ubuntukylin-18.10-desktop-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/ubuntukylin/releases/18.10/release/ubuntukylin-18.10-desktop-amd64.iso.torrent|amd64]]||
    # Link hash derivate ufficiali di Ubuntu
    for flavour in ubuntu_flavours:
        link = f"https://cdimage.ubuntu.com/{flavour}/releases/{ubu_version}/release/SHA256SUMS"
        urls.append(link)
Linea 54: Linea 51:
== Ubuntu Mate ==     # Link hash versioni server alternative, ecc..
    link = f"https://cdimage.ubuntu.com/releases/{ubu_version}/release/SHA256SUMS"
    urls.append(link)
Linea 56: Linea 55:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/ubuntu-mate/releases/18.10/release/ubuntu-mate-18.10-desktop-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/ubuntu-mate/releases/18.10/release/ubuntu-mate-18.10-desktop-amd64.iso.torrent|amd64]]||
    return urls
Linea 60: Linea 57:
== Ubuntu Studio ==
Linea 62: Linea 58:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/ubuntustudio/releases/18.10/release/ubuntustudio-18.10-dvd-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/ubuntustudio/releases/18.10/release/ubuntustudio-18.10-dvd-amd64.iso.torrent|amd64]]||
async def fetch_page(session, url):
    async with session.get(url) as response:
        if response.status == 200:
            return await response.text()
        else:
            return None
Linea 66: Linea 65:
== Xubuntu ==
Linea 68: Linea 66:
||<tablestyle="width:30%; margin:1em; text-align:center;" rowstyle="background-color: #cccccc;" :30%>'''Versione''' || '''18.10''' ||
||<|2 #f7f7f7>'''Desktop DVD'''|| [[http://cdimage.ubuntu.com/xubuntu/releases/18.10/release/xubuntu-18.10-desktop-i386.iso.torrent|i386]]||
|| [[http://cdimage.ubuntu.com/xubuntu/releases/18.10/release/xubuntu-18.10-desktop-amd64.iso.torrent|amd64]]||
async def main():
    ubu_versions = create_versions_list()
    urls = create_urls_collection()
    async with aiohttp.ClientSession() as session:
        hash_pages = []
Linea 72: Linea 72:
## end         for url in urls:
            hash_pages.append(fetch_page(session, url))

        htmls = await asyncio.gather(*hash_pages)

    for flavour_name, hash_text in zip(ubu_versions, htmls):
        if hash_text is None:
            print(f"{flavour_name}\nNon presente!\n")
        else:
            print(f"{flavour_name}\n{hash_text}")


asyncio.run(main())

}}}

= Utilizzo =

Aprire un [[Ufficio/EditorDiTesto|editor di testo]], incollare il testo dello script riportato nel paragrafo precedente e salvare il file nella propria '''Home''' con il nome `script.py`

Vengono elencati qui i comandi da [[AmministrazioneSistema/Terminale|terminale]] per ogni [[Rilasci|versione supportata]]. Ogni comando creerà nella propria '''Home''' un file con all'interno l'elenco delle impronte per una specifica versione di Ubuntu. Ad esempio il file '''hash_24-04.txt''' conterrà l'elenco delle hash SHA256Sum della versione '''24.04'''.

 * '''26.04''': digitare il comando:{{{
python3 script.py 26.04 > 26-04.txt
}}}
 * '''25.10''': digitare il comando:{{{
python3 script.py 25.10 > hash_25-10.txt
}}}
 * '''24.04''': digitare il comando:{{{
python3 script.py 24.04 > hash_24-04.txt
}}}
 * '''22.04''': digitare il comando:{{{
python3 script.py 22.04 > hash_22-04.txt
}}}

<<Anchor(alternativo)>>
= Script alternativo =

Lo script è meno veloce del precedente, potrebbe richiedere vari secondi per l'esecuzione, tuttavia non richiede pacchetti aggiuntivi in una installazione standard di Ubuntu.

{{{
import urllib.request
import requests

from sys import argv
script, ubu_version = argv

ubuntu_flavours = ("kubuntu", "ubuntu-mate", "xubuntu", "lubuntu", "ubuntu-unity", "ubuntu-budgie", "ubuntustudio", "ubuntukylin", "ubuntucinnamon")

def print_hash(web_page):
    request = requests.get(web_page)
    if request.status_code == 200:
        web = urllib.request.urlopen(web_page)
        text = web.read().decode('utf_8')
        print(text)
    else:
        print("Non presente!\n")

#STAMPA HASH UBUNTU PRESENTI IN https://releases.ubuntu.com/
print("UBUNTU")
link = f"https://releases.ubuntu.com/{ubu_version}/SHA256SUMS"
print_hash(link)

#STAMPA HASH VARIANTI *BUNTU PRESENTI IN http://cdimage.ubuntu.com/
for i in ubuntu_flavours:
    link = f"https://cdimage.ubuntu.com/{i}/releases/{ubu_version}/release/SHA256SUMS"
    print(i.upper())
    print_hash(link)

#STAMPA HASH VERSIONI SERVER PRESENTI IN https://cdimage.ubuntu.com/releases/
print("SERVER_POWERPC")
link = f"https://cdimage.ubuntu.com/releases/{ubu_version}/release/SHA256SUMS"
print_hash(link)

}}}

= Ulteriori risorse =

 * [[Installazione/SHA256Sum|Hash sha256]]
 * [[Installazione/SHA256Sum/Hash|Elenco delle hash sha256]]


Guida verificata con Ubuntu: 22.04 24.04 25.10 26.04

Problemi in questa pagina? Segnalali in questa discussione

Introduzione

Nelle pagine di download di Ubuntu, oltre alle immagini iso del sistema operativo, è regolarmente presente il file SHA256SUM con l'elenco delle impronte SHA256Sum di ciascun file iso.

In questa pagina viene mostrato l'utilizzo di uno script in grado di rilevare dalle pagine di download tutte le impronte SHA256Sum di Ubuntu e derivate a seconda del numero di versione (22.04, 24.04, ecc..).
Per ogni versione verrà creato un file con l'elenco delle hash per le iso di Ubuntu e derivate.

Script

Il seguente script richiede l'installazione del pacchetto aiohttp-wsgi-serve. In caso di problemi è possibile utilizzare uno script alternativo.

import aiohttp
import asyncio

from sys import argv
script, ubu_version = argv

ubuntu_flavours = ("kubuntu", "ubuntu-mate", "xubuntu", "lubuntu", "ubuntu-unity", "ubuntu-budgie", "ubuntustudio", "ubuntukylin", "ubuntucinnamon")


def create_versions_list():
    versions = []
    versions.append("UBUNTU")

    for version in ubuntu_flavours:
        versions.append(version.upper())

    versions.append("SERVER_POWERPC")
    return versions


def create_urls_collection():
    urls = []

    # Link hash Ubuntu
    link = f"https://releases.ubuntu.com/{ubu_version}/SHA256SUMS"
    urls.append(link)

    # Link hash derivate ufficiali di Ubuntu
    for flavour in ubuntu_flavours:
        link = f"https://cdimage.ubuntu.com/{flavour}/releases/{ubu_version}/release/SHA256SUMS"
        urls.append(link)

    # Link hash versioni server alternative, ecc..
    link = f"https://cdimage.ubuntu.com/releases/{ubu_version}/release/SHA256SUMS"
    urls.append(link)

    return urls


async def fetch_page(session, url):
    async with session.get(url) as response:
        if response.status == 200:
            return await response.text()
        else:
            return None


async def main():
    ubu_versions = create_versions_list()
    urls = create_urls_collection()
    async with aiohttp.ClientSession() as session:
        hash_pages = []

        for url in urls:
            hash_pages.append(fetch_page(session, url))

        htmls = await asyncio.gather(*hash_pages)

    for flavour_name, hash_text in zip(ubu_versions, htmls):
        if hash_text is None:
            print(f"{flavour_name}\nNon presente!\n")
        else:
            print(f"{flavour_name}\n{hash_text}")


asyncio.run(main())

Utilizzo

Aprire un editor di testo, incollare il testo dello script riportato nel paragrafo precedente e salvare il file nella propria Home con il nome script.py

Vengono elencati qui i comandi da terminale per ogni versione supportata. Ogni comando creerà nella propria Home un file con all'interno l'elenco delle impronte per una specifica versione di Ubuntu. Ad esempio il file hash_24-04.txt conterrà l'elenco delle hash SHA256Sum della versione 24.04.

  • 26.04: digitare il comando:

    python3 script.py 26.04 > 26-04.txt
  • 25.10: digitare il comando:

    python3 script.py 25.10 > hash_25-10.txt
  • 24.04: digitare il comando:

    python3 script.py 24.04 > hash_24-04.txt
  • 22.04: digitare il comando:

    python3 script.py 22.04 > hash_22-04.txt

Script alternativo

Lo script è meno veloce del precedente, potrebbe richiedere vari secondi per l'esecuzione, tuttavia non richiede pacchetti aggiuntivi in una installazione standard di Ubuntu.

import urllib.request
import requests

from sys import argv
script, ubu_version = argv

ubuntu_flavours = ("kubuntu", "ubuntu-mate", "xubuntu", "lubuntu", "ubuntu-unity", "ubuntu-budgie", "ubuntustudio", "ubuntukylin", "ubuntucinnamon")

def print_hash(web_page):
    request = requests.get(web_page)
    if request.status_code == 200:
        web = urllib.request.urlopen(web_page)
        text = web.read().decode('utf_8')
        print(text)
    else:
        print("Non presente!\n")

#STAMPA HASH UBUNTU PRESENTI IN https://releases.ubuntu.com/
print("UBUNTU")
link = f"https://releases.ubuntu.com/{ubu_version}/SHA256SUMS"
print_hash(link)

#STAMPA HASH VARIANTI *BUNTU PRESENTI IN http://cdimage.ubuntu.com/
for i in ubuntu_flavours:
    link = f"https://cdimage.ubuntu.com/{i}/releases/{ubu_version}/release/SHA256SUMS"
    print(i.upper())
    print_hash(link)

#STAMPA HASH VERSIONI SERVER PRESENTI IN https://cdimage.ubuntu.com/releases/
print("SERVER_POWERPC")
link = f"https://cdimage.ubuntu.com/releases/{ubu_version}/release/SHA256SUMS"
print_hash(link)

Ulteriori risorse


CategoryInstallazioneSistema