LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-14-2019, 12:16 PM   #1
ahc_fan
Member
 
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 247

Rep: Reputation: 9
Copying ISO to thumb drive using 'dd' causes thumb drive to be read-only?


I'm not sure why this happens, but whenever I copy a Linux ISO to a USB thumb drive using the dd command the thumb drive becomes read-only. I need to copy additional files onto the drive. Why is the thumb drive read-only? Should I try another method? I would try unetbootin but it almost never creates a bootable drive.

Edit: I did try to create a new ISO with the additional files that I need, but then it was not longer bootable.

Last edited by ahc_fan; 01-14-2019 at 12:31 PM.
 
Old 01-14-2019, 01:39 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,262

Rep: Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660
Because an iso9669 filesystem is read-only by design and whatever software you use will do that. Try booting another Linux OS and use GParted/Parted or similar software to shrink the partition on which you have the Linux iso and create another partition.
 
1 members found this post helpful.
Old 01-14-2019, 01:49 PM   #3
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 299

Rep: Reputation: 132Reputation: 132
Quote:
Originally Posted by ahc_fan View Post
Why is the thumb drive read-only? Should I try another method?
I don't think the thumb drive itself is read-only but as an ISO fs is read-only all of the files and directories, including its root directory probably are read-only.
See if you can change the mount directory OF the thumb stick to read-write (with the stick mounted, of course)
Code:
chmod +w /path/to/mount/dir
If that works you can do the same for those directories on the stick you want to put extra files in.
You also look into the iso itself by mounting it through the "loop" option
Code:
mount -o loop <iso_filename> /mount/dir
to see what the attributes inside are, especially those of directories (as you don't want to change files, the fact that they may be read-only doesn't matter). But you cannot put any files in read-only directories.
 
1 members found this post helpful.
Old 01-14-2019, 10:39 PM   #4
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 681

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by ahc_fan View Post
Should I try another method?
My favorite is Rufus, but only runs on Windows. You can try etcher, not sure if it's free.
 
Old 01-15-2019, 05:38 AM   #5
ahc_fan
Member
 
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 247

Original Poster
Rep: Reputation: 9
Thanks you all. I didn't realize the ISO would continue being read-only once copied onto a USB like that. Could you explain why adding files to the ISO would stop it being bootable? All I did was mount the ISO, copy the contents to another directory, copy my files into the new directory, and then created a new ISO from the new directory using mkisofs.
 
Old 01-15-2019, 05:51 AM   #6
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 299

Rep: Reputation: 132Reputation: 132
Quote:
Originally Posted by ahc_fan View Post
Could you explain why adding files to the ISO would stop it being bootable? All I did was mount the ISO, copy the contents to another directory,
Being bootable is not a FILE, it is a special block (with the bootloader) in the beginning of the iso image.
When you copied all files to a new tree you would have to make the new iso bootable again. i.e. by applying isolinux (www.syslinux.org/wiki/index.php?title=ISOLINUX to that iso file.
BTW: syslinux itself is more versatile, you can also make images for a USB stick bootable with that and it doesn't have to be read-only.
Adding files to the original ISO image shouldn't make any difference, but as I said, you will have to change some directories to read-write to be able to do so.

Last edited by ehartman; 01-15-2019 at 05:52 AM.
 
Old 01-15-2019, 06:05 AM   #7
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,586

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
maybe this will help https://help.ubuntu.com/community/US...lation%20Media https://www.makeuseof.com/tag/10-too...-usb-iso-file/

Last edited by colorpurple21859; 01-15-2019 at 06:32 AM.
 
Old 01-15-2019, 08:49 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,262

Rep: Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660Reputation: 1660
Quote:
Could you explain why adding files to the ISO would stop it being bootable?
In and of itself, that should not happen. What files and where were they located and did they affect the system or boot files?

You should be able to use the Live usb to add data, install additional software, etc. limited by the size of the usb and of course, NEVER RE-BOOTING. Once you reboot, every change is lost.

Alternatives are using a live usb created with persistence.
You can also create an additional partition on the usb to use space not used by the live iso install from another Linux system. YOu should be able to copy data to that partiition and save it and have it on reboot. This would require you to create a mount point for the partition and to manually mount it on each reboot.

I'm not sure what your end goal is but, if you want to have a system on a usb on which you can save data and install software is either a persistent install or better, a full install to the usb.
 
Old 01-15-2019, 09:10 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 6,624
Blog Entries: 2

Rep: Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200
Quote:
Originally Posted by Brains View Post
My favorite is Rufus, but only runs on Windows. You can try etcher, not sure if it's free.
Etcher is indeed free.
 
  


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
dd to copy a thumb drive which I am live booted on to another thumb drive DrinkinHomeBrew Linux - Newbie 3 01-26-2015 05:52 PM
USB thumb drive mounts read only in mandriva 2008 gpatto1 Linux - Newbie 3 01-25-2009 01:32 AM
Thumb drive is getting read only Fedora core 5. Why?? vmsathar Linux - Software 2 07-19-2006 03:53 AM
USB thumb drive mounting as Read Only baryonyx SUSE / openSUSE 3 05-25-2006 01:57 AM
Does anyone Know how to open either .iso.rz or these .iso.xdelta,.iso.bz2,.iso.lzma?? maximalred Debian 5 06-09-2004 07:15 AM

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

All times are GMT -5. The time now is 06:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration