Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Pagina non alterabile
  • Informazioni
  • Allegati
  • Differenze per "jeremie2/Prove14"
Differenze tra le versioni 25 e 26
Versione 25 del 05/04/2024 01.35.41
Dimensione: 3657
Autore: jeremie2
Commento:
Versione 26 del 29/09/2024 20.22.32
Dimensione: 5291
Autore: jeremie2
Commento:
Le cancellazioni sono segnalate in questo modo. Le aggiunte sono segnalate in questo modo.
Linea 1: Linea 1:
## page was renamed from ImmaginiIsoArchitettureAlternative
## page was renamed from ImmaginiPowerPc
## page was renamed from PowerPCDownloads
#format wiki
#language it
## page was renamed from GruppoDocumentazione/NuovoRilascio/ScriptHashSHA256Sum
#page created by wilecoyote
<<Indice(depth=2)>>
Linea 7: Linea 5:
<<Indice>>
<<Informazioni(forum="http://forum.ubuntu-it.org/viewtopic.php?f=46&t=566751";rilasci="22.04 20.04 23.10 24.04")>>
<<Informazioni(forum=http://forum.ubuntu-it.org/viewtopic.php?t=641900; rilasci="22.04 20.04 24.04 24.10")>>
Linea 12: Linea 9:
La seguente pagina riporta i link di download delle immagini `.iso` per '''!PowerPc''', '''IBM System z''' e '''ARM'''. Tali immagini sono disponibili solo per alcune versioni/varianti di Ubuntu. 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 14: Linea 11:
{{{#!wiki tip
Se non si trova il file `iso` di una data versione/variante di Ubuntu, è comunque possibile fare riferimento al paragrafo [[#netboot|Immagini Netboot]].
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.

= Script =

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]].

{{{
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())
Linea 18: Linea 88:
{{{#!wiki important
Sulle PS3 Slim non è possibile installare Ubuntu. <<BR>>Sulle PS3 Fat non aggiornare al firmware 3.21, perché non permetterà l'installazione di altri sistemi operativi.
= 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'''.

 * '''24.10''': digitare il comando:{{{
python3 script.py 24.10 > hash_24-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
}}}
 * '''20.04''': digitare il comando:{{{
python3 script.py 20.04 > hash_20-04.txt
Linea 22: Linea 107:
= Ubuntu server = <<Anchor(alternativo)>>
= Script alternativo =
Linea 24: Linea 110:
||<tablestyle="min-width:300px; text-align:center;" -2> '''PowerPC64 Little-Endian''' ||
||'''24.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/24.04/release/ubuntu-24.04-live-server-ppc64el.iso|Download]] ||
||'''23.10''' || [[http://cdimage.ubuntu.com/ubuntu/releases/23.10/release/ubuntu-23.10-live-server-ppc64el.iso|Download]] ||
||'''22.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/22.04/release/ubuntu-22.04.4-live-server-ppc64el.iso|Download]] ||
||'''20.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/20.04/release/ubuntu-20.04.5-live-server-ppc64el.iso|Download]] ||
<<BR>>
||<tablestyle="min-width:300px; text-align:center;" -2> '''IBM System z''' ||
||'''24.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/24.04/release/ubuntu-24.04-live-server-s390x.iso|Download]] ||
||'''23.10''' || [[http://cdimage.ubuntu.com/ubuntu/releases/23.10/release/ubuntu-23.10-live-server-s390x.iso|Download]] ||
||'''22.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/22.04/release/ubuntu-22.04.4-live-server-s390x.iso|Download]] ||
||'''20.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/20.04/release/ubuntu-20.04.5-live-server-s390x.iso|Download]] ||
<<BR>>
||<tablestyle="min-width:300px; text-align:center;" -2> '''ARM64''' ||
||'''24.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/24.04/release/ubuntu-24.04.4-live-server-arm64.iso|Download]] ||
||'''23.10''' || [[http://cdimage.ubuntu.com/ubuntu/releases/23.10/release/ubuntu-23.10-live-server-arm64.iso|Download]] ||
||'''22.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/22.04/release/ubuntu-22.04.4-live-server-arm64.iso|Download]] ||
||'''20.04''' || [[http://cdimage.ubuntu.com/ubuntu/releases/20.04/release/ubuntu-20.04.5-live-server-arm64.iso|Download]] ||
Lo script è meno veloce del precedente, potrebbe richiedere vari secondi per l'esecuzione, tuttavia non richiede pacchetti aggiuntivi in una installazione standard di Ubuntu.
Linea 42: Linea 112:
<<Anchor(netboot)>>
= Immagini Netboot =
{{{
import urllib.request
import requests
Linea 45: Linea 116:
Scaricare il file `.iso`, quindi seguire le istruzioni presenti nella guida [[Installazione/CdMinimale|CdMinimale]] per l'installazione: from sys import argv
script, ubu_version = argv
Linea 47: Linea 119:
||<tablestyle="min-width:300px; text-align:center;" -2> '''PowerPC64 Little-Endian''' ||
||<: 25%> '''20.04''' ||<:> [[http://ports.ubuntu.com/ubuntu-ports/dists/focal/main/installer-ppc64el/current/legacy-images/netboot/mini.iso|Download]] ||
<<BR>>
||<tablestyle="min-width:300px; text-align:center;" -2> '''ARM64''' ||
||<: 25%> '''20.04''' ||<:> [[http://ports.ubuntu.com/ubuntu-ports/dists/focal/main/installer-arm64/current/legacy-images/netboot/mini.iso|Download]] ||
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)

}}}
Linea 55: Linea 150:
 * [[https://wiki.ubuntu.com/PowerPCDownloads|Wiki internazionale]]
 * [[Hardware/DispositiviPartizioni/MasterizzareIso|Guida alla masterizzazione delle immagini iso]]
 * [[Installazione/CdMinimale|CD Minimale]]
 * [[Installazione/SHA256Sum|Hash sha256]]
 * [[Installazione/SHA256Sum/Hash|Elenco delle hash sha256]]


Guida verificata con Ubuntu: 22.04 24.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.

  • 24.10: digitare il comando:

    python3 script.py 24.10 > hash_24-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
  • 20.04: digitare il comando:

    python3 script.py 20.04 > hash_20-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