LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware live unable to Transfer ISO content to USB stick (https://www.linuxquestions.org/questions/slackware-14/slackware-live-unable-to-transfer-iso-content-to-usb-stick-4175609417/)

Hooks123 07-08-2017 12:30 AM

Slackware live unable to Transfer ISO content to USB stick
 
Hey all, Im not very good at linux at all. I have been messing around with Slackware for about 15 years.

Im trying to make my usb drive persistant.
Im trying to transfer ISO content to USB stick. Im running the live version of Slackware64-live-plasma-current from a USB stick. From there i am trying to run the ./iso2usb.sh -i slackware64-live-plasma5-current.iso -o /dev/sdc -c 40% -P command. I get the following error

./iso2usb.sh: line 561: /usr/bin/mktemp: Input/output error
FAILED at line 561
--- Cleaning up the staging area...

Im sure im just doing something stupid wrong.

any ideas?

Alien Bob 07-08-2017 05:59 AM

Strange, I can not reproduce this error when starting the PLASMA5 Live in a virtual machine. You are running that command as root?

Hooks123 07-08-2017 07:21 AM

Quote:

Originally Posted by Alien Bob (Post 5732369)
Strange, I can not reproduce this error when starting the PLASMA5 Live in a virtual machine. You are running that command as root?

I am running as root. I'm trying to do this while running slackware live from a usb. Would that have something to do with it?

Didier Spaier 07-08-2017 07:55 AM

Shot in the dark: isn't /dev/sdc the device name of the USB stick from which you are running Slackware Live, instead of the name of the target USB drive?

Forget it. Line #561 has nothing to do with the target. Sorry for the noise.

PS I didn't see your answer before editing.

Hooks123 07-08-2017 08:01 AM

Quote:

Originally Posted by Didier Spaier (Post 5732398)
Shot in the dark: isn't /dev/sdc the device name of the USB stick from which you are running Slackware Live, instead of the name of the target USB drive?

I am running live from /dev/sdc. I was under the impression that I could run from the dev usb and then run the .sh. to wipe the usb and make it persistent. I'm sure this has something to do with it.

bassmadrigal 07-08-2017 01:06 PM

I'm pretty sure it doesn't work that way. If you wipe the drive while the OS is running off it, you won't have an OS anymore. You will either need another USB drive or another Slackware install to be able to create a persistent install.

Alien Bob 07-08-2017 03:12 PM

Let me do another guess. You transfered the ISO to your USB stick using 'dd' or something similar. Your resulting USB stick contains a Slackware Live on a read-only medium, because the filesystem of the ISO was also transfered to the USB stick. The ISO filesystem is iso9660 which is a read-only filesystem (used for CDROM and DVD).

If that is true, that USB stick can not be made writable by the iso2usb.sh script. You need to re-create the USB Live OS, on a computer running Linux. You can not o this when running the Live OS on the USB stick, because you would attempt to wipe that what you want to use.
You need the ISO image, plus the iso2usb.sh script, and use the iso2usb.sh script to transfer the content of the ISO file to the USB stick. That action will add persistence to the USB stick automatically (persistent data written to a directory called "/persistence") but using the parameter "-P" like you showed will create a persistence file instead, which is equally fine.

Running off a iso9660 filesystem would explain the input/output error of the mktemp command.

kyknos123 07-09-2017 01:48 AM

Maybe it is run as isoscan from custom grub2 menu in the usb as iso container,If you have a choice for grub menu in slackware, That's how I run them most distributions to testing

Hooks123 07-09-2017 08:44 AM

Ok, I loaded Slackware 14.2 on my computer which works great as always. Im not sure how to prepare the USB drive to be able to run the iso2usb.sh

I have iso2usb.sh and the .iso in my downloads directory logged in as root.

When i run the .sh i got the following error too may clusters for filesystem - try more sectors per cluster Failed at line 547.

I did a cfdisk /dev/sdb and here are the results
free space
/dev/sdb1 100M EFI ssystem
/dev/sdb2 29.8G Linux filesystem

Is this corret.

Again, Sorry for not understanding.

Brian

Alien Bob 07-09-2017 09:00 AM

Quote:

Originally Posted by Hooks123 (Post 5732766)
Ok, I loaded Slackware 14.2 on my computer which works great as always. Im not sure how to prepare the USB drive to be able to run the iso2usb.sh

I have iso2usb.sh and the .iso in my downloads directory logged in as root. im getting the Permission Denied error when trying to run the iso2usb.sh.

The permission denied error is probably caused by the fact that the script is not marked executable. That happens when you download scripts from the internet.
Solution:
Code:

chmod +x iso2usb.sh
And then you can write the USB stick again, making it persistent:
Code:

./iso2usb.sh -i slackware64-live-plasma5-current.iso -o /dev/sdb -c 40% -P
I used "/dev/sdb" in the commandline example above because that is what your cfdisk shows. In your original post you mentioned "/dev/sdc" so please double-check before continuing. The 'iso2usb.sh' script will show you the characteristics of the device before it starts overwriting stuff, and you will get the chance to Ctrl-C and abort the script if you picked the wrong device.

Quote:

I did a cfdisk /dev/sdb and here are the results
free space
/dev/sdb1 100M EFI ssystem
/dev/sdb2 29.8G Linux filesystem

Is this corret.

Again, Sorry for not understanding.

Brian
This is correct for the read-only USB Live version which you created by simply 'dd'-ing the ISO to the USB stick.

Hooks123 07-09-2017 09:21 AM

Thanks Alien.

Im now getting the following error too may clusters for filesystem - try more sectors per cluster Failed at line 547.

Im not sure what i need to do to properly prepare the usb to make the .sh work.

thanks again

Alien Bob 07-09-2017 10:49 AM

I've seen it happen that the USB stick is not perfectly wiped by the script, if previously the USB stick contained Slackware Live that was 'dd'-ed to the stick directly from the ISO file.
What I did in such a case was: use 'dd' to wipe the beginning of the USB stick. The iso2usb.sh script may be confused by the remnants of the previous Slackware Live Partition and this 'dd' command will wipe the first 10 MB of the USB stick, hopefully enough to wipe all partition data (something that gdisk should have done in the script but which it apparently fails to do):
Code:

dd if=/dev/zero of=/dev/sdb bs=1M count=10
Note that this will irrevocably write 10 MB of zeroes to the device /dev/sdb so please check in advance if /dev/sdb is indeed your USB stick.
After executing this 'dd' command, try your iso2usb.sh command again.

Hooks123 07-09-2017 11:04 AM

I tried the dd if=/dev/zero of=/dev/sdb bs=1M count=10 code and then reran the iso2usb.sh command. Im getting the same error. Too many clusters for filesystem. FAILED at line 547.

Is there a way to completely wipe out my usb and run the iso2usb.sh again?
thanks

Alien Bob 07-09-2017 01:37 PM

That line which causes the error is:
Code:

mkdosfs -s 2 -n "DOS" ${TARGET}1
Can you try editing that line and change it to (adding "-F12" to indicate a 12bit FAT):
Code:

mkdosfs -F12 -s 2 -n "DOS" ${TARGET}1
And then try running the iso2usb.sh commandline again?
If that does not make any difference, could you try this line instead (leaving out some instead of adding some)?
Code:

mkdosfs -n "DOS" ${TARGET}1
.. and then re-run the iso2usb.sh command.

Hooks123 07-09-2017 02:04 PM

mkdosfs -n "DOS" ${TARGET}1 seemed to have worked. It is now copying files from ISO to USB.

Thanks a bunch Alien Bob. I appreciate everything that you do on the Slackware project. Great work.


All times are GMT -5. The time now is 10:26 PM.