My dual boot Ubuntu system has its Ubuntu OS corrupted. Efforts to fix it via changing source.list
and other means proved in vain. Now I want to re-install Ubuntu on that partition with a USB stick. Will my files on that partition and other partitions be left intact? I just wanna fix the OS. Wanna confirm this as I am using the computer for many things and cant afford to have it screwed up. Thanks.
It depends on how you've set up Ubuntu and what choices you make during the re-installation.
Of course, before going any further, back up!
First, about your current installation... Ubuntu is installed in the root partition (/). That partition will be erased. If your /home partition is separated, then you are fine. If it is just another directory in /, then yes, that too will be erased. If you don't know, then run
df -h
.This shows that my /home is separate from /. If /home doesn't appear, then it is part of /, and it will get erased. This is true for any other partition... If /etc, /var, etc. do not show up here, then it'll be erased along with /. You said you can't boot up so you probably cannot run the
df -h
command, but you can use a boot disk and rungparted
to take a look at how everything is organized.Anything of value in / that you want, you should use a boot disk and an external drive and copy it out manually.
During installation, you will be presented with the image here, under "Installation Type". You should pick "Something else". You will then be presented with images similar to those shown here. (I can't remember if it uses
gparted
-- I think it does.) You'll be able to choose which partition is mounted as /, /home, and so far. The key here is to select your home partition to be mounted as /home but do not have it erased. / will be erased...there's nothing you can do about that.In summary, you need to be weary of two things:
Hope this helps! I just had to go through this a month ago... Re-installation of Ubuntu took less than 15 minutes. Moving files out of the root partition to a place that won't be erased took well over a day. But, obviously, such preparation is worth it and I wouldn't rush it...
Good luck!