LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-29-2018, 04:38 PM   #1
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Question dd bs=xM , its just all bs , but more than likely its just me


I have noticed an interesting issue or side effect while installing Slackware or any other OS from a USB flash drive and involving the use of dd. Packages are either missing or corrupted and generally things don't work as they should. I have been able to reproduce said results on 2 different machines, and with different flash drives. True it does come down to the flash drives, I even have a fairly new, hardly used 64GB sandisk , but compared to an install from an optical media I have no issues with an installation from that versus anything from a flash device. I wonder why?

So assuming maybe it is not the drives itself, as I have tried on various flash drives different USB ports, and yes every iso I ever downloaded I always made sure to check the hash sums. Same exact iso on optical media produces an install with no issues vs it is almost hit-or-miss in a way when using a usb medium. Then I thought, well I have to be doing something wrong aren't I? Maybe I am misusing dd some how and need to tweak the parameters, ok fine. So I have been playing around issuing bs=1M bs=4M , as I also see various results on sites recommending different block sizes to write to said usb device; so there doesn't seem to be a consensus on what to issue for the size; but surely that is not really an issue.

Same two machines, I then decided to just supply both with an optical drive; and I still had RW discs on hand, and mind you these aren't the best discs anyhow. Memorex labeled but manufactured by CMC_Magnetics (not all that great material); but no issues with the installation afterwards. No corrupted packages, no offhand installation error, nothing. Granted, I haven't tried using dd to burn an iso to an optical disc; then again why would I want to at this point, as being unsure. I feel either dd is poor when it comes to data integrity (sure no checks), but I expect when using dd to write to a disk it at least does it in a reliable manner. Again, maybe I need to tweak the size of bs= ?

This harkens back to the days of floppies to me; where you had a lot more chance of failure during install. Granted same can be said again about optical media and drives; a spec of dust , dirty lens, crappy media or poorly burned media etc. Yet I have seen much more reliability from optical media still compared to flash based installation media, either it is the media or dd or a combo.

This is more of just what I have observed, and welcome any thoughts / comments. I think maybe I could be doing something wrong with dd , but can't really imagine what ; or I should just stop using dd all together then and just stick to optical media in my case only. *shrug*
 
Old 01-29-2018, 04:45 PM   #2
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
I always use:
Code:
$ dd if=~/slackware.iso of=/dev/sdX bs=4M status=progress && sync
I have never had any issues.

Are the USB sticks "designed for Windows 8"? Those are crap.

I have been using some cheap SanDisk 8GB Cruzer Blade.
Never an issue.
 
Old 01-29-2018, 04:54 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Note the use of "sync" by Skaendo. Personally I just use the dd oflags.
 
Old 01-29-2018, 04:57 PM   #4
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Just a Sandisk Cruzer. I've attempted both bs=1M and bs=4M , the other is just a Sony32GB , same result. I guess though 1M or 4M can be used for bs , since apparently those are widely accepted values. I'll gladly purchase another usb stick just to test theory a little more. I can't say it is the usb ports as I tried all available ports. So maybe I just have 2 really shitty usb sticks (possible). Then again, I have also really shitty Memorex labeled +RW discs, and the installations are just fine, verses corrupted installations with my two usb sticks. Granted also, 2 usb sticks hence I have to test this out some more with yet another preferably NEW usb stick.

This is what has me clinging onto optical media though, and I just get overall rather weary with even desktops without an optical drive. Optical media is truly falling by the wayside at this point, but it has some life left in it, and thankfully in my case thats a good thing it seems.
 
Old 01-29-2018, 05:03 PM   #5
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
Optical media is truly falling by the wayside at this point, but it has some life left in it, and thankfully in my case thats a good thing it seems.
I beg to differ, I use optical media all the time for "long term" storage. I actually just recently just upgraded my DVD burner with a BluRay burner. Wow what a difference in storage space, both on the disc and physical. I don't fully trust hard drives (either HDD or SSD, SSD even less than HDD) because they tend to fail eventually. But I have CD's & DVD's from the late 90's that are still just as reliable as the day I burned them. On top of that, they say that BluRay M-Discs will last 1000 years.

Last edited by Skaendo; 01-29-2018 at 05:04 PM.
 
Old 01-29-2018, 05:09 PM   #6
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Quote:
Originally Posted by syg00 View Post
Note the use of "sync" by Skaendo. Personally I just use the dd oflags.
I did forget to mention it, but yea I always did sync afterwards.
Quote:
root@slackmachine:/home/slackuser/iso/linux# dd if=ubuntu-mate-17.10.1-desktop-amd64.iso of=/dev/sdf bs=1M status=progress && sync
1708+1 records in
1708+1 records out
1791655936 bytes (1.8 GB, 1.7 GiB) copied, 263.981 s, 6.8 MB/s

Quote:
Originally Posted by Skaendo View Post
I beg to differ, I use optical media all the time for "long term" storage. I actually just recently just upgraded my DVD burner with a BluRay burner. Wow what a difference in storage space, both on the disc and physical. I don't fully trust hard drives (either HDD or SSD, SSD even less than HDD) because they tend to fail eventually. But I have CD's & DVD's from the late 90's that are still just as reliable as the day I burned them. On top of that, they say that BluRay M-Discs will last 1000 years.
I use optical media for the same reason, archiving. Just hard to archive when you have TB worth of data. Still waiting for Holographic Versatile Disc to become a thing, but most desktops (sold to consumers) seem to be excluding the feature of having an optical drive, and it is even more true with notebooks.

Tangent: The only actual reason as to why I even bother running my distro in multilib mode is solely for the use of IMGBurn under WINE, which IMO is unsurpassed in terms of writing to optical media.
 
Old 01-29-2018, 05:25 PM   #7
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
I use optical media for the same reason, archiving. Just hard to archive when you have TB worth of data.
Tell me about it. I have 10+TB of USB Drives close to full. Granted one of my drives (3TB) is just Windows crap and I couldn't care less if that one fails.

Quote:
Originally Posted by Jeebizz View Post
Tangent: The only actual reason as to why I even bother running my distro in multilib mode is solely for the use of IMGBurn under WINE, which IMO is unsurpassed in terms of writing to optical media.
I love ImgBurn. But on the only Windows rig (HTPC) that I own (with my BluRay drive). Otherwise it's dd for me. The really odd thing is that I don't let my HTPC touch ANY of my USB drives because I do not like the way that Windows handles files. I want to know who thought it was a good idea to say 'Hey, we can just pick this file up and move part of it here, part of it there, and part of it over there.'?
 
Old 01-30-2018, 06:19 AM   #8
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Jeebizz --

I wonder if you've got a counterfeit USB Drive ?

What Skaendo said, plus there is a program available to test for 'fake' USB Drives on 'nix systems ...

Check out F3 - an alternative to h2testw and the new docs at f3 - Fight Flash Fraud.

Toot toot ( that's the sound of me tooting my own horn )

There is a f3 version 6.0 SlackBuild for Slackware 14.2 which can test the true capacity of your USB Drive and I just now submitted an updated SlackBuild for f3 version 7.0 ( not yet approved ).

The new version 7.0 SlackBuild file is attached below as a .txt file ( remove the .txt extent and then manually build and install via `upgradepkg --install-new f3-7.0-${ARCH}-1_SBo.tgz` )

HTH.

-- kjh
Attached Files
File Type: txt f3.tar.gz.txt (2.8 KB, 10 views)

Last edited by kjhambrick; 01-30-2018 at 06:20 AM. Reason: grammar
 
Old 01-30-2018, 10:24 AM   #9
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Quote:
Originally Posted by kjhambrick View Post
Jeebizz --

I wonder if you've got a counterfeit USB Drive ?

What Skaendo said, plus there is a program available to test for 'fake' USB Drives on 'nix systems ...

Check out F3 - an alternative to h2testw and the new docs at f3 - Fight Flash Fraud.

Toot toot ( that's the sound of me tooting my own horn )

There is a f3 version 6.0 SlackBuild for Slackware 14.2 which can test the true capacity of your USB Drive and I just now submitted an updated SlackBuild for f3 version 7.0 ( not yet approved ).

The new version 7.0 SlackBuild file is attached below as a .txt file ( remove the .txt extent and then manually build and install via `upgradepkg --install-new f3-7.0-${ARCH}-1_SBo.tgz` )

HTH.

-- kjh

For the Sony32GB it is plausible since it was given to me. I know though for a fact that the Sandisk64GB Cruzer I bought from Bestbuy (not online but at the store). Still could be counterfeit anything is possible, but I will look into that verification program you linked to. Also to reiterate I am open to buying another usb stick as well.

-edit

I am still curious about the parameter for issuing the size of the block, I suppose 1M or 4M would be fine, and it just goes down to personal preference, or, is there a good technical reason to just stick with 1M for bs all the time? This more likely though could just be a non issue, but I am still curious for any input on that.

Last edited by Jeebizz; 01-30-2018 at 10:27 AM.
 
Old 01-30-2018, 10:48 AM   #10
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Jeebizz --

Below is the script I use to write to a USB from my Laptop.

I've had it forever.

It was either adapted or out-right stolen from one of Alien Bob's scripts but I am not sure which ...

I am using bs=4M in the script.

-- kjh

This is /home/dld/slackware/.burn-sde

Code:
#!/bin/sh

PrgNam="`basename $0`"
RetCode=0

Thumb=""                   # EDIT ME -- enter your USB Device.  mine is /dev/sde

[ "$Thumb" = "" ] && echo "Please edit Thumb='/dev/sdX' in $PrgNam" >&2 && exit 1
[ $# -lt 1  ]     && echo "need a .iso file to burn to $Thumb"      >&2 && exit 2
[ ! -f "$1" ]     && echo ".iso File '$1' does not exist"           >&2 && exit 3
[ ! -b "$Thumb" ] && echo "USB Drive $Thumb is not plugged in ..."  >&2 && exit 4

IsoFile="$1"

file -b "${IsoFile}" | grep -q '^DOS/MBR boot sector ISO 9660 CD-ROM filesystem data'
RetCode=$?

[ "$RetCode" != "0" ] && echo "'$1' is not a proper .iso file:  `file -b ${IsoFile}`" >&2 && exit 4

echo "creating a bootable thumb drive on $Thumb from $IsoFile" >&2 

dd if=${IsoFile} of=${Thumb} bs=4M status=progress oflag=direct && sync
exit $?

Last edited by kjhambrick; 01-30-2018 at 10:51 AM. Reason: quotes borked in code section
 
Old 01-31-2018, 09:08 AM   #11
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

Rep: Reputation: Disabled
AIR 2.0.0 - Automated Image and Restore

I use Automated Image and Restore. It gets the job done, with a handful of features. It you want something with a GUI, give it a shot.

Last edited by PROBLEMCHYLD; 11-30-2018 at 12:48 PM.
 
Old 01-31-2018, 01:11 PM   #12
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
What about 2048K -that's the normal size of iso blocks, IIRC. --And now I see that that is what is used in your screenshot, above.

Last edited by gnashley; 01-31-2018 at 01:19 PM.
 
Old 01-31-2018, 01:30 PM   #13
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
I am still curious about the parameter for issuing the size of the block, I suppose 1M or 4M would be fine, and it just goes down to personal preference, or, is there a good technical reason to just stick with 1M for bs all the time? This more likely though could just be a non issue, but I am still curious for any input on that.
When you define the block size, size matters. I use 4M and it seems to work fine for me. This will write an ISO file to a USB faster by far. Some recommend smaller block sizes for compatibility and reducing errors. Like I said, I have never had a problem with 4M, but YMMV.

Go ahead and try it out, write a ISO with bs=512k then try 1M-4M and you'll notice the difference in write times.

If you're using the official Slackware ISO, check for errors after writing by having a look at CHECKSUMS.md5. Basically, cd into your USB and run:
Code:
$ tail +13 CHECKSUMS.md5 | md5sum -c --quiet - | less

Last edited by Skaendo; 01-31-2018 at 01:33 PM.
 
Old 01-31-2018, 01:49 PM   #14
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

Rep: Reputation: Disabled
Quote:
Originally Posted by gnashley View Post
What about 2048K -that's the normal size of iso blocks, IIRC. --And now I see that that is what is used in your screenshot, above.
I just used it as an example, but you can set it to whatever from 512 - 131072. Your src2pkg was how I created the package and installed it. Thanks for making my life easier.
 
Old 01-31-2018, 01:52 PM   #15
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I second Skaendo
Code:
dd if=/iso  of=/dev/sdc && sync
is all I use and cheap scandisk or whaever is on sale at my local. look , see we have USB Sticks for sale here too, store, I even have a Lexar USB stick with a light on it that flashes when its being written to. that is really cool, turn off the lights and just get a nice little light show going while waiting for it to finish.

I've never hada problem with them, only some scandisk that are write protected, but command line remove that and its good to go.

Last edited by BW-userx; 01-31-2018 at 01:54 PM.
 
  


Reply



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 Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:45 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