Re: burn iso to usb

2021-08-03 Thread Gunnar Gervin
Guys and girls:
Thx a lot for crash course/s!
I have to let it go a bit;  pretty extreme learning portions here.
My head gets all wired up. But I have to go this track; for me it's all in
the terminal; it's more accurate, always works,& faster.
And I remember it way better.
Geg


On Mon, 2 Aug 2021, 22:44 Greg Wooledge,  wrote:

> On Mon, Aug 02, 2021 at 10:02:18PM +0300, Gunnar Gervin wrote:
> > pv -parle /dev/sdX
> > would rather be:
> > sudo pv -parle /dev/sdb
>
> No, that won't work.
>
> https://mywiki.wooledge.org/BashPitfalls#pf53
>
> If you want to use redirections with sudo, you either need to wrap
> things in "sh -c" a lot, or else get a full interactive shell first
> (sudo -s), and *then* run your commands with redirections.
>
>


Re: burn iso to usb

2021-08-03 Thread Gunnar Gervin
Nicolas.
Will it work if I su into Root ?
BR, geg.

On Mon, 2 Aug 2021, 22:52 Nicolas George,  wrote:

> Greg Wooledge (12021-08-02):
> > No, that won't work.
> >
> > https://mywiki.wooledge.org/BashPitfalls#pf53
> >
> > If you want to use redirections with sudo, you either need to wrap
> > things in "sh -c" a lot, or else get a full interactive shell first
> > (sudo -s), and *then* run your commands with redirections.
>
> That! And sudo was addressed in the very first mail:
>
> "I advise it over using root privileges for the cp: you could wipe your
> install if you get the device wrong."
>
> Regards,
>
> --
>   Nicolas George
>


`pv` rates (was: burn iso to usb)

2021-08-02 Thread Stefan Monnier
Anssi Saari [2021-08-02 19:04:59] wrote:
> David Wright  writes:
>> On Mon 02 Aug 2021 at 16:14:15 (+0300), Anssi Saari wrote:
>>> Stefan Monnier  writes:
>>> >>> > cp /path/to/file.iso /dev/sdX
>>> >>> dd if=whatever.iso of=/dev/sdX  
>>> >> It's up to taste.
>>> >
>>> > Not at all.  The only right answer is:
>>> >
>>> > pv -parIe /dev/sdX
>>> 
>>> Actually I'm not sure how good it is to have both -a and -r, pv doesn't
>>> really show which rate counter is which...
>>
>> No need: the rate is far more variable than its average, as time passes.
>
> I guess it depends. Before that comment I tried it on an old USB
> stick. Read speed was pretty much constant if low. So I think it was the
> left rate counter that showed current rate but wouldn't bet on it.

[ I'm glad my silly intervention brings up a more constructive
  discussion ;-)  ]

If they're both pretty much constant, they're presumably both pretty
much equal, so it doesn't matter which is which ;-)

But indeed, it's not always the case.  I'm right now using `pv` to read
data off of a broken drive (a 2TB 2½" drive which apparently has
problems seeking, resulting in a transfer rate of about 45kB/s), and
it's currently showing me 45.0KiB/s and 70.6KiB/s both of which are
quite stable.  If it weren't for the first sometimes changing to
44.xKiB/s it'd be hard to know which is which (IIUC the average is
higher because occasionally the drive gives a more reasonable transfer
rate than that measly 45kB/s).


Stefan



Re: burn iso to usb

2021-08-02 Thread tomas
On Mon, Aug 02, 2021 at 03:44:03PM -0400, Greg Wooledge wrote:
> On Mon, Aug 02, 2021 at 10:02:18PM +0300, Gunnar Gervin wrote:
> > pv -parle /dev/sdX
> > would rather be:
> > sudo pv -parle /dev/sdb
> 
> No, that won't work.
> 
> https://mywiki.wooledge.org/BashPitfalls#pf53
> 
> If you want to use redirections with sudo, you either need to wrap
> things in "sh -c" a lot, or else get a full interactive shell first
> (sudo -s), and *then* run your commands with redirections.

Another nice use for 'dd', btw :-)

  pv -parle < ... | sudo dd of=/dev/sdb 

One charming property of that is that only the 'dd' runs as root.

(the usual solution is to use 'tee', but then you have to get rid
of stdout).

Cheers
 - t


signature.asc
Description: Digital signature


Re: burn iso to usb

2021-08-02 Thread Nicolas George
Greg Wooledge (12021-08-02):
> No, that won't work.
> 
> https://mywiki.wooledge.org/BashPitfalls#pf53
> 
> If you want to use redirections with sudo, you either need to wrap
> things in "sh -c" a lot, or else get a full interactive shell first
> (sudo -s), and *then* run your commands with redirections.

That! And sudo was addressed in the very first mail:

"I advise it over using root privileges for the cp: you could wipe your
install if you get the device wrong."

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: burn iso to usb

2021-08-02 Thread Greg Wooledge
On Mon, Aug 02, 2021 at 10:02:18PM +0300, Gunnar Gervin wrote:
> pv -parle /dev/sdX
> would rather be:
> sudo pv -parle /dev/sdb

No, that won't work.

https://mywiki.wooledge.org/BashPitfalls#pf53

If you want to use redirections with sudo, you either need to wrap
things in "sh -c" a lot, or else get a full interactive shell first
(sudo -s), and *then* run your commands with redirections.



Re: burn iso to usb

2021-08-02 Thread Gunnar Gervin
Hi.
The different suggestions are not complete, are they??
Like:
pv -parle /dev/sdX
would rather be:
sudo pv -parle /dev/sdb
And even not sure on that example as being correct. Please correct my
possible failure/s in the above try.
As you can see, I`m trying a -64bit- because Macbook 2.1 might fit it. And
Gnome because it seems more complete.
Saw another (relative) newbie said something similar concerning man pages
in terminal: "Would be nice with example/s".
BR,
geg

On Mon, 2 Aug 2021 at 16:14, Anssi Saari  wrote:

> Stefan Monnier  writes:
>
> >>> > cp /path/to/file.iso /dev/sdX
> >>> dd if=whatever.iso of=/dev/sdX
> >> It's up to taste.
> >
> > Not at all.  The only right answer is:
> >
> > pv -parIe /dev/sdX
>
> Actually I'm not sure how good it is to have both -a and -r, pv doesn't
> really show which rate counter is which...
>
>
>


Re: `pv` rates (was: burn iso to usb)

2021-08-02 Thread David Wright
On Mon 02 Aug 2021 at 13:26:19 (-0400), Stefan Monnier wrote:
> Anssi Saari [2021-08-02 19:04:59] wrote:
> > David Wright  writes:
> >> On Mon 02 Aug 2021 at 16:14:15 (+0300), Anssi Saari wrote:
> >>> Stefan Monnier  writes:
> >>> >>> > cp /path/to/file.iso /dev/sdX
> >>> >>> dd if=whatever.iso of=/dev/sdX  
> >>> >> It's up to taste.
> >>> >
> >>> > Not at all.  The only right answer is:
> >>> >
> >>> > pv -parIe /dev/sdX
> >>> 
> >>> Actually I'm not sure how good it is to have both -a and -r, pv doesn't
> >>> really show which rate counter is which...
> >>
> >> No need: the rate is far more variable than its average, as time passes.
> >
> > I guess it depends. Before that comment I tried it on an old USB
> > stick. Read speed was pretty much constant if low. So I think it was the
> > left rate counter that showed current rate but wouldn't bet on it.
> 
> [ I'm glad my silly intervention brings up a more constructive
>   discussion ;-)  ]
> 
> If they're both pretty much constant, they're presumably both pretty
> much equal, so it doesn't matter which is which ;-)
> 
> But indeed, it's not always the case.  I'm right now using `pv` to read
> data off of a broken drive (a 2TB 2½" drive which apparently has
> problems seeking, resulting in a transfer rate of about 45kB/s), and
> it's currently showing me 45.0KiB/s and 70.6KiB/s both of which are
> quite stable.

Writing "quite stable" cloaks the information nicely. The average can
never move away from the rate: a change in the least significant digit
gives the game away.

> If it weren't for the first sometimes changing to
> 44.xKiB/s it'd be hard to know which is which (IIUC the average is
> higher because occasionally the drive gives a more reasonable transfer
> rate than that measly 45kB/s).

So now we're left wondering how you came by this situation. Perhaps
you slumped onto the Return key, then woke up after a few minutes,
having missed the initial burst that gave rise to the average being
more than 50% faster than the current rate.

Cheers,
David.



Re: burn iso to usb

2021-08-02 Thread Anssi Saari
David Wright  writes:

> On Mon 02 Aug 2021 at 16:14:15 (+0300), Anssi Saari wrote:
>> Stefan Monnier  writes:
>> 
>> >>> > cp /path/to/file.iso /dev/sdX
>> >>> dd if=whatever.iso of=/dev/sdX  
>> >> It's up to taste.
>> >
>> > Not at all.  The only right answer is:
>> >
>> > pv -parIe /dev/sdX
>> 
>> Actually I'm not sure how good it is to have both -a and -r, pv doesn't
>> really show which rate counter is which...
>
> No need: the rate is far more variable than its average, as time passes.

I guess it depends. Before that comment I tried it on an old USB
stick. Read speed was pretty much constant if low. So I think it was the
left rate counter that showed current rate but wouldn't bet on it.



Re: burn iso to usb

2021-08-02 Thread David Wright
On Mon 02 Aug 2021 at 16:14:15 (+0300), Anssi Saari wrote:
> Stefan Monnier  writes:
> 
> >>> > cp /path/to/file.iso /dev/sdX
> >>> dd if=whatever.iso of=/dev/sdX  
> >> It's up to taste.
> >
> > Not at all.  The only right answer is:
> >
> > pv -parIe /dev/sdX
> 
> Actually I'm not sure how good it is to have both -a and -r, pv doesn't
> really show which rate counter is which...

No need: the rate is far more variable than its average, as time passes.

Cheers,
David.



Re: burn iso to usb

2021-08-02 Thread Anssi Saari
Stefan Monnier  writes:

>>> > cp /path/to/file.iso /dev/sdX
>>> dd if=whatever.iso of=/dev/sdX  
>> It's up to taste.
>
> Not at all.  The only right answer is:
>
> pv -parIe /dev/sdX

Actually I'm not sure how good it is to have both -a and -r, pv doesn't
really show which rate counter is which...




Re: burn iso to usb

2021-08-02 Thread Robbi Nespu

On 8/1/21 1:30 AM, to...@tuxteam.de wrote:

On Sat, Jul 31, 2021 at 06:42:50PM +0200, Hans wrote:

Am Samstag, 31. Juli 2021, 14:05:59 CEST schrieb Nicolas George:

Gunnar Gervin (12021-07-31):



Just:

cp /path/to/file.iso /dev/sdX



Hi,

isn't it just2  :

dd if=whatever.iso of=/dev/sdX


It's up to taste. Some get worked up one way or the other.
This discussion comes around cyclically :)

Personally, I settled on dd, mainly because oflag=sync and
status=progress. But I'm OK with others using copy, cat or
whatever :)

Cheers
  - t



I prefer dd because opts of blocksize (bs) and status

sudo dd if=/path/to/iso of=/dev/sdX bs=4M status=progress

--
Robbi Nespu 
D311 B5FF EEE6 0BE8 9C91 FA9E 0C81 FA30 3B3A 80BA
https://robbinespu.gitlab.io | https://mstdn.social/@robbinespu



Re: burn iso to usb

2021-08-01 Thread Gunnar Gervin
Nicolas,
thx for loads of instructions, I`ll read & do ASAP.
Gunnar Gervin

