Re: installing on Lenovo Ideapad 3 now working
On Wed, Mar 30, 2022 at 11:56:55AM +0200, Thomas Schmitt wrote: [...] > For those who do not trust themselves to choose the right /dev/sdX > i have prepared a script which asks for plugging in the USB stick > and then uses the newly appeared device file in the output of lsblk. > > https://wiki.debian.org/XorrisoDdTarget Nifty, I'll sure have a look into :) > Have a nice day :) Likewise & thanks -- t signature.asc Description: PGP signature
Re: installing on Lenovo Ideapad 3 now working
Hi, Andrew M.A. Cater wrote: > > dd if=[iso] of=/dev/sdX bs=4M oflag=sync status=progress to...@tuxteam.de wrote: > Yes, thereabouts. [...] For those who do not trust themselves to choose the right /dev/sdX i have prepared a script which asks for plugging in the USB stick and then uses the newly appeared device file in the output of lsblk. https://wiki.debian.org/XorrisoDdTarget It is meanwhile in Debian Testing https://packages.debian.org/unstable/xorriso-dd-target but can also be downloaded for other Linux systems from https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso-dd-target/xorriso-dd-target https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso-dd-target/xorriso-dd-target.sig It also unmounts possibly the possibly automounted filesystems on the USB stick and overwrites a possible GPT backup header at the end of the device. Like sudo /bin/umount /dev/sdd1 sudo /bin/umount /dev/sdd2 sudo /bin/umount /dev/sdd3 sudo /bin/dd if=/dev/zero of=/dev/'sdd' bs=512 seek='7864318' count=1 status=none sudo /bin/dd if='debian-10.0.0-amd64-netinst.iso' bs=1M of=/dev/'sdd' status=progress oflag=dsync ; sync > The default, 512, is definitely too small for somewhat-more-or-less > current-ish [1] hardware configurations. I guess dd is from a time when the drives were so slow that this did not matter. There are meanings attributed to the block size which matter with (at least) conv={block,unblock,sync}. So changing the default bs= might break very old and venerable scripts. Have a nice day :) Thomas
Re: installing on Lenovo Ideapad 3 now working
On Wed, Mar 30, 2022 at 08:43:06AM +, Andrew M.A. Cater wrote: [...] > So, something close to: > > Where sdX is the drive your USB shows up as when you do a dmesg > > dd if=[iso] of=/dev/sdX bs=4M oflag=sync status=progress Yes, thereabouts. The difference with my proposal is you are using a 4M buffer size while I had 64k. Not a big deal -- as I said, my informal measurements once gave a very broad maximum, noticeably falling off (slowly!) in the 1G region. The default, 512, is definitely too small for somewhat-more-or-less current-ish [1] hardware configurations. Cheers [1] I always buy refurbished computers :) -- t signature.asc Description: PGP signature
Re: installing on Lenovo Ideapad 3 now working
On Wed, Mar 30, 2022 at 07:14:39AM +0200, to...@tuxteam.de wrote: > On Tue, Mar 29, 2022 at 08:31:38PM +0100, Brian wrote: > > On Tue 29 Mar 2022 at 20:57:48 +0200, to...@tuxteam.de wrote: > > [...] > > > > One of the caveats with dd (or cat, or...) is that you might > > > be tempted to pull the USB stick too early [...] > > > A reasonable observation. However, it should be noted that there has > > never been a well-documneted case of dd, cat or cp failing. I doubt > > the OP will provide substantial reproducible evidence, whatever > > "worked" meant. > > What I have observed, and that is a strong hint, is that if you do > a simple "dd", it comes back as soon as the stuff is in the buffers > (they're there exactly for that). If you then do "sync", it takes > quite a while (especially for USB 2 and larger media). > > If you think things are done as soon as dd comes back and pull the > stick, chances are that your write is incomplete. > > So my recommendation is still: either do the sync or dd with > oflag=sync. > > Cheers > -- > t So, something close to: Where sdX is the drive your USB shows up as when you do a dmesg dd if=[iso] of=/dev/sdX bs=4M oflag=sync status=progress if is the input file name - the iso of is the output file to write to bs is the block size oflag=sync will sync each write and flush buffers status=progress gives you an indication of how far through the process is dd if=debian-10.12.0-amd64-i386-netinst.iso of=/dev/sdb bs=4M oflag=sync status=progress is a command I wrote the other day to write the multi-arch netinst to USB for testing the Buster release. Hope this helps - all the very best, as ever, Andy Cater
Re: installing on Lenovo Ideapad 3 now working
On Tue, Mar 29, 2022 at 08:31:38PM +0100, Brian wrote: > On Tue 29 Mar 2022 at 20:57:48 +0200, to...@tuxteam.de wrote: [...] > > One of the caveats with dd (or cat, or...) is that you might > > be tempted to pull the USB stick too early [...] > A reasonable observation. However, it should be noted that there has > never been a well-documneted case of dd, cat or cp failing. I doubt > the OP will provide substantial reproducible evidence, whatever > "worked" meant. What I have observed, and that is a strong hint, is that if you do a simple "dd", it comes back as soon as the stuff is in the buffers (they're there exactly for that). If you then do "sync", it takes quite a while (especially for USB 2 and larger media). If you think things are done as soon as dd comes back and pull the stick, chances are that your write is incomplete. So my recommendation is still: either do the sync or dd with oflag=sync. Cheers -- t signature.asc Description: PGP signature
Re: installing on Lenovo Ideapad 3 now working
On Tue 29 Mar 2022 at 20:57:48 +0200, to...@tuxteam.de wrote: > On Tue, Mar 29, 2022 at 11:16:07AM -0700, Paul Scott wrote: > > > > On 3/29/22 10:32, Andrew M.A. Cater wrote: > > [...] > > > > Again, I wouldn't use Balena Etcher - I would use dd if you have > > > a Linux machine around - you can always reformat the USB drive afterwards. > > > > > > FWIW Balena Etcher worked and my attempt with dd did not. > > One of the caveats with dd (or cat, or...) is that you might > be tempted to pull the USB stick too early, while the write > is still flushing data out. With big sticks and big RAMs the > effect is more pronounced. I have the impression that I've > had less failures since then (perhaps I'm of the impatient > kind, who knows ;-) A reasonable observation. However, it should be noted that there has never been a well-documneted case of dd, cat or cp failing. I doubt the OP will provide substantial reproducible evidence, whatever "worked" meant. -- Brian.
Re: installing on Lenovo Ideapad 3 now working
On Tue, Mar 29, 2022 at 11:16:07AM -0700, Paul Scott wrote: > > On 3/29/22 10:32, Andrew M.A. Cater wrote: [...] > > Again, I wouldn't use Balena Etcher - I would use dd if you have > > a Linux machine around - you can always reformat the USB drive afterwards. > > > FWIW Balena Etcher worked and my attempt with dd did not. One of the caveats with dd (or cat, or...) is that you might be tempted to pull the USB stick too early, while the write is still flushing data out. With big sticks and big RAMs the effect is more pronounced. I have the impression that I've had less failures since then (perhaps I'm of the impatient kind, who knows ;-) I'd recommend to use `oflag=sync': that means "use synchronous write", i.e. wait for each block to be flushed out before continuing. Besides I like `status=progress', which keeps you entertained while the operation is going on. I've experimented a bit with block sizes. 4k is on the small side, bigger blocks are a tad faster. For me there has been a (rather flat) sweet spot in the abouts of 64K. In total: dd if=/my/image/file of=/my/usb/stick bs=64k oflag=sync status=progress or something like that. Cheers -- t signature.asc Description: PGP signature
Re: installing on Lenovo Ideapad 3 now working
On 3/29/22 10:32, Andrew M.A. Cater wrote: On Tue, Mar 29, 2022 at 07:35:46AM -0700, Paul Scott wrote: Greetings, Having done many Debian installs I am now trying to install on a new Lenovo IdeaPad 3. I have disabled Trusted Platform Module and Secure Boot. I used Balena Etcher to install a Debian iso to a USB stick. Rather than a boot order that IdeaPad allows enabling USB and two network options for booting. USB has been enable for all of my many attempts. TIA for any ideas on how to solve and/or diagnose this. Paul Hi Paul, If I were you, I wouldn't start from here. I'd start by using the unofficial non-free iso that includes firmware. I would enable TPM and Secure Boot - both work in Debian 11. https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/11.3.0+nonfree/amd64/iso-cd/firmware-11.3.0-amd64-netinst.iso Again, I wouldn't use Balena Etcher - I would use dd if you have a Linux machine around - you can always reformat the USB drive afterwards. FWIW Balena Etcher worked and my attempt with dd did not. https://www.debian.org/releases/bullseye/amd64/ gives you the installation guide. I had looked first on the debian web site which worked for me every other time but didn't seem to be complete this time. F12 will give you a boot order, yes. With every good wish, as ever, The install is in process now. Thank you and others again, Paul