My adventures making a live USB

If it doesn't relate to Debian, but you still want to share it, please do it here

My adventures making a live USB

Postby Bulkley » 2018-01-26 03:02

As I noted in another thread I was unable to create a live USB for the new MX Linux 17. Both Etcher and Gnome-Disks would do it but left off the live menu so I couldn't boot it. Unetbootin wouldn't even attempt it. dd wouldn't do it but that was probably just me not sorting the instructions and terrified of wiping my system. I found a list of live USB makers and tried several. One of them works! It is LiveUSB Install and is found here.

I have no idea why LiveUSB Install works and the others did not. The only hint is a note about syslinux but I have it and the live install completed properly anyway.

I'm posting this from within MX Linux 17 running live on my desktop. It is as pretty and functional as others have said. This is a nice distro. Stevepusser must be proud.
Bulkley
 
Posts: 5617
Joined: 2006-02-11 18:35

Re: My adventures making a live USB

Postby Head_on_a_Stick » 2018-01-26 06:20

Bulkley wrote:dd wouldn't do it but that was probably just me not sorting the instructions and terrified of wiping my system

Yeah, I try not to use `dd` for that exact reason.

My preferred method is:
Code: Select all
# cp example.iso /dev/sdX ; sync

Replace X with the letter assigned to the USB stick — plug the stick in and then run `dmesg|tail` to find this ;)
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: My adventures making a live USB

Postby Thorny » 2018-01-26 12:05

dd is oldschool, and it works just fine with a hybrid ISO. I will grant you that it is not for clueless noobs, but actually neither is Debian.

Apparently it is also not for long time Debian users who don't understand how to use it properly or ex-Crunchbang users who have been here for a while. Please don't find this disrespectful, I don't mean it to be.

Maybe that's why Debian has so much choice.

Sorry, but today I am channeling dasein, who I wish was still here. :-)
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: My adventures making a live USB

Postby GarryRicketson » 2018-01-26 13:03

I keep these to options in my "notes", so I can all ways remember:
Code: Select all
   The following operands are available:

     if=file  Read input from file

     of=file  Write output to file
===== additional notes=====
dd command, from remote disk to "home"
If your intent is to backup a remote computer's HDD A via SSH to a single file that's on your local computer's HDD, you could do one of the following.
Examples

run from remote computer

$ dd if=/dev/sda | gzip -1 - | ssh user@local dd of=image.gz

run from local computer

$ ssh user@remote "dd if=/dev/sda | gzip -1 -" | dd of=image.gz

Live example

$ ssh skinner "dd if=/dev/sda5 | gzip -1 -" | dd of=image.gz
208782+0 records in
208782+0 records out
106896384 bytes (107 MB) copied, 22.7608 seconds, 4.7 MB/s
116749+1 records in
116749+1 records out
59775805 bytes (60 MB) copied, 23.9154 s, 2.5 MB/s

$ ll | grep image.gz
-rw-rw-r--.   1 saml saml  59775805 May 31 01:03 image.gz

===============================================
genisoimage -v -J -r -V MY_DISK_LABEL -o /home/user/file.iso /home/user/for_iso

--------------------------
genisoimage -v -J -r -V   -o Server_Remote  /home/garry/test-server.iso   /
-------------------
frome remote :** (VM) genisoimage   -allow-limited-size  -v -J -r -V   -o  /home/user/server-test.iso  / 
************Worked -sort of :   genisoimage   -allow-limited-size  -o  /home/user/server-test.iso  /      ****************
==================================================
https://wiki.debian.org/genisoimage
------snip---- really long ....
User avatar
GarryRicketson
 
Posts: 5047
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: My adventures making a live USB

Postby Head_on_a_Stick » 2018-01-26 19:44

Thorny wrote:Apparently it is also not for long time Debian users who don't understand how to use it properly or ex-Crunchbang users who have been here for a while

How dare you! :x

I never used #!, I went straight to Arch 'cos Waldorf's crusty old kernel didn't support my hardware :mrgreen:

Anyway, what sort of ****ing idiot would sit there typing out
Code: Select all
# dd if=example.iso of=/dev/sdb bs=4k

When `cp example.iso /dev/sdb` does exactly the same thing...

(Please don't find this disrespectful, I don't mean it to be.)
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: My adventures making a live USB

Postby stevepusser » 2018-01-26 19:51

Thanks for finding LiveUSBinstall. We'll check it out for MX.

I currently am doing the majority of packaging for MX, (but the MX app devs are doing their own packages now) plus some ideas can be traced back to me (I'm to blame for the default Featherpad text editor), but many others are contributing in major ways, including those with accounts here too. Anticapitalista and kmathern are a couple. Dolphin_oracle is building the ISOs, Adrian is doing monthly updates of the release, plus a lot more people to thank. Jerry3904 manages the whole project.

Currently, we hope to recruit a few more packagers. We've found out how to use pbuilder to cross-compile most packages without the virtual machine overhead.

PS I think there is some work underway to get Featherpad into Debian.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9913
Joined: 2009-10-06 05:53

Re: My adventures making a live USB

Postby Bulkley » 2018-01-26 21:13

Thorny wrote:Sorry, but today I am channeling dasein, who I wish was still here. :-)

So do I.

Head_on_a_Stick wrote:My preferred method is:
Code: Select all
# cp example.iso /dev/sdX ; sync

Thanks, I'll try it.

stevepusser, Featherpad would be good in Debian.
Bulkley
 
Posts: 5617
Joined: 2006-02-11 18:35

Re: My adventures making a live USB

Postby GarryRicketson » 2018-01-26 21:37

H_O_A-S: Anyway, what sort of ****ing idiot would sit there typing out

Code: Select all
# dd if=example.iso of=/dev/sdb bs=4k


Me, but I never had much luck with cp working for iso and floppy images (I know, nobody uses them any more),... any way hope fully it works for Bulkley.
What I do is use 'dd' to write the image to the USB stick, after I check and assuming it works, boots ,etc. I do not try to make the "live system" persistent,
since it works, the last thing I want is for a possible mistake write something to it, and render it non bootable.
If I do need a directory that I can write to, etc,..or for example to copy output to. I resize the partition, shrink it to the minimum size, then create a new partition, preferably extended, or even just a dos partition, but one I can use to copy files to, etc,.... It is handy as well for installing packages ,or source code,...
User avatar
GarryRicketson
 
Posts: 5047
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: My adventures making a live USB

Postby Head_on_a_Stick » 2018-01-26 21:53

GarryRicketson wrote: Me, but I never had much luck with cp working

Both cp & dd use the exact same system calls to transfer the data (if bs=4k is applied to dd (for 4k disks)) so that doesn't make much sense.

The cp version is less complicated, easier to remember and quicker to type, what's not to like? :)
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: My adventures making a live USB

Postby sunrat » 2018-01-26 22:02

Head_on_a_Stick wrote:Anyway, what sort of ****ing idiot would sit there typing out
Code: Select all
# dd if=example.iso of=/dev/sdb bs=4k

Not me. 4k would take forever! Here's the exact command I used:
Code: Select all
dd if=MX-17.RC1_x64.iso of=/dev/sdd bs=4M && sync

Works perfectly. ;)
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2428
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: My adventures making a live USB

Postby Head_on_a_Stick » 2018-01-26 22:04

sunrat wrote:4k would take forever!

Have you actually timed that?

4k is the standard sector size for hard drives these days so it should be the most efficient setting.
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: My adventures making a live USB

Postby GarryRicketson » 2018-01-26 22:06

Oh, it is not that I don't like it, the first time I saw it mentioned, it seemed like the easiest thing to do, it just never worked out for me,... I have no idea why,
On the other side of the coin, after 'cp' did not work out, I tried 'dd' and all though slow, it worked perfect,... I do use 'cp' quite a bit for other tasks, like copying 'thisfile" to thatfile, or to another dir, ,,, etc... Any way, it is good both commands are available, so we have options.
User avatar
GarryRicketson
 
Posts: 5047
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: My adventures making a live USB

Postby sunrat » 2018-01-26 22:15

Head_on_a_Stick wrote:
sunrat wrote:4k would take forever!

Have you actually timed that?

Haha, of course not. I'm the kind of idiot who just unquestioningly followed advice from the Arch wiki - https://wiki.archlinux.org/index.php/US ... tion_media
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2428
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: My adventures making a live USB

Postby Head_on_a_Stick » 2018-01-26 22:24

^ I do love the ArchWiki but it is far from perfect and the upstream documentation should always be preferred.

Anyway, drum roll please, the results are in:
Code: Select all
alpine:~$ time sudo cp CorePlus-current.iso /dev/sdb
    0m41.97s real     0m00.00s user     0m00.22s system
alpine:~$ time sudo dd if=CorePlus-current.iso of=/dev/sdb
284672+0 records in
284672+0 records out
145752064 bytes (146 MB, 139 MiB) copied, 69.3507 s, 2.1 MB/s
    1m09.35s real     0m00.38s user     0m02.41s system
alpine:~$ time sudo dd if=CorePlus-current.iso of=/dev/sdb bs=4k
35584+0 records in
35584+0 records out
145752064 bytes (146 MB, 139 MiB) copied, 42.5691 s, 3.4 MB/s
    0m42.57s real     0m00.01s user     0m00.26s system
alpine:~$ time sudo dd if=CorePlus-current.iso of=/dev/sdb bs=4M
34+1 records in
34+1 records out
145752064 bytes (146 MB, 139 MiB) copied, 43.6011 s, 3.3 MB/s
    0m43.60s real     0m00.00s user     0m00.27s system
alpine:~$

So cp is (roughly) the same as dd+bs=4k, which is ever so slightly faster than bs=4M, which are all quite a bit faster than plain dd.

@OP: how does your GUI perform against the stopwatch?
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: My adventures making a live USB

Postby sunrat » 2018-01-26 22:39

Nice work @Head_on_a_Stick. Really the differences are insignificant apart from poor old plain dd.

Another thought - when specifying BS, does it map transfers exactly to hardware blocks? Obviously it can't with BS=512B or 4M if hardware blocks are 4k.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2428
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Next

Return to Offtopic

Who is online

Users browsing this forum: Hallvor and 5 guests

fashionable