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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
01-14-2019, 11:16 AM
|
#1
|
Member
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 259
Rep:
|
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 11:31 AM.
|
|
|
01-14-2019, 12:39 PM
|
#2
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,418
|
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.
|
01-14-2019, 12:49 PM
|
#3
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by ahc_fan
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.
|
01-14-2019, 09:39 PM
|
#4
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
Quote:
Originally Posted by ahc_fan
Should I try another method?
|
My favorite is Rufus, but only runs on Windows. You can try etcher, not sure if it's free.
|
|
|
01-15-2019, 04:38 AM
|
#5
|
Member
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 259
Original Poster
Rep:
|
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.
|
|
|
01-15-2019, 04:51 AM
|
#6
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by ahc_fan
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 04:52 AM.
|
|
|
01-15-2019, 05:05 AM
|
#7
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,862
|
Last edited by colorpurple21859; 01-15-2019 at 05:32 AM.
|
|
|
01-15-2019, 07:49 AM
|
#8
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,418
|
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.
|
|
|
01-15-2019, 08:10 AM
|
#9
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
Quote:
Originally Posted by Brains
My favorite is Rufus, but only runs on Windows. You can try etcher, not sure if it's free.
|
Etcher is indeed free.
|
|
|
All times are GMT -5. The time now is 03:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|