up vote 2 down vote favorite

1

i use this command to make a bootable flash disk of linux mint

sudo dd if=~/Desktop/linuxmint.iso of=/dev/sdx oflag=direct  bs=1048576

it's work, but now my flash disk is lock and i can't change file on it now this file is on flash disk

dr-xr-xr-x 1 ahmad ahmad  2048 May  13 02:24 boot
dr-xr-xr-x 1 ahmad ahmad  2048 May  13 02:24 casper
dr-xr-xr-x 1 ahmad ahmad  2048 May  13 02:23 dists
dr-xr-xr-x 1 ahmad ahmad  2048 May  13 02:24 EFI
dr-xr-xr-x 1 ahmad ahmad  8192 May  13 02:24 isolinux
-r--r--r-- 1 ahmad ahmad 21495 May  13 02:24 MD5SUMS
dr-xr-xr-x 1 ahmad ahmad  2048 May  13 02:23 pool
dr-xr-xr-x 1 ahmad ahmad  2048 May  13 02:24 preseed
-r--r--r-- 1 ahmad ahmad   220 May  13 02:24 README.diskdefines

i try sudo chmod 777 * on my disk but it don't work

linux file-permissions dd

shareimprove this question

asked Jul 14 '14 at 8:05

Ebrahimi

113114

migrated from stackoverflow.com Jul 14 '14 at 8:09

This question came from our site for professional and enthusiast programmers.

add a comment


2 Answers

active oldest votes


up vote 2 down vote accepted

However you can write your resulting /dev/sdX device. After you are done with dd as you mentioned you can mount /dev/sdX as RW when you didn't boot you system from this device.

  • If you have already mounted this device, and it is Read Only, you can remount it in RW by

sudo mount -o remount,rw /dev/sdX , but it works only if you are not running your / system from this partition. Check the partitions mounted with mount -l. Well, actually running OS from this device you will see that the file system changes that you have done can be seen during the sessionm but it's a kind of illusion, they will no be written to the disk.

  • If you need to have a different data set in the iso file, you need it to mount, copy this data, modify and then make a new ISO by something like.

mkisofs -o /tmp/cd.iso /tmp/directory/ To make an ISO from files on your hard drive.

  • If you need to make a bootable USB drive from your image: choose either Startup Disk Creator or UNetbootin. And if you want to make changes to be saved after you worked in OS on you USB drive you need to tell about persistence to these programs at the disc creation stage.

in Startup Disk Creator:

in UNetbootin:

shareimprove this answer

edited Jul 14 '14 at 10:41

 

 

answered Jul 14 '14 at 10:28

Ruslan Gerasimov

1,8861811

add a comment


up vote 1 down vote

You can't change permissions nor alter any data in an ISO 9660 filesystem since it's read-only by nature. Despite this you can opt to somehow update data on it if your record format supports multiple sessions. The only thing to consider is that can't change it the normal way in the UNIX filesystem. You may find this howto helpful. Directly creating a new ISO image than having multiple sessions may also be a better practice. The only thing is that it's complicated when you're creating an isolinux-bootable one.

shareimprove this answer

answered Jul 14 '14 at 8:24

konsolebox

1914

add a comment

 

https://superuser.com/questions/782847/changing-permissions-of-read-only-file-system-in-linux

 

##############################################################################################################################

#################################################################################################################################

 

错误:chmod: changing permissions of ‘/etc/passwd': Read-only file system

2016年03月08日 14:33:51

阅读数:6711

给passwd文件加权限,修改/etc/passwd目录下所有的文件夹属性为可写可读可执行,执行以下命令:chomd 777 /etc/passwd

的时候提示错误:

chmod: changing permissions of ‘/etc/passwd': Read-only file system

 

 

解决方法:

产生这个问题的原因是文件系统此时处于只读模式下,/etc/passwd和/etc/shadow不能被修改,运行下面的命令就可以解决这个问题

#mount -rw -o remount /

注:

  mount 是挂载命令

  -rw  是说指定的挂载文件是可读/写的

  -o remount / 是说重新挂载根