1

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

1 Answers1

1

Log into the system using a LiveUSB. From the live USB you can perform both the task of you question.

Task #1 - "is there a way for me to save some of my data?

" You can mount your Ubuntu partition (which by the output in your text is: /dev/sdb1) and backup your /home folder.

Task #2 - Repairing the booting problem.

From the LiveUSB Check your /etc/fstab file and verify the integrity of the entries, namely the root (/). Then boot normally after it's repaired.

Also run Boot Repair as a GUI boot repair option.

Outside of the GUI boot repair you can manually reinstall grub using the steps in this answer: https://askubuntu.com/a/877815/29012

The final issue was to eventually resolve the busybox screen which was resolved by fsck of the installed partition.

Restoring your Ubuntu desktop default

To restore your Ubuntu back to it's defaults, run these commands:

$ sudo apt install unity --reinstall
$ sudo apt install ubuntu-desktop --reinstall
$ sudo apt install lightdm --reinstall
$ sudo systemctl enable lightdm
$ sudo systemctl start lightdm
L. D. James
  • 25,444