On Sat, 31 Jul 2021 at 15:06, Nicolas George  wrote:

> Gunnar Gervin (12021-07-31):
> > How mount iso to usb in terminal? (Debian 10.10 i386 32 bit)
>
> Mount? or "burn"? I'll assume the later.
>
> Just:
>
> cp /path/to/file.iso /dev/sdX
>
> where sdX is the device for your USB drive. You will need to make sure
> you have the permissions for the devices; I advise it over using rood
> privileges for the cp: you could wipe your install if you get the device
> wrong.
>
> But if your goal is to also learn, there is a better way, and one that
> lets you keep using the USB drive normally. I have written an old and a
> newer tutorial:
>
> http://nsup.org/~george/comp/live_iso_usb/
> http://nsup.org/~george/comp/live_iso_usb/grub_hybrid.html
>
> Regards,
>
> --
>   Nicolas George
>


Re: burn iso to usb

2021-07-31 Thread Stefan Monnier
>> > cp /path/to/file.iso /dev/sdX
>> dd if=whatever.iso of=/dev/sdX  
> It's up to taste.

Not at all.  The only right answer is:

pv -parIe /dev/sdX

Anyone who says otherwise is trying to trick you,


Stefan



Re: burn iso to usb

2021-07-31 Thread Thomas Schmitt
Hi,

