I recently broke my installation and I've tried in vain to repair it using apt-get and all his friends. Now I'm trying the live USB and I'm not sure how to continue. And I desperately don't want to damage my existing Windows 7 installation or my Linux profile.
At first I don't know which installation option I should select
I've tried the option Something else but I'm stumped as to which partition I should select. I get the error message no root filesystem regardless of which option I select
Please advise.
Update
I selected /dev/sdb1 and then the change button in order to select the mount point as / now I can proceed but with the warning
When I proceed I get the even scarier dialog (gonna stop here before I do something I'll regret)
**Update 2 **
I've attempted to go the less scary route and try the boot repair disk. Here's my pastebin
Using gparted, shrink
/dev/sdb1
to 32GB. It's plenty of room for a typical root partition, it won't crowd your current situation and will leave ~110GB for/home
.While re-partitioning is not risk-free, in 20 years and multiple dozens of re-partitionings, I have never had a problem. Check out How to resize partitions? for pointers.
Create partition
/dev/sdb3
from the remainder of the first partition.An advantage of this method (separate partitions) is that if you wish to change distributions in the future, there is little drama. It's almost like changing a shirt. All your personal data will be on another partition. The new system can write the old root partition with glee.
Mount both partitions with either your GUI or with the command line using standard practices, such as discussed in How to access a usb flash drive from the terminal?
If you are using the GUI, you may run into permission issues unless you use a super user (root) GUI. The partitions would be mounted somewhere like
/media/{LiveCD_user}/{UUID of dev-sdb1}/home/{old_user_id}
and copy/move it to/media/LiveCD_user/{UUID of dev-sdb3/old_user_data
. The command line is less drama.Follow this procedure:
Make two mount points:
Call them what you will, the names are only for your benefit.
Mount the two new partitions in your system
Move your old home directory to the new partition
Unmount the partitions after the data is moved to not be reminded during installation.
Launch the installer and install the new system with the *Something else option.
Select
/dev/sb1
as root/
and☑
tick the format partition.Select
/dev/sdb3
as/home
and do not format this partition (it has all your data).You've installed a dual boot before, but be careful with GRUB. Double check that regard.
Install. (Using the same
user_id
circumvents any unforeseen ownership issues).When the dust has settled, boot into the new system, and drag the data you want from
/home/old_user_data
to the new location.Delete the leftovers when you're done.
Make another usb stick with gparted live on it. Boot from ot and start the tool. Then choose to shrink sdb1 for about 30Gib. You won't lose data this way.
Then boot back into your live media and install the root partition as mentioned in the first answer.
Gparted has the ability to shrink partitions without destroying data, because it shoves it to the beginning of the partition.
Another method would be to just boot your live system and make a .tar.gz archive from your /home partition. Then make fresh ubuntu install and unpack your /home to /home.
One way to recover yourself from that mess is by reinstalling Ubuntu, after having everything backed up along with the list of installed applications.
Here's a step-by-step way to do that:
Download Ubuntu. If you already have the
*.iso
then you may skip this step.Next, burn the iso to your pendrive or a CD/DVD.
To burn it to your pendrive you can use the following softwares:
Rufus - If you are burning it in Windows environment.
Unetbootin - If you are burning it in Linux environment.
To burn it to your CD/DVD you can use the following softwares:
K3B - If you are burning it in Linux environment.
Imgburn - If you are burning it in Windows environment.
Now, boot into the live environment of Ubuntu. An how-to to this step is too long and varies from system to system, so, I am skipping it for obvious reasons.
The first thing to do now, is to mount the partition, that contains your previous Ubuntu installation:
To do that type:
Change XY to your specification.
Also, mount the drive where you will make the backup to.
Next, copy all your data from
/mnt/path/to/your/important_folders
to/path/to/your/mounted_backup_drive
sudo
. Later, you may change the permission of those folders.Next, make a backup copy of your current installed softwares:
Here, is a way on how to do that:
Edit the relevant parts.
Next, make a backup of your current list of ppas. Here's how to do that.
Now, you can format your Ubuntu partition without any issue. After re-installation, restore your ppas and then, update and install all your previously installed packages from the aforementioned generated list.
It appears that your Ubuntu system was on sdb1. For a something else install, click on sdb1 and click the Change button. In the drop down box beside Use as: select ext4 and tick the box to format the partition. In the drop down box beside Mount Point, select /. Then click OK and Install Now.
****** WARNING * This will blow away anything that remains on sdb1.* So you will lose any data from your Ubuntu install that you did not back up.
If you want to rescue the status of your system and not delete a thing you should try using the boot repair disk: Boot repair disk
It has helped me in so many situations like these, maybe it can restore your stuff. Try it out first before you attempt to delete something you maybe don't have to...
boot repair only repairs your mbr not OS
so if there is data in your root partiton is will be completed erased so copy the data from root patition to other external devices or to the dev/sda1 partition mounting the ntfs partitions
let's make it very simple
1) Select something else
2) Right click on /dev/sba2 and delete partition
3) Right click on /dev/sba1 and delete partition
4) Now you get a free space of around 32gb
5) now select free space and click on + icon for root partition(*make sure u select the free space)
i) create partition window appers then
size as 15360
use as ext4
mount point / (root)
click ok
ii) again click on free space and make swap partition
size as 4096(size of your ram is enough)
use as swap area
click ok
iii) again click on free space and make home partition
size as whatever remaining
use as ext4
mount point /home
click ok
now u get a prompt that /(root) and swap area partitions will be formatted click yes and just relax until installation is complete.
If you have given up on fixing, and just want to get your data back and reinstall Ubuntu, then you have 2 options
/dev/sdb1
by around 30-40GBs, installing Ubuntu onto that (That scary dialog will appear, but read the title. It's just asking for permission to write onto the partition. It's not doing anything you dont want it to, provided you did not accidentally tick any formatting checkboxes, so always double check.) , and then backing up data/mounting that partition. This is the more straightforward and easier method, and it doesnt take much time to do.If you dont like doing scary things to your HDD, how about doing it to a USB drive? You can make a Ubuntu-on-a-stick type of thing. Here are the instructions on how to do it. (You'll need 2 USB drives for this. One for LiveUSB and one for install. Install Drive should be atleast 8GB.)
Plug in the second USB drive, the drive which I called the 'install drive' earlier.
Back to the installer, select all of the settings such as system locale, location, Time Standard and all that stuff.
/dev/sdc/
and the 'install drive' (the 2nd USB Drive) should be/dev/sdd/
but don't take my word for it, ALWAYS DOUBLE CHECK. One single mistake can wreck the whole install./dev/sdd/
from here on out, go back to the installer and make the/dev/sdd
partition the/
(root) partition, and select/dev/sdd/
to be the bootloader from the drop down menu at the bottom.sudo nano /etc/fstab
and execute it. It should give you a editable text editor inside the terminal. It should have some scary numbers, but fear not. As long as you do what I tell you to do, you should have a working system by the end of this tutorial.<The drive location that you wrote onto paper a while ago> <The place you want it to open from, preferably somewhere in /mnt/> <ext4 or ntfs, the former for a linux partition, the latter for a windows one.> noatime,defaults 0 0
It should look something like this/dev/sdc1/ /mnt/Win7Stuff/ ntfs noatime,defaults 0 0
for a windows partition. After doing this for both the old Ubuntu Partition and the windows one, press CTRL+X and then press Y and then press enter twice.sudo mkdir <whatever the /mnt/ directories you mounted them at, such as /mnt/Win7Stuff/
. Do it for both the /mnt/ folders.sudo mount -a
into the terminal and press enter. And Voila! Your PC back~. You can backup everything you need.noatime
to the/
mount point as well, in/etc/fstab/
since it would increase the USB life.Please do comment if you have any questions, and Im going to bed because its 6AM. Good night. Also, Please do tell me, why the heck did you give SWAP 30GIGS OF SPACE?!
Problem fixed, based on advise received from user @hbdgaf in chat, by simply reinstalling and creating another account while doing so. After this I restored my old account. Still had to reinstall most applications though.
PS: also had to fix inodes while reinstalling. So I guess that's what thwarted by earlier attempts to repair the installation.