• Re: SOLVED

    From David Christensen@21:1/5 to songbird on Sat Apr 6 09:52:11 2024
    On 4/2/24 07:55, songbird wrote:
    David Christensen wrote:
    I thought about suggesting that in my last post, but did not want to
    complicate things. A key advantage of using a CD-R disc is that you can
    verify the disc contents and/or checksum against the ISO and/or checksum
    now and in the future. This is not true for a USB flash drive, because
    the Debian installer modifies the contents of the USB flash drive when
    it runs.

    if it is an iso image copied to the USB stick it should not
    be modified if you haven't somehow told the installer to
    install the system to that USB stick (somehow).

    i guess if you wanted to be really sure you could mount it
    read-only.


    songbird


    I used to think that the d-i ran in memory when booted from read-write
    media, but discovered otherwise several years ago.


    I previously downloaded debian-11.3.0-amd64-netinst.iso and SHA512SUMS:

    2022-04-29 22:16:19 dpchrist@tinkywinky ~/samba/dpchrist/iso/debian/11.3.0
    $ ls -l
    total 380414
    -rwxr-xr-x 1 dpchrist dpchrist 494 Apr 28 21:04 SHA512SUMS
    -rwxr-xr-x 1 dpchrist dpchrist 833 Apr 28 21:04
    SHA512SUMS.sign
    -rwxr-xr-x 1 dpchrist dpchrist 396361728 Apr 28 21:05 debian-11.3.0-amd64-netinst.iso


    I verified the checksum of the ISO file:

    2022-04-29 22:17:17 dpchrist@tinkywinky ~/samba/dpchrist/iso/debian/11.3.0
    $ grep debian-11.3.0-amd64-netinst.iso SHA512SUMS | sha512sum -c
    debian-11.3.0-amd64-netinst.iso: OK


    I burned the ISO to a zeroed USB flash drive:

    2022-04-29 22:39:25 root@tinkywinky ~/hardware/adata/usb-flash-drive/REDACTED
    # time dd if=/home/dpchrist/samba/dpchrist/iso/debian/11.3.0/debian-11.3.0-amd64-netinst.iso
    of=/dev/disk/by-id/usb-ADATA_USB_Flash_Drive_1392303332110024-0\:0 bs=1M iflag=fullblock oflag=sync,noatime status=progress
    394264576 bytes (394 MB, 376 MiB) copied, 76.1204 s, 5.2 MB/s
    378+0 records in
    378+0 records out
    396361728 bytes (396 MB, 378 MiB) copied, 76.5701 s, 5.2 MB/s

    real 1m16.582s
    user 0m0.012s
    sys 0m0.584s


    I computed the checksum of the relevant blocks of the USB flash drive:

    2022-04-29 22:43:56 root@tinkywinky ~/hardware/adata/usb-flash-drive/REDACTED
    # time dd
    if=/dev/disk/by-id/usb-ADATA_USB_Flash_Drive_REDACTED-0\:0 bs=1M
    count=378 iflag=fullblock | sha512sum
    378+0 records in
    378+0 records out
    396361728 bytes (396 MB, 378 MiB) copied, 25.0641 s, 15.8 MB/s

    2810f894afab9ac2631ddd097599761c1481b85e629d6a3197fe1488713af048d37241eb85def681ba86e62b406dd9b891ee1ae7915416335b6bb000d57c1e53
    -

    real 0m25.068s
    user 0m3.468s
    sys 0m0.720s


    The USB flash drive checksum matched the value stored in SHA512SUMS:

    2022-04-29 22:44:58 root@tinkywinky ~/hardware/adata/usb-flash-drive/REDACTED
    # grep 2810f894afab9ac2631ddd097599761c1481b85e629d6a3197fe1488713af048d37241eb85def681ba86e62b406dd9b891ee1ae7915416335b6bb000d57c1e53
    /home/dpchrist/samba/dpchrist/iso/debian/11.3.0/SHA512SUMS

    2810f894afab9ac2631ddd097599761c1481b85e629d6a3197fe1488713af048d37241eb85def681ba86e62b406dd9b891ee1ae7915416335b6bb000d57c1e53
    debian-11.3.0-amd64-netinst.iso


    I have since used the USB flash drive to install Debian onto one or more computers.


    If I compute the checksum of the relevant blocks of the USB flash drive
    today:

    2024-04-02 14:32:43 root@laalaa ~
    # time dd if=/dev/disk/by-id/usb-ADATA_USB_Flash_Drive_REDACTED-0\:0
    bs=1M count=378 iflag=fullblock | sha512sum
    378+0 records in
    378+0 records out 6cbb7e54fccdf550cbb5535d7dd9357513b36b767f0aaa550b1d58b37ef827c881036dcf47b3c377d196c4e77d14c786a6dd975aa558a11a81cf9ae107062abc
    -
    396361728 bytes (396 MB, 378 MiB) copied, 27.7592 s, 14.3 MB/s

    real 0m27.766s
    user 0m4.134s
    sys 0m1.380s


    The checksum has changed because d-i modified the USB flash drive.


    I previously confirmed this behavior years ago after booting a d-i USB
    flash drive only once.


    You must use read-only media (e.g. CD-R) if you want to be able to
    verify d-i after use.


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to DdB on Sat Apr 6 09:52:32 2024
    On 4/1/24 11:35, DdB wrote:
    Am 01.04.2024 um 18:52 schrieb David Christensen:
    A bad USB flash drive would explain why you cannot boot the Debian
    installer.  Please buy a good quality USB 3.0+ flash drive and try again.

    A friend of mine just let me use an external CD-Drive with the netboot
    image.


    I thought about suggesting that in my last post, but did not want to
    complicate things. A key advantage of using a CD-R disc is that you can
    verify the disc contents and/or checksum against the ISO and/or checksum
    now and in the future. This is not true for a USB flash drive, because
    the Debian installer modifies the contents of the USB flash drive when
    it runs.


    This is already the third time, i am restarting the installation
    process, due to my false assumptions about the intelligence within the installer.

    The last time, i was quite happy until i came to notice, that partitions
    were not aligned with physical sector boundaries, which i assumed would
    be elementary best practice.


    I chose manual partitioning and the Debian installer aligned the
    partitions to 2**20 byte boundaries:

    2024-04-02 04:07:16 root@laalaa ~
    # cat /etc/debian_version ; uname -a
    11.9
    Linux laalaa 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31)
    x86_64 GNU/Linux

    2024-04-02 04:08:18 root@laalaa ~
    # fdisk -l /dev/sda
    Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
    Disk model: INTEL SSDSC2CW06
    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: dos
    Disk identifier: 0x544032f5

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 * 2048 1953791 1951744 953M 83 Linux
    /dev/sda2 1953792 3907583 1953792 954M 83 Linux
    /dev/sda3 3907584 29298687 25391104 12.1G 83 Linux
    /dev/sda4 29298688 117229567 87930880 41.9G 83 Linux



    But apart from losing some of my illusions the hard way, all is well.
    A big thank you to all the crowd offering suggestions and encouragement.

    so long, DdB


    I'm glad you were able to install Debian. :-)


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)