1

My sandisk pendrive is write protected and i have tried everything to repair it but nothing worked. Now finally i am trying to format it using bash in my windows machine. But commands like fdisk -l are not running. Can someone help?

fdisk: cannot open /proc/partitions: No such file or directory

And df or mount dont show my pendrive which is connected

root@DESKTOP-FGQQE3V:~# fdisk -l
fdisk: cannot open /proc/partitions: No such file or directory
root@DESKTOP-FGQQE3V:~# df
Filesystem     1K-blocks      Used Available Use% Mounted on
rootfs         459892424 417204692  42687732  91% /
root           459892424 417204692  42687732  91% /root
home           459892424 417204692  42687732  91% /home
data           459892424 417204692  42687732  91% /data
cache          459892424 417204692  42687732  91% /cache
mnt            459892424 417204692  42687732  91% /mnt
none           459892424 417204692  42687732  91% /dev
none           459892424 417204692  42687732  91% /run
none           459892424 417204692  42687732  91% /run/lock
none           459892424 417204692  42687732  91% /run/shm
none           459892424 417204692  42687732  91% /run/user
C:             459892424 417204692  42687732  91% /mnt/c
D:             514935804 444943028  69992776  87% /mnt/d
root@DESKTOP-FGQQE3V:~# mount
rootfs on / type lxfs (rw,noatime)
root on /root type lxfs (rw,noatime)
home on /home type lxfs (rw,noatime)
data on /data type lxfs (rw,noatime)
cache on /cache type lxfs (rw,noatime)
mnt on /mnt type lxfs (rw,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
none on /dev type tmpfs (rw,noatime,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620)
none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noatime)
C: on /mnt/c type drvfs (rw,noatime,uid=1000,gid=1000)
D: on /mnt/d type drvfs (rw,noatime,uid=1000,gid=1000)

1 Answers1

0

If you're using the "linux subsystem" feature in Windows, it won't work. This shell does not have access to the 'real' devices connected to the machine.

I guess the easiest solution would be to use a small Linux virtual machine or to boot a linux system.