 |
18-11-2008, 12:31 AM
|
#1 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
I've lost Ubuntu after formatting my c:
Hi,
Earlier I had ubuntu 8.4 & xp sp2 installed with grub, all working properly.
Now, i formatted my c:. C: contained my xp. And now i have new xp.
But, now i m not getting the option to select between xp & ubuntu. What happened to my ubuntu? I think i need to reinstall grub but how?
Help me guys.
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
18-11-2008, 12:45 AM
|
#2 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: I've lost Ubuntu after formatting my c:
Too lazy to type the whole thing so "fudging" it from ubuntuforums.org
Quote:
|
Originally Posted by pietro_spina from ubuntuforums.org
1. Boot from a Live CD, like Ubuntu Live CD or similar.
2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary. (in kanotix you need to set the passwd for root yourself. Use:
$ passwd root
3. Type "grub" which makes a GRUB prompt appear.
4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out for the following lines.
5. Type "root (hd0,3)".
6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".
7. Type "quit".
8. Restart the system. Remove the bootable CD.
|
Source: http://ubuntuforums.org/showthread.php?t=42030
If the Step 3 doesn't work, then instead of typing "su" and then "grub" type "sudo grub". Then continue with Step 4.
Also if GRUB was your main boot loader then use (hd0) in Step 6, otherwise (hd0,x), where 'x' is your Linux Boot Partition (in case you are using some other boot loader, like Vista's Boot Loader for e.g.).
Hope this helps.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
18-11-2008, 03:45 PM
|
#3 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
ok, will try & hope i doesn't do anything wrong. And thanx.
|
|
|
18-11-2008, 04:23 PM
|
#4 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
Re: I've lost Ubuntu after formatting my c:
^Dont worry go ahead and restore GRUB to the MBR. Just note down the output of find /boot/grub/stage1 and remember GRUB counts the partitions from 0 and not 1  SO the 1st partition will be (hd0,0) and not (hd0,1).
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||
topdocumentaryfilms.com
|
|
|
18-11-2008, 07:19 PM
|
#5 (permalink)
|
|
High without substance...
Join Date: Sep 2005
Location: dark side of the moon
Posts: 402
|
Re: I've lost Ubuntu after formatting my c:
i have never tried this before but what happens if he installs XP again? will grub be there or windows MBR?
__________________
I am Acrophobic, Entomophobic, Melissophobic. :).
:(
|
|
|
18-11-2008, 07:42 PM
|
#6 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
Re: I've lost Ubuntu after formatting my c:
If you reinsatll XP again it will overwrite Grub and the mbr. So all it takes is just restore grub following the above steps. Its quite simple and easy. Grub is a very flexible and easy bootloader.
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||
topdocumentaryfilms.com
|
|
|
18-11-2008, 10:05 PM
|
#7 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
ok guys, here r the problems:
1)I booted from the ubuntu cd & opened a terminal, "su" command is not working. After entering su it asks for password, it's not accepting any password, what password shud i give him?
2)Then i tried entering "sudo grub", and voila it worked.
3)Now, i m at the grub prompt. But, when i type "find /boot /grub /stage1", it says "Error 15: File not found"
Am i entering the correct command??
find(space)/boot(space)/grub(space)/stage1 . Am i entering space at correct point. I think i m correct because it says:Error 15: file not found.
So, what shud i do?
|
|
|
18-11-2008, 10:44 PM
|
#8 (permalink)
|
|
TheSaint
Join Date: Jun 2004
Location: Antigua
Posts: 3,447
|
Re: I've lost Ubuntu after formatting my c:
Type sudo su instead of su
Then same as above
__________________
http://www.neville.in
http://www.linuxrocks.in
"The Future Is Open"
|
|
|
18-11-2008, 11:00 PM
|
#9 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
^^but what abt error15 : file not found??
|
|
|
18-11-2008, 11:15 PM
|
#10 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: I've lost Ubuntu after formatting my c:
Quote:
Originally Posted by saqib_khan
ok guys, here r the problems:
1)I booted from the ubuntu cd & opened a terminal, "su" command is not working. After entering su it asks for password, it's not accepting any password, what password shud i give him?
2)Then i tried entering "sudo grub", and voila it worked.
3)Now, i m at the grub prompt. But, when i type "find /boot /grub /stage1", it says "Error 15: File not found"
Am i entering the correct command??
find(space)/boot(space)/grub(space)/stage1 . Am i entering space at correct point. I think i m correct because it says:Error 15: file not found.
So, what shud i do?
|
There are no spaces after boot and grub. its: find<space>/boot/grub/stage1.
I'm sorry if my first post caused the confusion.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
18-11-2008, 11:42 PM
|
#11 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
^^thanx infra, i got it.
After typing this: find /boot/grub/stage1, i got output as (hd0,6)
Then i typed "root (hd0,6)"
Then, i typed "setup (hd0,6)"
Then what to do? After writing this something written came up, i thought i got my grub, but after restarting there's no grub.
So , make me understand ur point no 6, infra or anyone.
|
|
|
18-11-2008, 11:50 PM
|
#12 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Re: I've lost Ubuntu after formatting my c:
^^Its setup (hd0) only
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
|
|
|
19-11-2008, 12:16 AM
|
#13 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
^Thanx darkstar, got my grub back.
And the problem solved.
I have another query for u all. How can i upgrade from 8.4 to 8.10 by cd?
I mean if i order a cd of ubuntu 8.10 then what to do to upgrade my 8.4 to 8.10?? I know i can update it with internet. But i don't want to waste my 600-700 mb in this task.
Currently i m posting from mu ubuntu 8.4 only. And thank u all for ur kind help.
|
|
|
19-11-2008, 02:34 AM
|
#14 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: I've lost Ubuntu after formatting my c:
^^^ You cannot upgrade from 8.04 to 8.10 through the LiveCD.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
19-11-2008, 07:48 AM
|
#15 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Re: I've lost Ubuntu after formatting my c:
Yeap ! Ubuntu didn't provide option to update your OS to newer version ! while non Ubuntu OS does !
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
|
|
|
19-11-2008, 11:21 AM
|
#16 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
Then if i wanted to install 8.10, then shud i install it over my current 8.4?Will it work?
|
|
|
19-11-2008, 01:09 PM
|
#17 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: I've lost Ubuntu after formatting my c:
No, installing it would erase all older data. So 8.04 will be completely erased (applications, settings and all), even your /home directory if it resides on the same partition.
__________________
Harsh J
www.harshj.com
|
|
|
19-11-2008, 02:06 PM
|
#18 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
Re: I've lost Ubuntu after formatting my c:
Just backup all your folder and files from your /home folder to a different partition and install 8.10 then, copy back all that folder and files including the hidden ones (folder with a dot ".", press Ctrl+H to show hidden folders and files). This will restore all your personal settings of your apps,themes,etc. You just have to install the required softwares from Synaptic and dont have to redo the settings.
EDIT: Isnt there an alternative-cd to upgrade Ubuntu as it used to be?
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||
topdocumentaryfilms.com
Last edited by Rahim; 19-11-2008 at 02:07 PM.
Reason: Automerged Doublepost
|
|
|
19-11-2008, 03:38 PM
|
#19 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
^^i've installed kde 4 on my ubuntu, will i get it back also, if i take a backup of my home folder??
I don't want to install it again from the net, as i have mb based a/c.
|
|
|
19-11-2008, 06:22 PM
|
#20 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
Re: I've lost Ubuntu after formatting my c:
^If you have installed KDE4 through the net, then all the debs are downloaded and stored in /var/cache/apt/archives folder. Backup the contents of /var/cache/apt/archives folder. You need to open Nautilus with root priveleg ,press Alt=F2 and enter gksu nautilus if in GNOME or kdesu nautilus if in KDE. Give your password and then navigate to that folder and copy all the debs to another partition.
When reinstalling, just copy back these debs to the folder and install KDE 4 and it will check for the required debs files and install KDE 4 without you having to re-download all over again. All hail the mighty and clever apt
I hope you understood me Saqib.
PS: Your /home folder contains only personal settings of different apps.
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||
topdocumentaryfilms.com
|
|
|
19-11-2008, 06:59 PM
|
#21 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
OK, will try when i get my 8.10 cd, thanx.
|
|
|
19-11-2008, 11:28 PM
|
#22 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: I've lost Ubuntu after formatting my c:
And now when you install Ubuntu 8.10 again, make another partition for /home so that any future upgrades will only erase the OS and not your personal data.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
19-11-2008, 11:32 PM
|
#23 (permalink)
|
|
I M A *STAR*
Join Date: Nov 2007
Location: Planet Earth
Posts: 855
|
Re: I've lost Ubuntu after formatting my c:
ok
|
|
|
20-11-2008, 08:25 AM
|
#24 (permalink)
|
|
TheSaint
Join Date: Jun 2004
Location: Antigua
Posts: 3,447
|
Re: I've lost Ubuntu after formatting my c:
Quote:
Originally Posted by infra_red_dude
And now when you install Ubuntu 8.10 again, make another partition for /home so that any future upgrades will only erase the OS and not your personal data.
|
Does the Ubuntu installer give the option of directly mounting the existing /home without formatting?
__________________
http://www.neville.in
http://www.linuxrocks.in
"The Future Is Open"
|
|
|
20-11-2008, 09:13 AM
|
#25 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: I've lost Ubuntu after formatting my c:
^^^ Yes, it does during install.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
20-11-2008, 01:46 PM
|
#26 (permalink)
|
|
TheSaint
Join Date: Jun 2004
Location: Antigua
Posts: 3,447
|
Re: I've lost Ubuntu after formatting my c:
Ok, is this option new in 8.10? Don't remember having it in 8.04
__________________
http://www.neville.in
http://www.linuxrocks.in
"The Future Is Open"
|
|
|
20-11-2008, 08:22 PM
|
#27 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: I've lost Ubuntu after formatting my c:
No, you could do that in almost any Linux distro. You can just tag in any of the partitions as /home during install. You don't need to format it. Also if you create the same username in the new install the "old" /home/<username> automatically becomes your "new" home with all settings preserved
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
20-11-2008, 09:07 PM
|
#28 (permalink)
|
|
TheSaint
Join Date: Jun 2004
Location: Antigua
Posts: 3,447
|
Re: I've lost Ubuntu after formatting my c:
Ok I used to do that in SUSE, somehow never managed to get the option, in Ubuntu, of mounting without formatting at install. Will try sometime again.
__________________
http://www.neville.in
http://www.linuxrocks.in
"The Future Is Open"
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|