Linux mount is write protected mounting read only one

M17: Trying to mount Windows 10 .iso onto partition via terminal, getting «block device ? is write-protected, mounting read-only». Can I get a help?»

So read-only isn’t a problem? I’ll have to check when I get home to the computer. Maybe I overreacted when seeing a statement that I didn’t know the purpose of it telling me, so I assumed it either succeeded only partially or failed completely. Can’t get back home for at least two days because of this shitty weather.

It’s a CDROM image, those filesystems are read-only by design. Use mount -oro . to indicate you want to mount read-only and you won’t get the error; the default is to mount read-write, but that’s impossible with this filesystem type, hence the warning message.

Thanks you two 🙂 I guess I just need to keep going with the guide. Should I update this because I’m probably the only one documenting this method?

2 Answers 2

It would be much easier to install windows first, then install ubuntu. Ubuntu’s bootloader will check for other operating systems during installation and include them in the boot menu, where Windows is pretty strict, only showing windows unless you add other entries manually.

A few notes:You didn’t «mount» the image to a USB stick — you copied it. You can only «mount» a USB-Stick (or image) to a folder which is only a temporary state.It’s the same thing like in Windows where you have the partition C. Booting Linux, you wouldn’t have ‘C’ but just some NTFS-partition. But you can mount it, to access it. Windows uses Drive Letters as mountpoints (usually), Unix&Linux paths. Farther down:Maybe your machine is an UEFI machine? In this case I have not found any way to create an USB of a Windows image to make use of BIOS/MBR and UEFI. In case you have UEFI there are 2 options:

  • Use it:
    1. You need to format the USB as FAT32 using GPT partition table layout.
    2. Then extract the iso and copy all its contents over to the USB (ie.: mount the USBs only partition, copy, unmount)
  • Use MBR layout:
    1. Just use dd bs=4 if=/path/to/iso of=/dev/sdX where sdX is the unmounted device descriptor. It will be something like sda , sdb but do not append any number like sdc2 as this denotes a partition. We want to directly write to the device.
    2. In the UEFI settings enable «Legacy USB» mode.

Either way, you now shold be able to boot from the USB (select in bootmenu etc).

Читайте также:  Linux mint удалить устройство

If you do not have UEFI you only can go the MBR way. There won’t be a legacy mode you need to activate. It seems though, that you have UEFI.

After that, install Windows.

Источник

🛠️ Решение ошибки mount: /dev/sdb is write-protected, mounting read-onlymount: unknown filesystem type ‘(null)’

При подключении виртуального диска я вижу его в выводе, это sdb:

lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT fd0 sda ├─sda1 ├─sda2 ext4 f0ea8e71-46b3-4b16-be45-882ccaa3e800 /boot └─sda3 LVM2_member URK7Du-7SnV-9See-mSwd-JSVr-B485-U33YEw ├─bootdg-root ext4 01de731b-1d9b-4f44-89c3-6e03e36fc148 / └─bootdg-swap swap 495a84f1-0cfb-40af-bbf3-ec41eac1719f [SWAP] sdb sr0

Теперь логично будет примонтировать его:

mount: /dev/sdb is write-protected, mounting read-only mount: unknown filesystem type '(null)'

Также я попробовал слудующие варианты:

# mount /dev/sdb /media/backup -t auto mount: you must specify the filesystem type
# mount /dev/sdb1 /mydisk/ -t ntfs mount: unknown filesystem type 'ntfs'
# mount /dev/sdb /media/backup -t ext4 mount: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.

Решение

mkfs.ext4 /dev/sdb 2>/dev/null /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n)

Далее нажмите y

mkfs.ext4 /dev/sdb 2>/dev/null /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 655360 inodes, 2621440 blocks 131072 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2151677952 80 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done

Теперь вы можете спокойно выполнить монтирование диска.

Источник

Флешка монтируется только read-only. Помогите.

делаю
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

Читайте также:  Wallpaper engine linux аналог

Device Boot Start End Blocks Id System
/dev/sdb1 * 51 393984 31514688 c W95
FAT32 (LBA)

гуглил, не помогло. Что дальше? Инфу переписали, нужно отформатировать. На борту Debian 607.
Где то советовали сайт flashboot.ru но нету под рукой вин.(не ставить же ее )))) Как быть.

Источник

USB Read-Only Filesystem

I’m pretty confident in Linux now, but this USB stick is complaining of a read only file system, but I wrote to it in Windows 7 a minute ago, and there was no issues. I’ve tried all the suggestions from other posts, and all the things I can think of. Here is the dmesg stating write-protection is off:

