10

I was trying to update Java and I used a star to make sure it was removed completely not realizing it would mess up everything

I used

apt-get remove java*

this was on the Ubuntu 16.0 or something server. I now have sysrcd or System Rescue CD on the server and I'm attempting to get my old files back to put them on a new server and reload the sysrcd server back to Ubuntu. However I can't seem to figure out how to use the mount system.

I've tried running

fdisk -l

and I get

Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 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: dos
Disk identifier: 0x04a5ca62

Device    Boot     Start       End    Blocks  Id System
/dev/sda1 *         2048      4095      1024  83 Linux
/dev/sda2           6142 468860927 234427393   5 Extended
/dev/sda5           6144   2004991    999424  83 Linux
/dev/sda6        2007040 468860927 233426944  8e Linux LVM


Disk /dev/mapper/vg-root: 221.6 GiB, 237879951360 bytes, 464609280 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

Disk /dev/mapper/vg-tmp: 976 MiB, 1023410176 bytes, 1998848 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

Disk /dev/mapper/vg-swap: 88 MiB, 92274688 bytes, 180224 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

I'm not sure which drive to mount or how to mount it. Can someone help?

  • 1
    Could you elaborate on the mistake you made and what happens when the booting attempts but fails? Please add these details to your question. – Timothy Martin Jan 20 '17 at 23:59
  • I have edited the details, look at the original post. – user211613 Jan 21 '17 at 0:17
  • 2
    You may be able to repair your installation by reversing your apt-get remove command. Have a look in /var/log/apt/history.log. You should be able to reinstall each of the packages that were removed. – Timothy Martin Jan 21 '17 at 0:47
  • Uhh, remember I'm not able to access those files right? I'm trying to mount the drive to get access to those files... – user211613 Jan 21 '17 at 14:23
33

A few more steps are needed when mounting an LVM partition vs. a non-LVM partition.

sudo apt-get install lvm2   #This step may or may not be required.
sudo pvscan                 #Use this to verify your LVM partition(s) is/are detected.
sudo vgscan                 #Scans for LVM Volume Group(s)
sudo vgchange -ay           #Activates LVM Volume Group(s)
sudo lvscan                 #Scans for available Logical Volumes
sudo mount /dev/YourVolGroup00/YourLogVol00 /YourMountPoint
  • I'm on the rescue cd like I mentioned before, it's a little different from Linux. It doesn't have the 'apt-get' program installed. – user211613 Jan 23 '17 at 22:29
  • Are you able to boot using an Ubuntu Live CD instead? – Timothy Martin Jan 23 '17 at 22:30
  • I am not able to, no. – user211613 Jan 23 '17 at 22:32
  • If you have your installation CD/DVD, you can boot into Rescue mode. Is this an option? cyberciti.biz/faq/howto-boot-ubuntu-linux-rescue-mode – Timothy Martin Jan 23 '17 at 22:36
  • 2
    Your rescue CD already has LVM support, there's no need to install anything. – Stephen Kitt Jan 25 '17 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy