dd bs=xM , its just all bs , but more than likely its just me
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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*
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.
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.
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
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.
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
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.'?
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
Last edited by kjhambrick; 01-30-2018 at 06:20 AM.
Reason: grammar
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.
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:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.