LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2011, 12:32 PM   #1
willedruby
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Rep: Reputation: Disabled
Angry ubuntu overwrote windows drive and files installation


I've installed ubuntu 11.04 on my 64-bit vista and made it so that i made a 10GB partition for ubuntu. i wanted to install ubuntu 10.10 on my 32-bit vista using a live cd. so i followed all the steps and all, then on the last steps there was an option to simply make a partition for ubuntu, erase the disk, and use an advanced partition manager to create partitions. im sure i checked off the one that i can make a partition for ubuntu cause i chose how much space i wanted to give to ubuntu (about 48GB) while windows has about 100GB. the capacity of the drive is 250GB. so i installed ubuntu, and restarted. but when i restarted my computer, it took me straight to ubuntu. then i checked how much space i have and it said i have about "230GB" of space. and in the boot menu, there's no sign of windows. does this mean ubuntu overwrote the drive? i dont know what to do, windows does not show up in the "host" directory in my file system. is there something i cando to recover windows and my files?
 
Old 07-22-2011, 01:00 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 208Reputation: 208Reputation: 208
It sounds like an entry for your win 7 install wasn't automatically added to the grub boot menu. Try this:

1. In Ubuntu start a terminal, go to: Applications--> Accessories--> Terminal.

2. Type
Code:
sudo update-grub
input your password then press enter.

Once done close the terminal, reboot your machine and look for an entry in the menu for win 7

Last edited by {BBI}Nexus{BBI}; 07-22-2011 at 01:01 PM.
 
Old 07-22-2011, 03:02 PM   #3
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by willedruby View Post
the capacity of the drive is 250GB. so i installed ubuntu, and restarted. but when i restarted my computer, it took me straight to ubuntu. then i checked how much space i have and it said i have about "230GB" of space.
Not a good sign.

You may have to look into testdisk.

http://www.cgsecurity.org/wiki/TestDisk
 
Old 07-22-2011, 03:30 PM   #4
gremlin-touch
LQ Newbie
 
Registered: Jun 2011
Distribution: Slackware
Posts: 12

Rep: Reputation: Disabled
If the grub update doesn't work, I think the easiest test would be to add your windows partition to fstab/mtab and then mount it to see of your files are still there.

Last edited by gremlin-touch; 07-22-2011 at 03:33 PM.
 
Old 07-22-2011, 10:17 PM   #5
willedruby
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks for the help! Really appreciated. I tried to update grub, but that didnt turn out good. Turns out that my windows partition wasn't bootable, which i fixed in test disk. After making it bootable, i rebooted my computer, but then it gave me an error in something that looks like terminal
"unknown filesystem
<grub rescue>"
i cant run ubuntu, cause something happened to grub. i had bruned an ubuntu 11.04 live cd earlier so i tried that out. the good news it that my windows partition is showing. the bad news is i cant mount it. and even worse news is that my ubuntu partition is no where in sight. im thinking i should mount my ubuntu drive then update grub, or try adding my windows partition to fstab/mtab, but i cant find it.
 
Old 07-22-2011, 10:27 PM   #6
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
The first thing that you should do is to re-install grub2 from your LiveCD:

https://help.ubuntu.com/community/Grub2#Methods of Reinstalling
 
Old 07-22-2011, 11:32 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248
How do you get the unknown filesystem error? On Grub boot? Selecting windows? Selecting Ubuntu? Your Grub menu would seem to be pointing to an incorrect partition. If reinstalling Grub as suggested above doesn't solve the problem, boot the CD open a terminal to get partition information to post: sudo fdisk -l(lower case Letter L in the comman).
 
Old 07-23-2011, 02:04 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,834

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Even better, run this from a terminal and post the output (it'll try to guess the filesystem in each partition)
Code:
sudo parted -l
 
Old 07-24-2011, 02:18 PM   #9
willedruby
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
i took your advice of reinstalling grub from my live cd. i launched boot repair, but it gave me an error message saying boot repair couldn't find any linux distributions to repair. From there, i tried the "sudo fdisk -l" command and it gave me partition information showing my windows partitions. Again, my ubuntu partition is no where in sight. Then i tried the "sudo parted -l" command and it gave me similar but more results. i've posted the screenshots of the commands and the Boot-Repair error message for you to check out..
Attached Thumbnails
Click image for larger version

Name:	ubuntu partition missing.png
Views:	10
Size:	27.7 KB
ID:	7654   Click image for larger version

Name:	sudo fdisk -l.png
Views:	13
Size:	72.2 KB
ID:	7655   Click image for larger version

Name:	sudo parted -l.png
Views:	8
Size:	71.3 KB
ID:	7656  
 
Old 07-24-2011, 02:22 PM   #10
willedruby
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
heres the unknown filesystem error i see on grub boot.
Attached Thumbnails
Click image for larger version

Name:	Boot.jpg
Views:	6
Size:	243.9 KB
ID:	7657  
 
Old 07-24-2011, 03:35 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248
Did you do a wubi install? Ubuntu as a program within windows? Your initial post would indicate otherwise. Your fdisk output shows no Linux partitions. I'll repeat my question from my last post. When do you get the unknown filesystem error, on boot, selecting ??
 
Old 07-24-2011, 03:59 PM   #12
willedruby
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
I did not do a wubi install. I installed ubuntu separate from windows with a live cd. I get the unknown filesystem error when i startup my computer. It doesn't give me the choice of selecting any operating system.
 
Old 07-24-2011, 07:08 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,834

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Are we to presume that you allowed testdisk to repair those partitions ?.
We need more info on your current environment - boot the liveCD go here and do as it says.
 
Old 07-24-2011, 08:50 PM   #14
willedruby
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
heres what i got from the boot_info_script.sh

Code:
                 Boot Info Script 0.60    from 17 May 2011


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/boot/grub on this drive.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /boot/bcd

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *             63   464,230,304   464,230,242   7 NTFS / exFAT / HPFS
/dev/sda2         464,230,305   488,392,063    24,161,759   7 NTFS / exFAT / HPFS


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/sda1        F6A6B264A6B224D1                       ntfs       HP
/dev/sda2        949CA48C9CA46A86                       ntfs       FACTORY_IMAGE

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/loop0       /rofs                    squashfs   (ro,noatime)
/dev/sr0         /cdrom                   iso9660    (ro,noatime)


========= Devices which don't seem to have a corresponding hard drive: =========

sdb sdc sdd sde 

=============================== StdErr Messages: ===============================

unlzma: Decoder error
ls: reading directory sda1/: Input/output error
 
Old 07-24-2011, 10:27 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,834

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Doesn't look good.
I don't understand why/how Ubuntu ever booted successfully with that partition structure. Something was (subsequently) done we aren't being told - I can't imagine a simple update-grub doing that damage; I've never seen a system that messed up.
I ran and checked that version of the script, and it worked fine on my multi-boot - you should have gotten a lot more info.

As for getting you files back, maybe photorec (same people as testdisk) - maybe.
For the system, I'd reckon you're up for total restore/re-install.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Overwrote first bytes of windows partition kinetic Linux - Software 5 12-17-2010 12:45 AM
Accessing Windows files in the same drive where Ubuntu 8.04 is installed dnaga57 Linux - Newbie 5 06-21-2009 05:15 AM
How do I access Windows 2000 files from Ubuntu on the same hard drive? jerstep123 Ubuntu 1 06-25-2008 10:25 AM
Ubuntu Error 21 on WinXP with Windows on RAID0 Drive and Ubuntu on eSATA drive videocheez Linux - Newbie 12 06-13-2007 12:23 PM
windows overwrote my mbr c-- Linux - Newbie 5 03-30-2005 02:23 PM


All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration