[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SOLVED



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


Reply to: