LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-24-2006, 09:31 PM   #1
yitzle
Member
 
Registered: Aug 2006
Posts: 50

Rep: Reputation: 15
Boot loader woes


And again.
I got 2 hard drives.
#1: ext3 (grub?), fat32 (was Win98), ntfs (WinXP) - (in that order)
#2: ext3 (Ubuntu), ...

#2 is a recent addition and the (primary?) slave.
I installed Ubuntu. GRUB took over the MBR.
I want to move GRUB to #1 so I can pull #2 out.
So... I made the ext3 on #1 by moving over the fat32. Then I copied the /boot from Ubuntu (#2) to #1 ext3.
Then I ran grub-install /dev/hda3 (that's the ext3 as per the disk manager software)
Yet when I pull out the #2, I get GRUB 1.5 Error 21 (unexpected error).

Um... I want it to work!
Any advice (please)?
 
Old 08-25-2006, 04:41 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,298

Rep: Reputation: Disabled
Could you please post the /boot/grub/menu.lst?
 
Old 08-25-2006, 06:52 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
You say that GRUB took over the mbr---In a normal install, GRUB would most likely have gone on the first disk--unless you told it to do something different.

You say you want to "pull out #2"---Are you going back to having just one drive?

I dont understand "grub-install /dev/hda3"---you want grub in the mbr--not a partition. Also it is better to install grub from the grub command prompt. See the grub manual.
 
Old 08-25-2006, 07:21 AM   #4
Tailer
Member
 
Registered: Jul 2006
Distribution: Ubuntu
Posts: 34

Rep: Reputation: 15
This case is very wired...
If you have a floppy drive you can try to install the loader on it, because the problem may be about windows. It can happened that windows destroyed my linux loader...
 
Old 08-25-2006, 10:21 AM   #5
yitzle
Member
 
Registered: Aug 2006
Posts: 50

Original Poster
Rep: Reputation: 15
menu.lst (without the commented lines)
Code:
default		4

hiddenmenu

title		Ubuntu, kernel 2.6.15-23-386
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.15-23-386 root=/dev/hdb1 ro quiet splash
initrd		/boot/initrd.img-2.6.15-23-386
savedefault
boot

title		Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.15-23-386 root=/dev/hdb1 ro single
initrd		/boot/initrd.img-2.6.15-23-386
boot

title		Ubuntu, memtest86+
root		(hd1,0)
kernel		/boot/memtest86+.bin 
boot

title		Other operating systems:
root

title		Windows NT/2000/XP (loader)
root		(hd0,0)
savedefault
makeactive
chainloader	+1
Device Map:
Code:
(hd0)	/dev/hda
(hd1)	/dev/hdb
You say that GRUB took over the mbr---In a normal install, GRUB would most likely have gone on the first disk--unless you told it to do something different.
I originally installed Ubuntu to the second disk, so I would assume that is where GRUB got installed. Yet when I boot up the PC, GRUB is the active boot loader, so GRUB obviously is in the MBR.

I then created an ext3 on the first drive and copied the /boot to it and ran 'grub-install /dev/hda3', so GRUB is also installed to #1...

When I boot with #2 removed, I get "GRUB loading stage1.5. GRUB loading, please wait... Error 21", so GRUB stage 1 is on the first drive. Is it possible that stage 1.5 is not on the #1? Or is it possible that since some of the options from menu.lst are on #2 and #2 is unplugged is cuasing the problem? Or that the fact that the device map has a drive that's unplugged is the trouble?

Um, what is the MBR? Is it on the HD of in the CMOS?

You say you want to "pull out #2"---Are you going back to having just one drive?

I want to be able to use it an a removable drive - plug and unplug it at will.

I dont understand "grub-install /dev/hda3"---you want grub in the mbr--not a partition. Also it is better to install grub from the grub command prompt. See the grub manual.

grub-install requires a grub-device as the parameter... I thought that's where the /boot/grub is located, i.e. on the first partition of the first drive...
Am I supposed to run 'grub-install /dev/hda'?
I guess I'm gonna have to read the manual, eh? I didn't know there was a grub shell.

If you have a floppy drive you can try to install the loader on it, because the problem may be about windows. It can happened that windows destroyed my linux loader...
Erm... I'm looking for a long term solution. And I think its a problem with what I'm doing with GRUB, not WIndows.
 
Old 08-26-2006, 08:32 AM   #6
lordtweety
Member
 
Registered: Mar 2004
Location: Sydney
Distribution: Bodhi 3.0
Posts: 88

Rep: Reputation: 15
Quote:
Um, what is the MBR? Is it on the HD of in the CMOS?
Master Boot Record, hidden sector of your hard drive, your computer reads this first and follows whatever instructions are there. Both of your hard drives will have one. The one the computer readss first is determined by the Pri/Slave Sec/Slave settings on the drives. Or the Cable positioning if you haven't set the jumpers on the different drives.
 
Old 08-28-2006, 01:37 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,298

Rep: Reputation: Disabled
[the nonsense of my first shot deleted -- in case you were there fast]

You need to re-install the entire GRUB. Usually there is a repair function on the discs (at least SuSE does have one). So pop in #1 of your installation discs, choose repair -> repair boot loader. Install GRUB in /dev/hda3 and the loader in the MBR (don't worry, it will walk you though the steps just read attentively the explanations).

The reason is, that the first stage of any boot loader must reside in the MBR -- that's the way PCs function. And it gets during install the information "hard wired" (rather programmed in) where to find the rest of the boot loader software (i.e. GRUB now to be put into /dev/hda3).

When you pull #2 the entries pertaining to Ubuntu will be invalid.

Last edited by JZL240I-U; 08-28-2006 at 08:13 AM.
 
Old 08-28-2006, 08:32 AM   #8
yitzle
Member
 
Registered: Aug 2006
Posts: 50

Original Poster
Rep: Reputation: 15
Ubuntu AFAIK doesn't have a repair... But I'll check.
I tried running 'grub-install /dev/hda3' but it didn't help.
I thought I could restore the Windows MBR (fdisk /mbr) and manually booting Ubuntu using the Boot Menu->HD#2, but HD#2 doesn't boot right.
It had some Novell booter, so I ran 'grub-install /dev/hdb' and 'grub-install /dev/hdb1' but when I try to boot that drive I get Error 17.

So... I'll check the LiveCD for a repair or maybe download SuSe just for the repair... I got Knoppix and SysRescue, so I'll try those too.
 
Old 08-28-2006, 08:41 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,298

Rep: Reputation: Disabled
There should be no need for a live CD. The original should find an existing installation and offer to repair it. There woud also be an offer to repair the boot loader.

Please re-read my post: It is necessary to realign the MBR so that it points to /dev/hda3 for the next stage of GRUB.
 
Old 08-28-2006, 09:18 AM   #10
yitzle
Member
 
Registered: Aug 2006
Posts: 50

Original Poster
Rep: Reputation: 15
I got it solved thanks to Sander on GameDev (http://www.gamedev.net/community/for...opic_id=410911)
It appears when I tried grub-install it was using the second hard drive for stage 1.5 so throwing in --root-directory=HDA into the grub-install solved the problem.
Thanks for your help!
 
  


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
wireless Keyboard not working to select boot options (Grub boot loader) psrini_vasan Fedora 7 12-16-2009 05:45 PM
Create a boot CD (start up disc) to reinstall boot loader Red Hat 9 johnnylinux Linux - Laptop and Netbook 2 08-03-2006 10:19 AM
Boot loader woes drguitarum2005 Linux - General 2 07-10-2005 03:22 AM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:30 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