LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 05-10-2008, 11:49 AM   #16
Frank64
Member
 
Registered: Feb 2008
Distribution: Kubuntu 19.10
Posts: 77

Rep: Reputation: 15

Quote:
Originally Posted by saikee View Post
If Grub reports no error when you swap the hard disks then you should pay attention to the lines below marked in red
Code:
# Modified by YaST2. Last modification on Sun Mar 23 12:26:54 EDT 2008
default 0
timeout 2
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 10.3
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.22.5-31-default root=/dev/sda1 vga=0x317 resume=/dev/sda5 splash=silent showopts
    initrd /boot/initrd-2.6.22.5-31-default

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - External drive
    root (hd1,0)
    kernel /boot/vmlinuz-2.6.25-26-default root=/dev/disk/by-id/scsi-SATA_ST3500320AS_5QM0PP7M-part1 resume=/dev/sda5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.25-26-default
This line "gfxmenu (hd0,0)/boot/message" instructs Grub to load the graphic menu available in (hd0,0) so If you present a wrong disk Grub will not be able to load the file and stuck there.

Your Suse 10.3 will boot if it is (hd0) and physically connected to the first Sata port of the mobo (in order to get detected first and received the sda designation).

Your Suse 11.0 can be placed physically in any Sata connection point but it must be on the first partition of hard disk identified in your PC as device SATA_ST3500320AS_5QM0PP7M

If you give all the things Grub can find then you will never have a booting problem.

I recommend putting a "#" in front of the gfxmenu statement thereby disabling it and obtain a text menu instead. In a text menu you deal with Grub directly and can overcome any problem by pressing the "c" key to drop into a Grub prompt.

There is no installed operating system in the world that you cannot boot up with a Grub prompt! I have tried for years and couldn't find one.

You can ask Grub to tell you the geometry of disk (hd0) and (hd1) by command
Code:
geometry (hd0)
geometry (hd1)
from which you can see the partitions and able to tell which is which exactly the way Grub sees it.

You can ask Grub to display your menu.lst, say it is in (hd0,0) by command
Code:
root (hd0,0)
cat /boot/grub/menu.lst
You can ask Grub to fire the menu.lst up in (hd0) by command
Code:
root (hd0)
configfile /boot/grub/menu.lst
You can edit the lines while booting with the "e" (for edit).

You can display any menu.lst and follow the commands to boot any system manually in a Grub prompt.

You can ask Grub to reboot or turn off the PC.

You will not be able to find a program that works faster than a Grub prompt.

So why go through a middleman like gfxmenu. Talk to Grub directly and let it solve all your booting problems.
That thread is definatley going in my "Linux you must know" bookmarks.

I have no doubt grub can boot anything and probably MAC OSX as well, which is possible to install on a Intel PC. It only takes some user experience to get the hang of it, like anything else in Linux.

I will remove for ever my gfx menu.

I like the idea of rebooting or shutting down the PC from the grub menu, actually that's something I would often need. I will check around what the commands are and create them in the menu.

For my HDDs setup, what I don't understand is that I specifically used DEVICE ID setup for my (hd1,0) so that grub would point to it by its ID and not by the path like sda or sdb. So when I click on the (hd1,0) menu line grub then tries to start the kernel and initrd from the SATA_ST3500320AS_5QM0PP7M disk. It does so whether I run 2 HDDs or only one. But when i run one, it works and when run both, it doesn't, with error 2.

Grub is in the 1st partition of (hd1,0). Actually it is located in (hd1,0).

HA! Interesting... geometry (hd0) gives results, but geometry (hd1) gives Error 21: Selected disk does not exist. Maybe that explains why it doesn't boot when I have both HDDs running. fdisk -l gives all the info on (hd1), though...

TOMERMORY, try these GRUB1 and GRUB ERRORS
 
Old 05-10-2008, 12:55 PM   #17
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Here's another way to use multiple GRUB's. For example, you have one Linux on sda1, second on sda2, third is on sda3. Common swap on sda4. All three Linuxes have GRUB installed to their respective partitions. To chainload them you can use a simpler bootloader, like GAG. GAG does not have any files on any partitions (unlike GRUB) and as such is totally independent.
 
