0

When you download an iso file for an operating system you are often encouraged to verify it by doing a checksum on it with sha and compare the result with the result provided on the website you downloaded the iso file from. I believe this is 1. For security reasons as someone might have provided you with a fake copy of the OS and 2. to check that the download of the file did not introduce any errors.

Almost every time I try and install an operating system it fails and I only get it working after days of troubleshooting and some very helpful advice from people who know more about it than I do. It also involves using quite a few disks and, more expensively, USB sticks as I try more and more approaches to the problem. Generally when it finally works I have no idea why it didn't work on all the previous attempts.

I am normally left wondering whether any of the failed cases could have been due to errors introduced into the OS when I burnt it to disk or USB. Is this ridiculously unlikely? If it is likely then would it be possible to do a checksum on the OS after it has been burnt to disk or USB and compare it to the result from someone who actually got the thing to work?

  • 1
    You're aware the USB media is made to cost; ie. it's cheap consumable media. I write hundreds of ISOs to USB media a year (I've written two just today) & find about 5-8% of ISO writes fail using SanDisk media for whatever reason, but other brands tend to have higher failures... It's why modern Ubuntu releases verify the media & report good/bad (if you take note or know where to look), but don't stress it, just write it again. Bad downloads do occur too, but are far rarer in my experience (I use zsync which verifies at the end of the download & reports) – guiverc Jul 24 '22 at 11:44
  • 1
    Modern Ubuntu media does the self-verify of the ISO, however that's turned out to be problematic for some users (eg. can take ~60 mins on some optical media for verify to complete, though not as long, takes awhile in some cloud infrastructure too, both of which can lead to timeout errors unrelated to bad media) but the checks are already there.. Also badly corrupted media can also give false passes as what if the media code itself was bad; why you should still (just as documentation states) verify the ISO before writing to media. – guiverc Jul 24 '22 at 11:46
  • @guiverc It is very helpful to have your insights. I have to admit I find USB drives quite expensive which is why I am keen to use DVDs. Also, failures are quite time consuming (even if you know what to do). Do you think USBs are more reliable than DVDs? Is the default situtation that installing Ubuntu 22.04 from DVD will result in a media integrity check? Do you reuse your USB drives for putting a new iso on and booting that? (I had a terrible time doing that and only got things to work with unused USBs hence why I am going for DVDs now)... – user3425506 Jul 24 '22 at 12:24
  • @guiverc I decided to answer yes to the other question answering my question as it does seem to cover it albeit a lot of if I can not fully understand. – user3425506 Jul 24 '22 at 12:26
  • 1
    More reliable (DVD or USB media), here the release very much matters; as changes in the ISO have meant some of the timeout issues I mentioned occur on releases of 20.10 or later, that weren't an issue before then, so for >20.10 yes I believe USB media is far more reliable (given my experience), but the difference was less before then. An example of issues with 22.04 can be read here but that's just one. Yes 22.04 on DVD validates media (where it takes a loong time & timeouts can .. – guiverc Jul 24 '22 at 12:33
  • 1
    give false-fails). YES I re-use my USB media, I couldn't afford not to. I tend to prefer SanDisk as it lasts longer on my re-use, as most of my ISOs are dailies which need re-writing the next day (ie. today's ISOs were 20220723). If you'd like to find me, I can be found on man Ubuntu IRC channels but also telegram & other like formats used by various teams (ie. more questions; there is a chat here but I use Ubuntu's SSO which can't access chat on this site sorry). You could also ask questions on https://ubuntuforums.org/ (a forum) too – guiverc Jul 24 '22 at 12:37
  • 1
    Also if you're wondering, the 22.04 links I first gave is Lubuntu related; but all Ubuntu ISOs (including flavors) are created the same way on the same launchpad platform so there are no differences. I'm on the Lubuntu team (so that's easy for me to refer there), but also other teams too & issues occur in all equally. Leó in that thread did a lot of testing using Ubuntu DVDs with more details found on bug report(s). FYI: The ISOs I'm currently QA-testing are 22.04.1 and I'm using re-using thumb-drives, and only use optical if I need to. – guiverc Jul 24 '22 at 12:49
  • @guiverc Thanks for putting me in the picture. Please can you tell me how you prepare your SanDisk USB drives for reusing. I have only been successful using them once for installing OSes before. It seems like USB drives are going to be more satisfactory than DVDs. – user3425506 Jul 24 '22 at 16:29
  • When I say " I have only been successful using them once for installing OSes before" I mean only once per USB drive. Ie. I can't seem to re use the USB drive for putting a different OS on and installing that. I can reuse the drive for putting other files on. – user3425506 Jul 24 '22 at 16:47
  • 2
    If you use a cloning tool to create a USB boot drive, you can use md5sum or sha256sum on the iso file and on the USB drive, but you must only read the same number of bytes from the drive as from the iso files (otherwise you get a false negative result). And you can filter via dd to read the correct number of bytes. This is to check the cloning (and cloning is a robust process, try mkusb and select cloning. – sudodus Jul 24 '22 at 19:55
  • 2
    When I want to write a thumb-drive; I hunt for the thumb-drive I store that ISO on (most annoying part), insert it into the machine I'll use to write & enter the dus command I use to write the ISO. If using a machine where I don't have mkusb installed (tool I use 99% of the time) I'll maybe use dd, gnome-disks or another tool to write but no preparation is done to thumb-drive except my hunting for the thumb-drive that has the letter(s) written on it that represents the ISO I just zsync'd (if I don't know the letter(s) I've a chart on the wall but any thumb-drive would work) – guiverc Jul 24 '22 at 22:39

0 Answers0