[ 5563.009330] scsi 11:0:0:0: Direct-Access SanDisk Cruzer Edge 1.26 PQ: 0 ANSI: 5 [ 5563.009676] sd 11:0:0:0: Attached scsi generic sg5 type 0 [ 5563.011878] sd 11:0:0:0: [sdi] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 5563.013754] sd 11:0:0:0: [sdi] Write Protect is off [ 5563.013759] sd 11:0:0:0: [sdi] Mode Sense: 43 00 00 00 [ 5563.014970] sd 11:0:0:0: [sdi] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA 
adam@Home:~$ sudo mount /dev/sdi ~/usb mount: /dev/sdi is write-protected, mounting read-only 
adam@Home:~$ sudo dd if=/dev/zero of=/dev/sdi bs=1k count=2048 2048+0 records in 2048+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.426446 s, 4.9 MB/s adam@Home:~$ sudo parted /dev/sdi GNU Parted 3.2 Using /dev/sdi Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Error: /dev/sdi: unrecognised disk label Model: SanDisk Cruzer Edge (scsi) Disk /dev/sdi: 16.0GB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: (parted) mklabel msdos (parted) mkpart primary File system type? [ext2]? fat32 Start? 1MiB End? 100% (parted) p Model: SanDisk Cruzer Edge (scsi) Disk /dev/sdi: 16.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 16.0GB 16.0GB primary fat32 lba (parted) q Information: You may need to update /etc/fstab. adam@Home:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 698.7G 0 disk └─md0 9:0 0 2.7T 0 linear /mnt/raiddrives sdb 8:16 0 698.7G 0 disk └─md0 9:0 0 2.7T 0 linear /mnt/raiddrives sdc 8:32 0 698.7G 0 disk └─md0 9:0 0 2.7T 0 linear /mnt/raiddrives sdd 8:48 0 698.7G 0 disk └─md0 9:0 0 2.7T 0 linear /mnt/raiddrives sde 8:64 1 7.6G 0 disk ├─sde1 8:65 1 487M 0 part /boot ├─sde2 8:66 1 1K 0 part └─sde5 8:69 1 7.1G 0 part ├─Home--vg-root 252:0 0 3.2G 0 lvm / └─Home--vg-swap_1 252:1 0 4G 0 lvm [SWAP] sdi 8:128 1 14.9G 0 disk └─sdi1 8:129 1 14.9G 0 part adam@Home:~$ sudo mkfs -t vfat /dev/sdi1 mkfs.fat 3.0.28 (2015-05-16) adam@Home:~$ sudo mount /dev/sdi ~/usb mount: wrong fs type, bad option, bad superblock on /dev/sdi, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. 

Источник

Thread: Root filesystem drive is now write-protected

biggunks is offlineFirst Cup of Ubuntu

Читайте также:  Delete android studio linux

Root filesystem drive is now write-protected

I can’t seem to create any new files on my / and can’t do simple commands such as passwd.

I found some advice to run the following, but as you can see that failed also. It seems I’m stuck with my drive mounting as read only. I’m running Hardy.

$sudo mount -o remount,rw /
mount: block device /dev/sdc1 is write-protected, mounting read-only

Here’s the info from fdisk and file -s for the drive in question.

Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4b36bdea

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 9327 74919096 83 Linux
/dev/sdc2 9328 9729 3229065 5 Extended
/dev/sdc5 9328 9729 3229033+ 82 Linux swap / Solaris
$ sudo fdisk -l /dev/sdc1

Disk /dev/sdc1: 76.7 GB, 76717154304 bytes
255 heads, 63 sectors/track, 9326 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sdc1 doesn’t contain a valid partition table
$ sudo fdisk -l /dev/sdc2
$ sudo fdisk -l /dev/sdc5

Disk /dev/sdc5: 3306 MB, 3306530304 bytes
255 heads, 63 sectors/track, 401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sdc5 doesn’t contain a valid partition table
$ sudo file -s /dev/sdc1
/dev/sdc1: Linux rev 1.0 ext3 filesystem data (needs journal recovery) (errors) (large files)
$ sudo file -s /dev/sdc2
/dev/sdc2: x86 boot sector, extended partition table (last)\011
$ sudo file -s /dev/sdc5
/dev/sdc5: Linux/i386 swap file (new style) 1 (4K pages) size 807257 pages

Here’s the fdisk info for my other 2 drives. I don’t think you’ll need it, but here it is anyways.

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004bb3d

Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 83 Linux
$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 12159 97667136 83 Linux
/dev/sdb2 12160 24318 97667167+ 83 Linux

One other tidbit of info that might help is that after a power outage the other day, my drives seem to be mounting at different points. For example, my /dev/sdc (the drive that I’m having trouble with), I think used to be /dev/hdd. And I’ve had to recreate some of my symlinks.

$ less /etc/fstab
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/hdb1
UUID=ff7ccb24-0212-4208-bf6a-f1c32f39ed3a / ext3 defaults,errors=remount-ro 0 1
# /dev/hdb5
UUID=5d0bfc71-1f98-4094-b6e7-3865d7d51a23 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec 0 0

#
/dev/sda1 /mnt/sda1 auto defaults 0 0
/dev/sdb1 /mnt/sdb1 auto defaults 0 0
/dev/sdb2 /mnt/sdb2 auto defaults 0 0
/dev/sdc1 /mnt/sdc1 auto defaults 0 0
/dev/sdc2 /mnt/sdc2 auto defaults 0 0

Источник

Оцените статью
Adblock
detector