Cannot modify hard drive / stuck in read-only mode - can no longer boot












1















I'm using Ubuntu 18.04.



Suddenly, I could no longer write to my main drive, a SSD, crashing all programs that I was running. When I rebooted, Ubuntu no longer started, not finding any OS/disk.



I can start from a Live USB but no matter how I try to repair (e.g. fsck) or format the SSD (parted, gparted, dd, Gnome Disk), nothing gets written to the SSD and I always see the original two partitions that I have been trying to delete.



This is the second time I have had this problem, the first time I simply replaced the SSD assuming it was a hardware problem.



Example output:



ubuntu@ubuntu:~$ sudo parted -s /dev/sda print
Model: ATA WDC WDS250G2B0A- (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 250GB 250GB ext4

ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 1
Error: Input/output error during write on /dev/sda
ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 2
Error: Input/output error during write on /dev/sda

ubuntu@ubuntu:~$ sudo fdisk -l
[...]
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C814D953-DFE7-4E5B-9131-C05FACF1BB77

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 488396799 487346176 232.4G Linux filesystem
[...]


What is blocking this SSD? Why can I not format it?



Edit:
Images of GNOME Disk check
GNOME Disk Check
Error when trying to fix
Error



output of mount



ubuntu@ubuntu:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=32888176k,nr_inodes=8222044,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=6588468k,mode=755)
/dev/sdc on /cdrom type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048)
/dev/loop0 on /rofs type squashfs (ro,noatime)
/cow on / type overlay (rw,relatime,lowerdir=//filesystem.squashfs,upperdir=/cow/upper,workdir=/cow/work)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=34188)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=6588464k,mode=700,uid=999,gid=999)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=999,group_id=999)
/var/lib/snapd/snaps/core_4917.snap on /snap/core/4917 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_319.snap on /snap/gtk-common-themes/319 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_70.snap on /snap/gnome-3-26-1604/70 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_180.snap on /snap/gnome-calculator/180 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_103.snap on /snap/gnome-characters/103 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_37.snap on /snap/gnome-logs/37 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_51.snap on /snap/gnome-system-monitor/51 type squashfs (ro,nodev,relatime,x-gdu.hide)









share|improve this question




















  • 1





    It is possibly your system partition is mounted in read-only mode. Run 'mount | grep sda2' and look the output (rw - read/write, ro - read-only). Also I suggest you to check the disk S.M.A.R.T status. You can use for for example Gparted LiveISO (right mouse click on a desktop -> utilites -> gsmartcontrol).

    – Gannet
    Jan 3 at 23:53






  • 1





    It seems your EFI partition has damaged FAT32 file system. You can try to reformat/recreate it with GParted, then install boot/esp flags on it. After this you will be able to reinstall Grub2, if needed, through chroot mode. P.S. And also 512MB for EFI-partitions is too much. Try 33MB.

    – Gannet
    Jan 4 at 14:54








  • 1





    To check S.M.A.R.T. status of you disk, you can install gsmartcontrol or even simplier just run: 'sudo smartctl -a /dev/sda | grep -i "smart overall' (without quotes). But there are several test to check disk health also.

    – Gannet
    Jan 4 at 15:03






  • 1





    If you even not able to delete the partition, then something wrong with your SSD. Did you also tried with Gparted? If it not able to delete a partition too, I would try SSD's OEM utility. Usually they have the ability to reset the drive to the factory defaults. And of cause you should backup all your important data before doing this.

    – Gannet
    Jan 5 at 22:42






  • 1





    Also, when you'll backup all your data, you can try sudo gdisk /dev/sda then push 'v' button, then 'x' and then 'z'. This should destroy GPT data structures on your drive. If it will successful, you will be able to recreate GPT partition table and all partitions from zero and then reinstall the system.

    – Gannet
    Jan 5 at 22:46
















1















I'm using Ubuntu 18.04.



Suddenly, I could no longer write to my main drive, a SSD, crashing all programs that I was running. When I rebooted, Ubuntu no longer started, not finding any OS/disk.



I can start from a Live USB but no matter how I try to repair (e.g. fsck) or format the SSD (parted, gparted, dd, Gnome Disk), nothing gets written to the SSD and I always see the original two partitions that I have been trying to delete.



This is the second time I have had this problem, the first time I simply replaced the SSD assuming it was a hardware problem.



Example output:



ubuntu@ubuntu:~$ sudo parted -s /dev/sda print
Model: ATA WDC WDS250G2B0A- (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 250GB 250GB ext4

ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 1
Error: Input/output error during write on /dev/sda
ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 2
Error: Input/output error during write on /dev/sda

ubuntu@ubuntu:~$ sudo fdisk -l
[...]
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C814D953-DFE7-4E5B-9131-C05FACF1BB77

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 488396799 487346176 232.4G Linux filesystem
[...]


What is blocking this SSD? Why can I not format it?



Edit:
Images of GNOME Disk check
GNOME Disk Check
Error when trying to fix
Error



output of mount



ubuntu@ubuntu:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=32888176k,nr_inodes=8222044,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=6588468k,mode=755)
/dev/sdc on /cdrom type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048)
/dev/loop0 on /rofs type squashfs (ro,noatime)
/cow on / type overlay (rw,relatime,lowerdir=//filesystem.squashfs,upperdir=/cow/upper,workdir=/cow/work)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=34188)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=6588464k,mode=700,uid=999,gid=999)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=999,group_id=999)
/var/lib/snapd/snaps/core_4917.snap on /snap/core/4917 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_319.snap on /snap/gtk-common-themes/319 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_70.snap on /snap/gnome-3-26-1604/70 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_180.snap on /snap/gnome-calculator/180 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_103.snap on /snap/gnome-characters/103 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_37.snap on /snap/gnome-logs/37 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_51.snap on /snap/gnome-system-monitor/51 type squashfs (ro,nodev,relatime,x-gdu.hide)









share|improve this question




















  • 1





    It is possibly your system partition is mounted in read-only mode. Run 'mount | grep sda2' and look the output (rw - read/write, ro - read-only). Also I suggest you to check the disk S.M.A.R.T status. You can use for for example Gparted LiveISO (right mouse click on a desktop -> utilites -> gsmartcontrol).

    – Gannet
    Jan 3 at 23:53






  • 1





    It seems your EFI partition has damaged FAT32 file system. You can try to reformat/recreate it with GParted, then install boot/esp flags on it. After this you will be able to reinstall Grub2, if needed, through chroot mode. P.S. And also 512MB for EFI-partitions is too much. Try 33MB.

    – Gannet
    Jan 4 at 14:54








  • 1





    To check S.M.A.R.T. status of you disk, you can install gsmartcontrol or even simplier just run: 'sudo smartctl -a /dev/sda | grep -i "smart overall' (without quotes). But there are several test to check disk health also.

    – Gannet
    Jan 4 at 15:03






  • 1





    If you even not able to delete the partition, then something wrong with your SSD. Did you also tried with Gparted? If it not able to delete a partition too, I would try SSD's OEM utility. Usually they have the ability to reset the drive to the factory defaults. And of cause you should backup all your important data before doing this.

    – Gannet
    Jan 5 at 22:42






  • 1





    Also, when you'll backup all your data, you can try sudo gdisk /dev/sda then push 'v' button, then 'x' and then 'z'. This should destroy GPT data structures on your drive. If it will successful, you will be able to recreate GPT partition table and all partitions from zero and then reinstall the system.

    – Gannet
    Jan 5 at 22:46














1












1








1








I'm using Ubuntu 18.04.



Suddenly, I could no longer write to my main drive, a SSD, crashing all programs that I was running. When I rebooted, Ubuntu no longer started, not finding any OS/disk.



I can start from a Live USB but no matter how I try to repair (e.g. fsck) or format the SSD (parted, gparted, dd, Gnome Disk), nothing gets written to the SSD and I always see the original two partitions that I have been trying to delete.



This is the second time I have had this problem, the first time I simply replaced the SSD assuming it was a hardware problem.



Example output:



ubuntu@ubuntu:~$ sudo parted -s /dev/sda print
Model: ATA WDC WDS250G2B0A- (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 250GB 250GB ext4

ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 1
Error: Input/output error during write on /dev/sda
ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 2
Error: Input/output error during write on /dev/sda

ubuntu@ubuntu:~$ sudo fdisk -l
[...]
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C814D953-DFE7-4E5B-9131-C05FACF1BB77

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 488396799 487346176 232.4G Linux filesystem
[...]


What is blocking this SSD? Why can I not format it?



Edit:
Images of GNOME Disk check
GNOME Disk Check
Error when trying to fix
Error



output of mount



ubuntu@ubuntu:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=32888176k,nr_inodes=8222044,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=6588468k,mode=755)
/dev/sdc on /cdrom type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048)
/dev/loop0 on /rofs type squashfs (ro,noatime)
/cow on / type overlay (rw,relatime,lowerdir=//filesystem.squashfs,upperdir=/cow/upper,workdir=/cow/work)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=34188)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=6588464k,mode=700,uid=999,gid=999)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=999,group_id=999)
/var/lib/snapd/snaps/core_4917.snap on /snap/core/4917 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_319.snap on /snap/gtk-common-themes/319 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_70.snap on /snap/gnome-3-26-1604/70 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_180.snap on /snap/gnome-calculator/180 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_103.snap on /snap/gnome-characters/103 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_37.snap on /snap/gnome-logs/37 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_51.snap on /snap/gnome-system-monitor/51 type squashfs (ro,nodev,relatime,x-gdu.hide)









share|improve this question
















I'm using Ubuntu 18.04.



Suddenly, I could no longer write to my main drive, a SSD, crashing all programs that I was running. When I rebooted, Ubuntu no longer started, not finding any OS/disk.



I can start from a Live USB but no matter how I try to repair (e.g. fsck) or format the SSD (parted, gparted, dd, Gnome Disk), nothing gets written to the SSD and I always see the original two partitions that I have been trying to delete.



This is the second time I have had this problem, the first time I simply replaced the SSD assuming it was a hardware problem.



Example output:



ubuntu@ubuntu:~$ sudo parted -s /dev/sda print
Model: ATA WDC WDS250G2B0A- (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 250GB 250GB ext4

ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 1
Error: Input/output error during write on /dev/sda
ubuntu@ubuntu:~$ sudo parted -s /dev/sda rm 2
Error: Input/output error during write on /dev/sda

ubuntu@ubuntu:~$ sudo fdisk -l
[...]
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C814D953-DFE7-4E5B-9131-C05FACF1BB77

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 488396799 487346176 232.4G Linux filesystem
[...]


What is blocking this SSD? Why can I not format it?



Edit:
Images of GNOME Disk check
GNOME Disk Check
Error when trying to fix
Error



output of mount



ubuntu@ubuntu:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=32888176k,nr_inodes=8222044,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=6588468k,mode=755)
/dev/sdc on /cdrom type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048)
/dev/loop0 on /rofs type squashfs (ro,noatime)
/cow on / type overlay (rw,relatime,lowerdir=//filesystem.squashfs,upperdir=/cow/upper,workdir=/cow/work)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=34188)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=6588464k,mode=700,uid=999,gid=999)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=999,group_id=999)
/var/lib/snapd/snaps/core_4917.snap on /snap/core/4917 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_319.snap on /snap/gtk-common-themes/319 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_70.snap on /snap/gnome-3-26-1604/70 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_180.snap on /snap/gnome-calculator/180 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_103.snap on /snap/gnome-characters/103 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_37.snap on /snap/gnome-logs/37 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_51.snap on /snap/gnome-system-monitor/51 type squashfs (ro,nodev,relatime,x-gdu.hide)






18.04 hard-drive






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 5 at 16:14







Edgar H

















asked Jan 3 at 13:41









Edgar HEdgar H

1438




1438








  • 1





    It is possibly your system partition is mounted in read-only mode. Run 'mount | grep sda2' and look the output (rw - read/write, ro - read-only). Also I suggest you to check the disk S.M.A.R.T status. You can use for for example Gparted LiveISO (right mouse click on a desktop -> utilites -> gsmartcontrol).

    – Gannet
    Jan 3 at 23:53






  • 1





    It seems your EFI partition has damaged FAT32 file system. You can try to reformat/recreate it with GParted, then install boot/esp flags on it. After this you will be able to reinstall Grub2, if needed, through chroot mode. P.S. And also 512MB for EFI-partitions is too much. Try 33MB.

    – Gannet
    Jan 4 at 14:54








  • 1





    To check S.M.A.R.T. status of you disk, you can install gsmartcontrol or even simplier just run: 'sudo smartctl -a /dev/sda | grep -i "smart overall' (without quotes). But there are several test to check disk health also.

    – Gannet
    Jan 4 at 15:03






  • 1





    If you even not able to delete the partition, then something wrong with your SSD. Did you also tried with Gparted? If it not able to delete a partition too, I would try SSD's OEM utility. Usually they have the ability to reset the drive to the factory defaults. And of cause you should backup all your important data before doing this.

    – Gannet
    Jan 5 at 22:42






  • 1





    Also, when you'll backup all your data, you can try sudo gdisk /dev/sda then push 'v' button, then 'x' and then 'z'. This should destroy GPT data structures on your drive. If it will successful, you will be able to recreate GPT partition table and all partitions from zero and then reinstall the system.

    – Gannet
    Jan 5 at 22:46














  • 1





    It is possibly your system partition is mounted in read-only mode. Run 'mount | grep sda2' and look the output (rw - read/write, ro - read-only). Also I suggest you to check the disk S.M.A.R.T status. You can use for for example Gparted LiveISO (right mouse click on a desktop -> utilites -> gsmartcontrol).

    – Gannet
    Jan 3 at 23:53






  • 1





    It seems your EFI partition has damaged FAT32 file system. You can try to reformat/recreate it with GParted, then install boot/esp flags on it. After this you will be able to reinstall Grub2, if needed, through chroot mode. P.S. And also 512MB for EFI-partitions is too much. Try 33MB.

    – Gannet
    Jan 4 at 14:54








  • 1





    To check S.M.A.R.T. status of you disk, you can install gsmartcontrol or even simplier just run: 'sudo smartctl -a /dev/sda | grep -i "smart overall' (without quotes). But there are several test to check disk health also.

    – Gannet
    Jan 4 at 15:03






  • 1





    If you even not able to delete the partition, then something wrong with your SSD. Did you also tried with Gparted? If it not able to delete a partition too, I would try SSD's OEM utility. Usually they have the ability to reset the drive to the factory defaults. And of cause you should backup all your important data before doing this.

    – Gannet
    Jan 5 at 22:42






  • 1





    Also, when you'll backup all your data, you can try sudo gdisk /dev/sda then push 'v' button, then 'x' and then 'z'. This should destroy GPT data structures on your drive. If it will successful, you will be able to recreate GPT partition table and all partitions from zero and then reinstall the system.

    – Gannet
    Jan 5 at 22:46








1




1





It is possibly your system partition is mounted in read-only mode. Run 'mount | grep sda2' and look the output (rw - read/write, ro - read-only). Also I suggest you to check the disk S.M.A.R.T status. You can use for for example Gparted LiveISO (right mouse click on a desktop -> utilites -> gsmartcontrol).

– Gannet
Jan 3 at 23:53





It is possibly your system partition is mounted in read-only mode. Run 'mount | grep sda2' and look the output (rw - read/write, ro - read-only). Also I suggest you to check the disk S.M.A.R.T status. You can use for for example Gparted LiveISO (right mouse click on a desktop -> utilites -> gsmartcontrol).

– Gannet
Jan 3 at 23:53




1




1





It seems your EFI partition has damaged FAT32 file system. You can try to reformat/recreate it with GParted, then install boot/esp flags on it. After this you will be able to reinstall Grub2, if needed, through chroot mode. P.S. And also 512MB for EFI-partitions is too much. Try 33MB.

– Gannet
Jan 4 at 14:54







It seems your EFI partition has damaged FAT32 file system. You can try to reformat/recreate it with GParted, then install boot/esp flags on it. After this you will be able to reinstall Grub2, if needed, through chroot mode. P.S. And also 512MB for EFI-partitions is too much. Try 33MB.

– Gannet
Jan 4 at 14:54






1




1





To check S.M.A.R.T. status of you disk, you can install gsmartcontrol or even simplier just run: 'sudo smartctl -a /dev/sda | grep -i "smart overall' (without quotes). But there are several test to check disk health also.

– Gannet
Jan 4 at 15:03





To check S.M.A.R.T. status of you disk, you can install gsmartcontrol or even simplier just run: 'sudo smartctl -a /dev/sda | grep -i "smart overall' (without quotes). But there are several test to check disk health also.

– Gannet
Jan 4 at 15:03




1




1





If you even not able to delete the partition, then something wrong with your SSD. Did you also tried with Gparted? If it not able to delete a partition too, I would try SSD's OEM utility. Usually they have the ability to reset the drive to the factory defaults. And of cause you should backup all your important data before doing this.

– Gannet
Jan 5 at 22:42





If you even not able to delete the partition, then something wrong with your SSD. Did you also tried with Gparted? If it not able to delete a partition too, I would try SSD's OEM utility. Usually they have the ability to reset the drive to the factory defaults. And of cause you should backup all your important data before doing this.

– Gannet
Jan 5 at 22:42




1




1





Also, when you'll backup all your data, you can try sudo gdisk /dev/sda then push 'v' button, then 'x' and then 'z'. This should destroy GPT data structures on your drive. If it will successful, you will be able to recreate GPT partition table and all partitions from zero and then reinstall the system.

– Gannet
Jan 5 at 22:46





Also, when you'll backup all your data, you can try sudo gdisk /dev/sda then push 'v' button, then 'x' and then 'z'. This should destroy GPT data structures on your drive. If it will successful, you will be able to recreate GPT partition table and all partitions from zero and then reinstall the system.

– Gannet
Jan 5 at 22:46










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106587%2fcannot-modify-hard-drive-stuck-in-read-only-mode-can-no-longer-boot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106587%2fcannot-modify-hard-drive-stuck-in-read-only-mode-can-no-longer-boot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