Installing GRUB in another disk problem, GRUB Hangs in boot
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Installing GRUB in another disk problem, GRUB Hangs in boot
The scenario is this:
I have two SATA disks, first disk (160GB) contains linux and windoze and second (250 GB) is empty.
Disk one is partitioned:
/dev/sda1 Windoze in NTFS
/dev/sda2 /root in ext3
/dev/sda5 /home in ext3
/dev/sda6 SWAP
Because i do install windoze after linux i lost my GRUB loader on MBR.
I tried to recover it using a Ubuntu Alternate CD, running the instaled system on sda2 and executing:
Code:
$grub-install /dev/sda1
it doesn't work and damaged my NTFS partition. I do recover it copying PBR of another disk into sda1, and works fine!
Because i have another Disk i tried to install GRUB in it and BOOT from there, using the same procedure described above.
Code:
$grub-install /dev/sdb1
I tried many times, changing the Filesystem of sdb1, setting the boot flag using FDISK and doesn't work.
Oh, yea...
Yes, sda1 partition is damaged by installing group there.
Install Windoze new and then install group allway in the boot block of a disc with
Code:
$grub-install /dev/sda
The BIOS don't know nothing about filesystems but only about how to access drives. So only the first bytes of a disk (track 0, bootblock) is accessible to the BIOS. That means that group has to install itself in the first bytes of the disk /dev/sda and not to the first bytes of a partition (/dev/sda1). A partition (sda1) can start everywhere on a disk the BIOS can't guess.
The BIOS don't know nothing about filesystems but only about how to access drives. So only the first bytes of a disk (track 0, bootblock) is accessible to the BIOS. That means that group has to install itself in the first bytes of the disk /dev/sda and not to the first bytes of a partition (/dev/sda1). A partition (sda1) can start everywhere on a disk the BIOS can't guess.
Of course i see what i doing wrong, thanks for advice.
It works.
But i did install GRUB in /dev/sdb and windoze not boot.
Actually in /dev/sdb i have one partition in NTFS without Operating System.
I do add this entry for menu.lst
Code:
title Windoze
root (hd0,0)
savedefault
makeactive
chainloader +1
When i load windoze this message appears:
Code:
NTLDR missing - Press alt+ctrl+delete to restart.
It's strange because NTLDR exists in (hd0,0)
I suppose this problem is related to windoze, i'll do post in General Forum.
Seems windoze doesnt like to boot first in a disk without windoze OS files and redirecting to another disk in order to boot.
It works.
But i did install GRUB in /dev/sdb and windoze not boot.
Actually in /dev/sdb i have one partition in NTFS without Operating System.
I do add this entry for menu.lst
Code:
title Windoze
root (hd0,0)
savedefault
makeactive
chainloader +1
That entry seams not to be correct but read http://en.wikipedia.org/wiki/NTLDR maybe it can help you.
Make sure you followed this steps.
1- install windoze on a drive
2- install other OPs
3- make sure you use grub-0.97
4- setup grubs menu file
5- grub install
6- make sure that the disk grub is installed on is the first boot device in the BIOS settings.
and all should work fine!
That entry seams not to be correct but read http://en.wikipedia.org/wiki/NTLDR maybe it can help you.
Make sure you followed this steps.
1- install windoze on a drive
2- install other OPs
3- make sure you use grub-0.97
4- setup grubs menu file
5- grub install
6- make sure that the disk grub is installed on is the first boot device in the BIOS settings.
and all should work fine!
The problem here is that i need to change in my BIOS settings the primary hard disk in order to boot a OS.
For example, to boot Windoze XP i need to set my first hard disk to first boot device and then boot and windoze works "fine" (boots indeed)
To boot linux i need to set my second hard disk to first boot device, at this stage GRUB menu runs ok, when i choose windows to boot doesn't works and says NTLDR missing, if i choose linux it boots fine.
I want to boot both OS's from GRUB installed in second hard disk without setting BIOS.
Excuse me, for me is hard to write in english (obviously not my primary language), Thanks!!!
I want to boot both OS's from GRUB installed in second hard disk without setting BIOS.
Yes, what you want to do should work.
the root device for windows should be (hd0) and the root device for linux - you know, I guess - should be then (hd0,1)
(hd0) for windows, because windows has a boot loader too, installed on sda (hd0) and not sda1 (hd0,0). sda1 is not directly bootable like I described it and grub dosn't know how to load windows but windows bootloader knows it, so you have to start, it. It's the same like with the BIOS and partitions.
If that is not the mistake, I would have to study the grub manual, too, at http://www.gnu.org/software/grub/manual/.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.