LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-27-2021, 04:11 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,247
Blog Entries: 1

Rep: Reputation: Disabled
Distro hopping wihout hard drive or - Hitchhiker's guide to the galaxy - for Linux user.


We all know how to hop. This is little different. You need one working live system with web browser, and these commands: wget or curl, dd - the basic, optionally: tee, zcat, xzcat, bzcat, md5sum, sha256sum. And of course second usb pendrive. Live medium for distribution is usually provided in form of hybrid iso image file - which means it can be burned directly into DVD or dd'ed into usb pendrive. Without hard drive there is no room to keep downloaded image. This is resolved with direct dd of image from website say http://remote.org/linux.iso (don't click it - the web does not exists)
Code:
% wget -O - http://remote.org/linux.iso | dd of=/dev/sdb bs=1M
here 'wget -O -' means download to stdout, by the way it is default for curl. One more issue I witnessed was check sum verification. Here is my solution
Code:
% mkfifo /tmp/csum 
% wget -O - http://remote.org/linux.iso | tee /tmp/csum | dd of=/dev/sdb bs=1M & (md5sum /tmp/csum > linux.iso.md5)
but there is better solution https://www.linuxquestions.org/quest...ml#post6245276 My simple solution works - md5sum is being counted on a fly. It happens images are compressed. This is where we need one zcat, xzcat, bzcat. For gzipped compressed image we need to add one more pipe
Code:
% wget -O - http://remote.org/linux.iso.gz | zcat | dd of=/dev/sdb bs=1M
and put tee /tmp/csum in corresponding place - depending on which checksum for linux.iso,gz or linux.iso we want to calculate. Now story behind. My hadrware configuration are two 8 GB pendrives and one 2 GB pendrive. My basic live system is liveslak. I tried MX Linux, Knoppix 9.1, Knoppix 8.6.1, Liveslak - two different versions, Porteous, last but not least NomadBSD - live system on FreeBSD. At the end: happy hopping - don't brake your neck.

Last edited by igadoter; 04-29-2021 at 08:34 PM.
 
Old 04-29-2021, 04:57 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, RPi OS, Mint & Android
Posts: 12,856

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
I have timed those sort of download | piped command and here at least they are MUCH SLOWER than a regular download, followed by the piped command.

You may want to edit your original post as my-linux.org is registered, & shows as a dodgy site in chinese.
 
2 members found this post helpful.
Old 04-29-2021, 08:30 PM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,247

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Speed is limited by two factors: internet bandwidth and speed of access to usb pendrive. The point is not about speed however. But about lack of storage where you can put downloaded iso. This is why to pipe output of download command to dd directly. Sorry for accidental use of your registered domain - sure I will change it.

Edit: Saving on hard drive wget reports 700 kb/s - and when piping to dd - wget also reports 700 kb/s. There is no gain in time here. wget when working in background creates wget-log file - there you can watch download speed
Code:
$ tail -f wget-log
Perhaps if for you download speed is above 1MB/s - you should try larger values bs=2M or even bs=4M.

Last edited by igadoter; 04-29-2021 at 08:50 PM.
 
Old 04-30-2021, 03:04 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, RPi OS, Mint & Android
Posts: 12,856

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
I did try varying the dd block size. Funny enough, the one that gave the fastest results on files of a few gigs was 65536.

I don't think the wget slowed - it was the xz-d |dd bit that slowed. My download speed is usually most of 35 Mbps.
 
Old 04-30-2021, 07:14 AM   #5
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 1,338

Rep: Reputation: 1132Reputation: 1132Reputation: 1132Reputation: 1132Reputation: 1132Reputation: 1132Reputation: 1132Reputation: 1132Reputation: 1132
Quote:
Originally Posted by igadoter View Post
Sorry for accidental use of your registered domain - sure I will change it.
You've changed it to another registered domain.

Make it example.org and you'll be using a domain that will never be registered because it's an officially designated domain for use in examples.

 
1 members found this post helpful.
Old 04-30-2021, 10:58 AM   #6
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,247

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I don't think the wget slowed - it was the xz-d |dd bit that slowed. My download speed is usually most of 35 Mbps.
So image was compressed - but this does not happen often.
 
Old 05-01-2021, 04:04 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
Even if you don't have a hard drive, part of the RAM can be accessed as a quasi-hard-drive filesystem.
That's what I would choose.
 
Old 05-01-2021, 05:31 PM   #8
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,247

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
5 GB size ram-disk? At least. If I would have Cray computer I wouldn't bother at all.
 
Old 05-04-2021, 03:27 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,140
Blog Entries: 4

Rep: Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227Reputation: 3227
Pen drives are not really intended to be used for this purpose. They are fast on reads but slow on writes. However, USB-connected external hard drives can be had at any office-supply store (2TB or so) for about $80 USD. If your computer has a USB-C interface (or the old FireWire), they're very fast. They typically draw all their power from the interface (no external "bricks" to plug into the wall), and are not much bigger than a pack of playing cards. Simply reformat and re-partition them with the filesystem(s) of your choice.

Easily, the best thing to do is to use VirtualBox, the "absolutely-free virtual machine monitor that runs on everything." Format the external drive with a Linux filesystem, then use VirtualBox to create "virtual disks" for each guest that you want to run on that filesystem. Now, you can thoroughly evaluate any "distro" at your leisure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: DistroWatch Weekly: Distro hopping, Linux Format's distro mega-test LXer Syndicated Linux News 0 06-11-2007 04:47 AM
Connecting comps wihout ethernet cards s_araj Linux - Networking 6 04-07-2005 05:10 PM
install mandrake wihout format hd? JesperJ Mandriva 1 02-24-2005 08:31 AM
Favorite Hitchhiker's Guide to the Galaxy Quote darin3200 General 11 09-26-2004 11:46 PM
Hitchhiker's Guide to the Galaxy/Life, The Universe, and Everything testforechozero General 7 08-24-2004 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration