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)
Edgar H
  • 182
  • 12
  • 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 03 '19 at 23:53
  • it does not appear in mount, its not mounted. I cannot find the S.M.A.R.T status but I've added a screen shot from GNOME Disk output check to the question – Edgar H Jan 04 '19 at 08:30
  • 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 04 '19 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 04 '19 at 15:03
  • @Gannet The problem is I cannot modify the hard drive in any way. The output of parted in the question shows that whenever I try to delete the partitions and make a new one, it fails, leaving the hard drive unchanged. Its the same things with gparted. – Edgar H Jan 05 '19 at 16:04
  • 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 05 '19 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 05 '19 at 22:46
  • I've tried gdisk and gparted (and Gnome Disk) and I cannot delete the partition tables or format the drive with them. I would think its a hardware issue but this is the 2nd time I've had this problem in as many month. Last time I simply got a new SSD. I will look for a utility by the manufacturer, that's a good tip! – Edgar H Jan 07 '19 at 08:41
  • 1
    You should try to reset the drive to the factory defaults or/and update firmware if there is a new one. – Gannet Jan 07 '19 at 22:10
  • There doesn't seem to be such a functionality for Western digital SSD drives. Thanks for all your help. – Edgar H Jan 08 '19 at 17:46
  • 1
    What is the model? – Gannet Jan 09 '19 at 01:54
  • Its a Western Digital WDS250G2B0A-00SM50 – Edgar H Jan 09 '19 at 09:36
  • 1
    You need to try to perform 'PSID Revert' command in Western Digital SSD Dashboard Utility: https://support.wdc.com/downloads.aspx?p=279. Manual: https://www.wd.com/content/dam/wdc/website/downloadable_assets/eng/user_manual/4779-705161.pdf – Gannet Jan 09 '19 at 20:44
  • 1
    Sorry, correct manual for PSID Revert is here: https://i.dell.com/sites/doccontent/app-merchandizing/responsive/Shop/SnP/Home/en/Documents/SSD.pdf – Gannet Jan 09 '19 at 20:50
  • Okay, I will get a windows machine and try it out – Edgar H Jan 10 '19 at 09:47
  • @Gannet I managed to re-format with the WesternDigital program but the hard-drive still cannot be written to, so it must be a hard-drive fault after all. Thank you for all your help, if you want to submit the hint about the SSD manufacturers software as an answer, I will accept it. – Edgar H Jan 14 '19 at 09:04
  • 1
    You're welcome. It's ok. But it seems you're have no luck with SSDs. – Gannet Jan 14 '19 at 20:32
  • https://askubuntu.com/questions/1041680/how-can-i-make-my-external-hard-drive-writable-in-ubuntu-18-04 – Abhishek Nayak Feb 09 '19 at 15:15

0 Answers0