was
  https://www.debian.org/CD/faq/#write-usb
already mentioned in this thread ?
Besides the already mentioned Unix methods it gives advise for users of
MS-Windows, to which i would add program Rufus and its "dd" mode.


Greg Wooledge wrote:
> > If you're going to use dd for this, be sure to increase the block size
> > from the default 512 bytes to something more appropriate in this century.

to...@tuxteam.de wrote:
> Absolutely. I actually run some tests from time to time, and the
> general pattern is a very flat maximum somewhere beyond 64 and
> below 1G. I tend to use 1M, because it's easy to memorise :)

For the finer operations with ISO images i prefer bs=2048, because that
is the natural granularity of ISO 9660 filesystems.


Stefan Monnier wrote:
> pv -parIe /dev/sdX

cat(1) on steroids :))


Have a nice day :)

Thomas



Re: burn iso to usb

2021-07-31 Thread tomas
On Sat, Jul 31, 2021 at 02:34:14PM -0400, Stefan Monnier wrote:
> >> > cp /path/to/file.iso /dev/sdX
> >> dd if=whatever.iso of=/dev/sdX  
> > It's up to taste.
> 
> Not at all.  The only right answer is:
> 
> pv -parIe /dev/sdX

I had to look /that/ up, and I consider myself a command-line junkie.

Thanks for this one
 - t


signature.asc
Description: Digital signature


Re: burn iso to usb

2021-07-31 Thread tomas
On Sat, Jul 31, 2021 at 01:34:31PM -0400, Greg Wooledge wrote:
> On Sat, Jul 31, 2021 at 07:30:42PM +0200, to...@tuxteam.de wrote:
> > On Sat, Jul 31, 2021 at 06:42:50PM +0200, Hans wrote:
> > > Am Samstag, 31. Juli 2021, 14:05:59 CEST schrieb Nicolas George:
> > > > Gunnar Gervin (12021-07-31):
> > > 
> > > > Just:
> > > > 
> > > > cp /path/to/file.iso /dev/sdX
> > > > 
> > > 
> > > Hi,
> > > 
> > > isn't it just:
> > > 
> > > dd if=whatever.iso of=/dev/sdX  
> > 
> > It's up to taste. Some get worked up one way or the other.
> > This discussion comes around cyclically :)
> > 
> > Personally, I settled on dd, mainly because oflag=sync and
> > status=progress. But I'm OK with others using copy, cat or
> > whatever :)
> 
> If you're going to use dd for this, be sure to increase the block size
> from the default 512 bytes to something more appropriate in this century.

Absolutely. I actually run some tests from time to time, and the
general pattern is a very flat maximum somewhere beyond 64 and
below 1G. I tend to use 1M, because it's easy to memorise :)

Cheers
 - t


signature.asc
Description: Digital signature


Re: burn iso to usb

2021-07-31 Thread Greg Wooledge
On Sat, Jul 31, 2021 at 07:30:42PM +0200, to...@tuxteam.de wrote:
> On Sat, Jul 31, 2021 at 06:42:50PM +0200, Hans wrote:
> > Am Samstag, 31. Juli 2021, 14:05:59 CEST schrieb Nicolas George:
> > > Gunnar Gervin (12021-07-31):
> > 
> > > Just:
> > > 
> > > cp /path/to/file.iso /dev/sdX
> > > 
> > 
> > Hi,
> > 
> > isn't it just:
> > 
> > dd if=whatever.iso of=/dev/sdX  
> 
> It's up to taste. Some get worked up one way or the other.
> This discussion comes around cyclically :)
> 
> Personally, I settled on dd, mainly because oflag=sync and
> status=progress. But I'm OK with others using copy, cat or
> whatever :)

If you're going to use dd for this, be sure to increase the block size
from the default 512 bytes to something more appropriate in this century.



Re: burn iso to usb

2021-07-31 Thread tomas
On Sat, Jul 31, 2021 at 06:42:50PM +0200, Hans wrote:
> Am Samstag, 31. Juli 2021, 14:05:59 CEST schrieb Nicolas George:
> > Gunnar Gervin (12021-07-31):
> 
> > Just:
> > 
> > cp /path/to/file.iso /dev/sdX
> > 
> 
> Hi,
> 
> isn't it just:
> 
> dd if=whatever.iso of=/dev/sdX  

It's up to taste. Some get worked up one way or the other.
This discussion comes around cyclically :)

Personally, I settled on dd, mainly because oflag=sync and
status=progress. But I'm OK with others using copy, cat or
whatever :)

Cheers
 - t


signature.asc
Description: Digital signature


Re: burn iso to usb

2021-07-31 Thread Nicolas George
Hans (12021-07-31):
> isn't it just:
> 
> dd if=whatever.iso of=/dev/sdX  

No. cp is more efficient by default, and this case does not need the
fine control offered by dd.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: burn iso to usb

2021-07-31 Thread Hans
Am Samstag, 31. Juli 2021, 14:05:59 CEST schrieb Nicolas George:
> Gunnar Gervin (12021-07-31):

> Just:
> 
> cp /path/to/file.iso /dev/sdX
> 

Hi,

isn't it just:

dd if=whatever.iso of=/dev/sdX  

Best

Hans



signature.asc
Description: This is a digitally signed message part.


Re: burn iso to usb

2021-07-31 Thread tomas
On Sat, Jul 31, 2021 at 02:05:59PM +0200, Nicolas George wrote:
> Gunnar Gervin (12021-07-31):
> > How mount iso to usb in terminal? (Debian 10.10 i386 32 bit)
> 
> Mount? or "burn"? I'll assume the later.
> 
> Just:
> 
> cp /path/to/file.iso /dev/sdX

...but make sure /dev/sdX is not mounted. Otherwise hilarity ensues.

Cheers
 - t


signature.asc
Description: Digital signature


Re: burn iso to usb

2021-07-31 Thread Andrew M.A. Cater
On Sat, Jul 31, 2021 at 01:59:48PM +0200, Gunnar Gervin wrote:
> How mount iso to usb in terminal? (Debian 10.10 i386 32 bit)
> 
> Multiwriter does not work;
> Debian Mate answers in the red: "Cannot find program".
> 
> Terminal is also difficult; "cannot find or open file" etc, but at least
> responds a little
> 
> geg

Gunnar,

As suggested _don't_ use just the i386 medium - do try the multiarch .iso
found at 
https://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-10.10.0-amd64-i386-netinst.iso

If you plug in the USB flash disk, it should show up somewhere: if you plug
it in and then run the command dmesg as root equivalent, what does the last 
line or so say?

All the very best, as ever,

Andy Cater



Re: burn iso to usb

2021-07-31 Thread Nicolas George
Gunnar Gervin (12021-07-31):
> How mount iso to usb in terminal? (Debian 10.10 i386 32 bit)

Mount? or "burn"? I'll assume the later.

Just:

cp /path/to/file.iso /dev/sdX

where sdX is the device for your USB drive. You will need to make sure
you have the permissions for the devices; I advise it over using rood
privileges for the cp: you could wipe your install if you get the device
wrong.

But if your goal is to also learn, there is a better way, and one that
lets you keep using the USB drive normally. I have written an old and a
newer tutorial:

http://nsup.org/~george/comp/live_iso_usb/
http://nsup.org/~george/comp/live_iso_usb/grub_hybrid.html

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


burn iso to usb

2021-07-31 Thread Gunnar Gervin
How mount iso to usb in terminal? (Debian 10.10 i386 32 bit)

Multiwriter does not work;
Debian Mate answers in the red: "Cannot find program".

Terminal is also difficult; "cannot find or open file" etc, but at least
responds a little

geg