I had Ubuntu installed on an external HDD and was enjoying it, but my computer was a little slow. I checked my processes and found out that KDE (which I had previously installed) was running its desktop in the background while I was using Unity. I didn't want KDE anymore anyway, so I ran the command sudo apt-get remove kubuntu-desktop
and then sudo apt-get autoremove.
Everything seemed to be working fine, but when I tried to run sudo apt-get update
later, it said that it couldn't remove the lock file because the directory was read-only.
Distraught, I tried deleting the lock file manually but was again met with the read-only error. I tried remounting my drive but I was again told that the drive could only be mounted as read-only. I tried rebooting, but now I can't boot into the hard drive. I can see the (only) partition for the drive on Windows' partition manager. Is there a way to make my hard drive readable and writeable again? If not, is there a way for me to save some of my data?
Edit: Output of sudo lsblk -o name,mountpoint,label,size,fstype;sudo parted -l
Note: The hard drive I have Ubuntu installed on is a Toshiba hard drive that at the time was plugged into my USB 3.0 port.
NAME MOUNTPOINT LABEL SIZE FSTYPE
sda 465.8G
├─sda1 Recovery 400M ntfs
├─sda2 ESP 300M vfat
├─sda3 128M
├─sda4 Acer 447.6G ntfs
├─sda5 350M ntfs
└─sda6 Push Button Reset 17G ntfs
sdb 465.8G
├─sdb1 /media/ubuntu/11cf8549-8a06-429d-92f6-18 487M ext2
├─sdb2 1K
└─sdb5 465.3G LVM2_me
├─ubuntu--vg-root
│ 464.3G ext4
└─ubuntu--vg-swap_1
1G swap
sdc 3.8G
└─sdc1 /cdrom UBUNTU LIVE 3.8G vfat
loop0 /rofs 1.4G squashf
Model: ATA WDC WD5000LPVX-2 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 420MB 419MB ntfs Basic data partition hidden, diag
2 420MB 735MB 315MB fat32 EFI system partition boot, esp
3 735MB 869MB 134MB Microsoft reserved partition msftres
4 869MB 481GB 481GB ntfs Basic data partition msftdata
5 481GB 482GB 367MB ntfs hidden, diag
6 482GB 500GB 18.3GB ntfs Basic data partition hidden, diag
Model: TOSHIBA External USB 3.0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 512MB 511MB primary ext2 boot
2 513MB 500GB 500GB extended
5 513MB 500GB 500GB logical lvm
Model: SCSI SG 1.8.1.7.0 2+6 (scsi)
Disk /dev/sdc: 4035MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 4035MB 4034MB primary fat32 boot, lba
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-root: 499GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 499GB 499GB ext4
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-swap_1: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 1074MB 1074MB linux-swap(v1)
Edit 2: I can now boot into the hard drive, but it boots into the ash terminal.
Edit 3: Image of shell https://drive.google.com/file/d/0B3JT195D9TgsVXJnekxSOGR6R1U/view?usp=drivesdk
sudo lsblk -o name,mountpoint,label,size,fstype;sudo parted -l
? – L. D. James Feb 13 '17 at 02:05ext4
. It's 8 years sinceext2
has been replaced and you're missing the features of the default ext4 filesystem. Your question said you wanted to save your data, of which I'll include the backup procedure for your data in your answer if you choose this route. (continued) – L. D. James Feb 13 '17 at 14:28/home
directory your Toshiba drive. Backup your home directory and reinstall using theext4
format, then restore your personal data... or work with resolving the current boot problem. I can focus on either in my formatted answer. – L. D. James Feb 13 '17 at 14:31ls -a
anddf
. – L. D. James Feb 13 '17 at 14:44