Old 05-10-2008, 02:34 PM   #18
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
As I understand it, but please correct me if I'm wrong, if you want to install GAG, you need to have Grub on the root partition of every OS you install, not on the MBR. I looked into installing GAG, it has excellent reviews, but I decided that moving Grub was a bit risky so I didn't attempt it.
Thanks for the links Frank64. That's exactly the sort of thing I was looking for.
 
Old 05-10-2008, 07:18 PM   #19
Frank64
Member
 
Registered: Feb 2008
Distribution: Kubuntu 19.10
Posts: 77

Rep: Reputation: 15
I haven't tried GAG, but I tried different things in GRUB and I was amazed about that chainload function.

First I got rid of the stupid gfxmenu. Then I added myself REBOOT, HALT, CHAINLOAD+1 and FIRE MENU.LST FROM HD1.

I did not try reboot and halt yet, but I am sure they work, took the commands from one of the sites I posted.

I tried firing up menu.lst of root(1,0) but that ended in error 17 I think, cannot mount partition or filesystem. Ok, next, chainload. It then loaded the grub menu of (hd1) and when I selected the usual choice, IT BOOTED FROM MY SECOND HD!!!!! HURRAY!!

Well actually I needed to edit from command-line and change root(0,0) to root(1,0) from the menu.lst of the Hd1 and all was fine. So I will use that option, chainloading distros and HDs this way.

tnx for the tips!
 
Old 05-11-2008, 04:52 AM   #20
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The Grub prompt is the most lethal weapon in booting. The commands you use if booting automatically are exactly those in menu.lst. Thus menu.lst is a script file.

Never tried GAG myself but when I look at it last time it seemed to have a limit in the number of booting choices something like 12. Grub has done at least 10 times of that amount for me.

AFAIK Grub is the only boot loader that allows a user to boot up any system manually, can be installed in any medium (floppy, CD, internal hard disk, external hasrd disk, USB memory device), able to survive on its own (without an operating system attached) and can boot any operating system in a PC.

All you ever need is to read its Grub Manual.

Last edited by saikee; 05-11-2008 at 04:55 AM.
 
Old 05-13-2008, 11:03 AM   #21
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
I don't know if I should start a new thread or not, but my problem relates to this one, and so I'll post here. The trouble is that I can't access my Archlinux partition from Debian. When I try to mount this partition, I get a permissions error. I've tried using chmod 0777 /dev/hda3, and I've also done a chown, but to no avail. Also, I don't see this partition in /media, despite my efforts to get it to mount there. I have altered the fstab file to try and make this all happen, but this doesn't work (I have to say that I'm very much a newbie with fiddling with fstab, so my error may be here.). Here is the result of fdisk -l:

Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        7047    56604996   83  Linux
/dev/hda2            9447        9729     2273197+   5  Extended
/dev/hda3            7048        9446    19269967+  83  Linux
/dev/hda5            9447        9729     2273166   82  Linux swap / Solaris
And here is the fstab file:

Code:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda3       /media/hda3     ext3    defaults, user, auto    0       0
/dev/hda5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/hdd        /media/cdrom1   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

/dev/sdb1 /media/usb0 vfat rw,user,users,noauto,noatime,noauto 1 2
I hope someone can help me with this, I've never really been able to get my head around mount points and so forth!

Last edited by Tomermory; 05-13-2008 at 11:05 AM.
 
  


Reply

Tags
grub, mbr, move



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
quick question about grub bootloader & installing another distro Ay-Karamba! Linux - Newbie 12 10-14-2005 09:00 AM
Installing grub without a distro squimmy Linux - Newbie 8 07-20-2005 01:28 PM
GRUB or LILO won't boot linux!!! for ANY distro stelmate Linux - Hardware 12 05-27-2005 06:42 PM
appending grub - add other linux distro machiner Fedora 2 10-10-2004 02:38 PM
apart from grub fedora 2 is the best linux distro unixmad Fedora 1 08-29-2004 05:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:37 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
Open Source Consulting | Domain Registration