LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grub problem (https://www.linuxquestions.org/questions/linux-newbie-8/grub-problem-871087/)

sumeet inani 03-26-2011 03:32 AM

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


EricTRA 03-26-2011 03:35 AM

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

sumeet inani 03-26-2011 05:13 AM

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


sumeet inani 03-26-2011 05:18 AM

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.

sumeet inani 03-26-2011 05:20 AM

Is there a way to resize ntfs partition using fdisk from terminal?

EricTRA 03-26-2011 05:21 AM

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

sumeet inani 03-26-2011 05:27 AM

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

sumeet inani 03-26-2011 05:31 AM

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 ?

EricTRA 03-26-2011 06:14 AM

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

Harju 03-26-2011 09:02 AM

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!


All times are GMT -5. The time now is 04:18 AM.