LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-26-2011, 04:32 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Rep: Reputation: 48
grub problem


I had windows 7 preinstalled.
Then I created 10GB space for ubuntu-9.04.
Somebody tried to restore windows 7 completely on my laptop.
As a result
Now following error occurs
Quote:
cannot load grub stage 1.5
When I try to boot with ubuntu 10.04 live cd . Screen goes blank after I select 'try without installing'
So I tried 'mandriva 2009 live cd' Then it said 'vesa could not find suitable driver' & then 'xserver is disabled'
I press ctrl+alt+f1 to get virtual terminal & login as root
fdisk -l shows
three partitions of 15GB (recovery),100MB (boot manager) ,284GB (windows 7 partition) respectively. The same configuration I had before installing ubuntu.
All are NTFS .


Code:
#mount /dev/sda1 /1
#mount
 /dev/sda1 on /1 type ntfs (rw)
#grub-install --root-directory=/1 /dev/sda
mkdir:cannot create directory '/1/boot/grub' : read-only file system
hoping that this will copy grub files to mount-point & install grub in MBR.

I am using
Code:
sony vaio
core 2 duo
1.8GHz , 3 GB DDR3 RAM

Last edited by sumeet inani; 03-26-2011 at 04:33 AM.
 
Old 03-26-2011, 04:35 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Not sure as to why LiveCD wouldn't work but it looks to me that if those partitions are all you have, that the one who reinstalled Windoze 7 threw your Ubuntu installation into cyberspace. You'll have to reinstall Ubuntu after freeing up some space I'm afraid.

Kind regards,

Eric
 
1 members found this post helpful.
Old 03-26-2011, 06:13 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
That's the problem. Windows 7 won't boot while 'mandriva live cd' gives you no GUI.So I wish to resize one of the partitions to get a primary partition in which I can install GRUB (not GRUB2) & add entry to menu.lst like
Code:
title windows-7
rootnoverify (hd0,1) # second partition of lone hard disk
makeactive
chainloader +1
 
Old 03-26-2011, 06:18 AM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
What more , the laptop won't boot from USB . In BIOS device priority includes
Quote:
optical disk drive
internal hard disk
network
external
If I exclude 'hard disk' in the order then I get 'operating system not found'. Though my desktop (core 2 duo,2GB RAM,#GHz processor) readily boots from same USB.
Still , let us say I can get iso of any distro & burn it to CD.
 
Old 03-26-2011, 06:20 AM   #5
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
Is there a way to resize ntfs partition using fdisk from terminal?
 
Old 03-26-2011, 06:21 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

A question: the media you are booting from, are they official burned (Windows 7) and Mandriva media? Or are they ISO files you burned yourself? If so did you check the md5sum of the image and the DVD after burning it? If you burned it yourself, at what speed (and with what tool) did you burn? Some readers have trouble with some media, hence my question.

Kind regards,

Eric
 
Old 03-26-2011, 06:27 AM   #7
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
I found somewhere : Use ntfsresize followed by fdisk. Keep starting cylinder same but partition size should be greater than shrunk file system. Gparted does that automatically. I don't know what is the formula involved
 
Old 03-26-2011, 06:31 AM   #8
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
If I had official windows 7 repair cd then I could fix MBR . In this case I have burnt ubuntu 10.04 & 'mandriva 2009' on cd . The iso checksum was verified. Both of them work fine on an ordinary desktop. Seems this sony vaio laptop needs special driver for graphic card ?

I also think that fdisk just alters partition table (in first 512 bytes) .You have to create partition of corresponding type using other tools ?

Last edited by sumeet inani; 03-26-2011 at 06:36 AM.
 
Old 03-26-2011, 07:14 AM   #9
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

You could download GParted LiveCD which will be a lot easier for you. But...

If you only want to fix the MBR for Windows then download something like Hiren's BootCD (which has FixMBR) or SuperGrub and try with that. I don't understand though why you want to use a Linux tool to boot your Windows, since apparently Windows is the only OS and all partitions are Windows NTFS. If you want to re-install Ubuntu and don't have any partition or space available you'll need something like pointed to earlier to fix the MBR in case Windows doesn't boot. Once it boots, you'll need to resize from within Windows the partition you want to shrink, before trying to install anything else. Don't resize your Windows 7 partition with tools like GParted because it will render your Microsoft product useless.

Kind regards,

Eric
 
Old 03-26-2011, 10:02 AM   #10
Harju
LQ Newbie
 
Registered: Sep 2008
Location: Gothenburg, Sweden
Posts: 25

Rep: Reputation: 1
I used to have a bootloader on a USB-stick and that normally worked better then botting directly from CD. There's also a bootloader called iBoot that I used to inject videodrivers prior to boot so I could run OSX install DVD on my PC. Maybe something like that can help you? But try installing GRUB to a USB-stick and boot form it.

And yeah, I guess you can use a windows 7 rescue/install CD, too bad you don't have access to one

Good luck anyways!
 
  


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
Problem with GRUB: partition not found. Grub Rescue?? genoboss Ubuntu 117 01-04-2011 08:56 PM
Installing GRUB in another disk problem, GRUB Hangs in boot caosxxi Linux - General 7 08-26-2009 02:55 PM
installing GRUB 2, grub-install problem r00tb33r Linux - Software 1 02-26-2007 10:42 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 01:55 PM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 09:13 PM


All times are GMT -5. The time now is 09:48 AM.

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