0

I've ubuntu 16.04 installed on my hard drive of laptop consuming total space of the drive. I would be installing 16.10 alongside that and so I was trying to make space available for the same. I deleted 2 partitions of the earlier installation namely /temp & /var. I did all this by booting from gparted bootable usb. Now I am unable to boot into my previous installation of 16.04. Grub menu is appearing, ubuntu logo is coming, then a terminal appears for 'maintenance'. I checked log via terminal and found 2 entries mentioning that those 2 partitions failed to be mounted.

I think the issue is due to those 2 deleted partitions although I'd shrunk root partition from the end part or end sector of the partition keeping the beginning sector the same. It has separate /boot partition which was untouched. Also I moved swap and home. As mentioned earlier I did via the bootable gparted USB.

As the issue may be because of deleting the 2 partitions, so will the issue resolve if I access the root partition via a bootable USB and remove the mount entries for the 2 partitions in the /etc/fstab file? I would like to say for rescue I've gparted live USB, Ubuntu 16.10 iso in my cell phone. That's all! Can the gparted bootable USB be used to create bootable ubuntu 16.10 USB?

How to proceed please?

3

You would definitely need to remove the entries from /etc/fstab mounting those two partitions, but there's probably programs that expect to find things on /var, so if you haven't overwritten it yet, and know the boundaries of that partition, try recreating it and copy the contents to a subdirectory of / (on that partition) and rename that to /var when you're in maintenance mode (I have no idea whether something else will be on /var in that case, in which case it will be tricky).

And in the future: please don't go about deleting partitions without knowing for sure that they are not used.

  • Its all overwritten. I can't recreate it. I will try removing the 2 entries in fstab. Can I do that using gparted live USB that I have? I've 16.10 iso of ubuntu but no OS to create live USB , I have only gparted live USB. – Ravi Nov 10 '16 at 14:30
  • 1
    I've never tried that gparted live thing, but I would think so, but the choice of editors to use for making the change might be rather small (a similar set of circumstances is the reason I first learned to use ed). – Henrik Nov 10 '16 at 14:35
  • Yes, I successfully commented the entries for the 2 devices in fstab via gparted live USB. But still that didn't resolve the issue. – Ravi Nov 10 '16 at 17:41
1

/var contains A LOT of bits and pieces needed for Ubuntu (or any other Linux distro) to work. If it's gone, your system is hosed.

You might be able to copy /var from a LiveDVD, but you risk further problems.

The best way would be to reinstall, but choose to NOT format the disk. And make backup of /home beforehand.

Here's a similar situation: https://askubuntu.com/questions/549101/how-to-recover-after-all-files-are-deleted-from-var-folder

  • Can I prepare ubuntu live USB from its iso file using gparted live USB as I've no working OS installed to prepare live ubuntu USB? – Ravi Nov 10 '16 at 17:44
  • Should go with dd – user192526 Nov 11 '16 at 9:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.