- Как исправить read only file system в Linux
- Ошибка read only file system в Linux
- Флешка монтируется только read-only. Помогите.
- Thread: Fix Read Only USB
- Fix Read Only USB
- Re: Fix Read Only USB
- Re: Fix Read Only USB
- Re: Fix Read Only USB
- Re: Fix Read Only USB
- Re: Fix Read Only USB
- Fix read only file system usb [closed]
- 1 Answer 1
- Quick walkthrough of steps
- Thread: [SOLVED] USB Flash Drive Read Only
- [SOLVED] USB Flash Drive Read Only
- Re: USB Flash Drive Read Only
- Re: USB Flash Drive Read Only
- Re: USB Flash Drive Read Only
- Re: USB Flash Drive Read Only
- Re: USB Flash Drive Read Only
Как исправить read only file system в Linux
Ошибка read only file system может возникнуть при загрузке с LiveCD диска или в режиме восстановления вашего дистрибутива. Она означает, что файловая система в которую вы пытаетесь вести запись примонтирована только для чтения. Этому может быть несколько причин. Есть файловые системы, которые доступны только для чтения это файловая система оптических дисков — ISO, а также файловая система образов SquashFS.
С такими файловыми системами вы сделать ничего не сможете. Для изменения данных в них, надо распаковать образ, изменить данные и запаковать его обратно. Но что касается обычных файловых систем, таких как EXT4, BTRFS, XFS, то их можно монтировать и для чтения и для записи.
Ошибка read only file system в Linux
В этой небольшой статье мы рассмотрим как исправить read only file system Linux перемонтировав файловую систему для записи. Первым делом надо определиться с точкой монтирования, для которой надо разрешить запись. Попытаемся создать файл в корневом каталоге:
Ошибка, файловая система корневого каталога доступна только для чтения. Чтобы посмотреть все точки монтирования доступные в системе выполните в терминале:
mount | grep /dev/sd
В данном случае, корневая файловая система и есть точкой монтирования. Но у вас, например, возникнут проблемы с созданием файла в домашней папке, то надо будет уже перемонтировать /home. Смотрите внимательно. Когда точка монтирования выбрана, осталось её примонтировать с правами на запись:
sudo mount -o remount,rw /
sudo mount -o remount,rw /home
После этого вы сможете создать файл без каких-либо проблем. После завершения работы, во избежание повреждения данных при перезагрузке, желательно перемонтировать файловую систему обратно в режим только для чтения:
sudo mount -o remount,ro /
Теперь вы знаете что означает эта ошибка и как с ею справится. Если у вас остались вопросы, спрашивайте в комментариях!
Источник
Флешка монтируется только read-only. Помогите.
Здравствуйте уважаемые гуру. Помогите пожалуйста по сабжу.
lsusb
Bus 001 Device 005: ID 0951:1621 Kingston Technology
делаю
mount /dev/sdb1 /media/kin/
mount: block device /dev/sdb1 is write-protected, mounting read-only
и даже так
mount -o rw,noexec /dev/sdb1 /media/kin/
mount: block device /dev/sdb1 is write-protected, mounting read-only
dmesg | tail
[ 4715.584568] sd 9:0:0:0: Attached scsi generic sg2 type 0
[ 4716.873369] sd 9:0:0:0: [sdb] 63037440 512-byte logical blocks: (32.2 GB/30.0 GiB)
[ 4716.873857] sd 9:0:0:0: [sdb] Write Protect is on
[ 4716.873861] sd 9:0:0:0: [sdb] Mode Sense: 23 00 80 00
[ 4716.873864] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[ 4716.877347] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[ 4716.877353] sdb: sdb1
[ 4716.926237] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[ 4716.926244] sd 9:0:0:0: [sdb] Attached SCSI removable disk
[ 4728.401660] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
fdisk -l
Disk /dev/sdb: 32.3 GB, 32275169280 bytes
5 heads, 32 sectors/track, 393984 cylinders
Units = cylinders of 160 * 512 = 81920 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 51 393984 31514688 c W95
FAT32 (LBA)
Источник
Thread: Fix Read Only USB
Thread Tools
Display
Fix Read Only USB
fsck /dev/sdb
wipefs —all /dev/sdb
mount -o remount,rw /dev/sdb
This is a new USB flash drive and nothing seems to work. Any other options I missed.
Re: Fix Read Only USB
You need a space after he comma in the mount command (but that’s probably just a typo on the forum.)
For some reason certain USB keys of mine, despite being FAT formatted, mount as having root as the owner.
sudo chown user /media/
Really shouldn’t have to be doing that though!
Re: Fix Read Only USB
chown only works on Linux-native file systems.
Re: Fix Read Only USB
No it doesn’t. It is only persistent on linux filesystems but for that session it will work on any filesystem.
Re: Fix Read Only USB
Tried the following:
fsck /dev/sdb
wipefs —all /dev/sdb
mount -o remount,rw /dev/sdb
This is a new USB flash drive and nothing seems to work. Any other options I missed.
Does the USB have a partition table on it?
If not you need to create a PT and then you need to also create a partition on that USB drive as well; trying to work on the whole device, ie, /dev/sdb will cause you difficulties; I’m not even sure it can be done.
Lots of info at https://askubuntu.com/questions/2238. sb-flash-drive on various ways to do this using GUI or terminal commands.
Re: Fix Read Only USB
What do you see in dmesg command in a terminal after you plug in the USB device? Normally partition(s) on a USB device would mount automatically, but /dev/sdb is a device, not a partition. So not sure what you are trying to achieve with wipefs a non-partition and trying to mount a non-partition. The first partition on /dev/sdb would be /dev/sdb1.
Источник
Fix read only file system usb [closed]
Want to improve this question? Update the question so it’s on-topic for Unix & Linux Stack Exchange.
Closed 2 years ago .
I have a usb flash memory which I can’t do anything on it because its read only:
I’ve tried to fix file system with mkfs and I got this :
How can I fix this?
PS: Let’s assume the USB is not write-protected by design, such as with a manual switch.
1 Answer 1
Make sure you are performing filesystem management actions with escalated privileges. Most systems do not let users modify filesystems.
Ensure the device isn’t already mounted. As root, execute lsblk and look for any filesystems using /dev/sdc1 . If it is mounted you will have to unmount prior to formatting with mkfs.
Make sure the device is not a read-only UFD. Though uncommon, these do exist . usually as hand-outs from vendor booths with product sheets or other vendor info on them.
Quick walkthrough of steps
- Verify you are performing all tasks as root. Best way is to simply open a shell as root: In a terminal, execute sudo -i is usually the easiest way.
- Unmount the device with umount /dev/sdc1 (may give error info if it is not mounted, no worries if this happens)
VVV WARNING THIS WILL DESTROY ALL DATA ON THE DEVICE VVV
- Format the device mkfs.vfat /dev/sdc1 (you can force 32bit size if you wish, but mkfs will select whatever fits best for the size of the volume)
If this does not work, you may want to wipe the device, recreate the partition with fdisk, and try again:
wipefs -a /dev/sdc
Again, this will destroy any remaining data. You have been warned.
Источник
Thread: [SOLVED] USB Flash Drive Read Only
Thread Tools
Display
[SOLVED] USB Flash Drive Read Only
Earlier this evening, I copied some files to a 16 GB flash drive. When I was done, I right clicked on the desktop icon and selected unmount. A dialog box which said it was safe to remove popped up. So I removed it. A little while later I plugged it back in to recopy a file I had changed. Only one the video podcast folder and my bookmark back-up is displayed on the drive. Yet, it says there are 8 files with 12.1 GB of the 16 being free. It won’t let me do anything with it cause it says it is read-only.
How do I get full access back?
Re: USB Flash Drive Read Only
My key has a physical switch on it to set it to read-only mode. This has caused me grief a few times because it’s always the last thing I think to check. Does your key have that?
Re: USB Flash Drive Read Only
No, it doesn’t have any switches.
Re: USB Flash Drive Read Only
The reason for the behaviour may possibly be explained by your fstab setup and folder permissions which is a long subject. If you want to go into it, you might start here.
Re: USB Flash Drive Read Only
Try restarting the whole PC and see if it’s more agreeable again.
Also a possibility that the data on the drive is corrupted. I’ve had linux suddenly go read-only on drives when there was something wrong with them. Might be worth trying to reformat the flashdrive with gparted in super user mode.
Re: USB Flash Drive Read Only
You might also try right-clicking the drive to make sure that it did indeed mount again. I’ve had situations where the drive would pop up and you could read data, but Ubuntu never actually mounted the drive so you couldn’t write to it. I believe there’s a read-only option under «Properties» if you right-click the media. Good luck!
Источник