Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed OpenSUSE to an external USB HDD but had severe problems with Grub failing to boot Windows 7, although it booted the Linux OK. In the end I had to replace the Grub mbr code in the Ext HDD with W7 mbr code. So I now have a system with functioning W7 on my internal drive and a working install of OpenSUSE 11.2 on my external USB HDD that I can't currently boot.
Will it be possible to manually install Grub using grub-install to boot both the Windows and Linux distro?
My configuration is:
sda Internal 160 GB HDD all NTFS
sda1 Hidden OS reinstall 10GB
sda2 Windows 7 70GB (Active Partition, Bootable)
sda3 Data 70GB
sda4 Hidden Utils 5GB
yes there is issues with dual boot but solution is also possible.
Boot into the live linux cd.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands
Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)
Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr
Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
yes there is issues with dual boot but solution is also possible.
Boot into the live linux cd.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands
Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)
Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr
Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
I followed that exactly.
The find /boot.grub/stage1 command returned
hd2,0
I used that to go
root (hd2,0)
and then
setup (hd0).
On rebooting I was presented with all the correct choices by a Grub screen and Windows 7 boots correctly when selected. However when I select OpenSUSE I simply get the message:
I'll try setup (hd2) if it will allow me to change from hd0! I checked the kernel in /boot and that was the same as used by Grub so that doesn't appear to be the problem. I will post in a few minutes.
grub>
If you installed a /boot partition, do
Code:
find /grub/stage1
If you did not do a /boot partition [most likely choice] do
Code:
find /boot/grub/stage1
One of these commands will give you an answer like
Code:
root (hd0.0)
Now press Esc.
Select the first boot option and press "e"
Press "e" again on the root option
Change the hd(X,X) to whatever you got above. for me it was hd (0,0).
Press Enter.
Now press "b"
linux should load up.
Now that you are in, you need to change this for good.
Open a terminal and enter
Code:
sudo gedit /boot/grub/menu.lst
or, depending on your setup
Code:
sudo gedit /grub/menu.lst
Scroll down towards the bottom of the file, and you will find the same "root (hdX,X)" change it appropriately, and you can save!
Fine, I have changed the boot to hd2,0 in the Grub menu and then booted OpenSUSE. That worked. I would now like to amend menu.lst but gedit isn't available in my KDE version of OpenSUSE and when I download as zypper gedit the resulting gedit won't open menu.lst even though I try from a sudo su console in Terminal. It reports Gtk Warning cannot display. Can I use another in place of gedit?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.