LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-06-2010, 06:49 PM   #1
fh.nixer
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Unhappy grub error 2 on multiboot machine


I've installed 1 130GB Vista partition, 13 10GB Linux partitions and 1 8GB swap partition on my desktop machine.

After the last install (on hd0,1) I copied the info from the menu.lst/grub.conf file from each partition into 1 file and replaced the menu.lst file in the last installation (sda2) with that large file (removing duplicate entries).

Now, when I boot I get a list of boot options for all 14 partitons (includes Vista). However, I can only access 5 of them. The others return a grub error 2 message: Bad File or Directory Type.

As a note, "Super Grub" boots them all but takes some trial and error to get the specific correct entry. I'd like a simple menu (could live with some drop downs from main menu).

Following is a copy of the menu.lst file on sda2:
################# menu.lst start ############################
default=0
timeout=30
splashimage=(hd0,10)/boot/grub/splash.xpm.gz

title sda1 Vista Business
root (hd0,0)
makeactive
chainloader +1
boot

title sda2 PCLinuxOS #on sda2: location of stage 2 loader
root (hd0,1)
kernel (hd0,1)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda2 acpi=on resume=/dev/sda15 splash=silent vga=788
initrd (hd0,1)/boot/initrd.img
boot

title sda3 Mandriva 2008
root (hd0,2)
kernel (hd0,2)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=f97f6c58-93b9-40d1-83ef-f8b0279e2f5d resume=/dev/sda15 splash=silent vga=788
initrd (hd0,2)/boot/initrd.img
boot

title sda5 openSUSE 10.3
root (hd0,4)
kernel /boot/vmlinuz-2.6.22.5-31-default root=/dev/disk/by-id/scsi-SATA_Hitachi_HDT7250_VFA200R22RDHPA-part5 vga=0x31a resume=/dev/sda15 splash=silent showopts
initrd /boot/initrd-2.6.22.5-31-default
boot

title sda6 Ubuntu 9.04
root (hd0,5)
uuid 69234241-fd1a-4124-9ace-52d5cb532e1b
kernel /boot/vmlinuz-2.6.28-17-generic root=UUID=69234241-fd1a-4124-9ace-52d5cb532e1b ro quiet splash
initrd /boot/initrd.img-2.6.28-17-generic
quiet
boot

title sda7 Fedora 10
root (hd0,6)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=17dae456-fbde-4482-bf27-e09fde3fe3ce rhgb quiet
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
boot

# following 4 entries attemp to use chainloader
title sda8 root (hd0,7)
rootnoverify (hd0,7)
chainloader +1
boot

title sda9 root (hd0,8)
rootnoverify (hd0,8)
chainloader +1
boot

title sda10 root (hd0,9)
rootnoverify (hd0,9)
chainloader +1
boot

title sda11 CentOS 5.2
root (hd0,10)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.18-92.el5.img
boot

title sda12 Sabayon
root (hd0,11)
kernel /boot/kernel-genkernel-x86-2.6.22-sabayon root=/dev/ram0
ramdisk=8192 real_root=UUID=9348786d-819a-419d-b15d-929632db9551 quiet init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 pci=nomsi
initrd /boot/initramfs-genkernel-x86-2.6.22-sabayon
boot

title sda13 Puppy Linux
root (hd0,12)
kernel /boot/vmlinuz root=/dev/sda13
savedefault
boot

title sda14 gOS
root (hd0,13)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=08d22a64-b464-437c-bb91-738e7b91b9d8 ro quiet splash loglevel=0
initrd /boot/initrd.img-2.6.24-19-generic quiet
boot
############# menu.lst end ##########################

As I stated, "Super Grub" boots all - but with some "gyrations" on several entries.
My purpose is to use the machine as a demo to induce fellow workers to swithc to Linux.
Hence, would like a more simple menuing system on startup.

For info: the partitions that will boot are sda1,2,5,11,and 12. sda2 was the last partion installed. sda4 is swap.

Any help will be appreciated.
 
Old 04-06-2010, 06:59 PM   #2
demitchell55
LQ Newbie
 
Registered: Apr 2010
Location: DuBois PA
Distribution: CentOS, Red Hat Variant
Posts: 7

Rep: Reputation: 0
New to Linux, but I do have a question that may help.

How many of these partitions are primary partitions (excluding the Linux Swap Partition)?

From what I am learning at the local college where I'm taking IT courses, you can only have a maximum of four primary partitions on a drive. Is there more than one hard disk involved (which would allow for more than four primary partitions)? This may explain why you can only boot to five of them. Can anybody else out there confirm what I am saying? Thanks.
 
Old 04-06-2010, 07:07 PM   #3
fh.nixer
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
partitions 1- windows, 2- pclos and 3- mandriva are primary.
the others are secondary.
gparted will format up to 15 total partitons.
As I stated, "Super Grub" finds and loads them all.

There is only 1 hard drive

Last edited by fh.nixer; 04-06-2010 at 07:13 PM. Reason: clarification
 
Old 04-06-2010, 07:27 PM   #4
demitchell55
LQ Newbie
 
Registered: Apr 2010
Location: DuBois PA
Distribution: CentOS, Red Hat Variant
Posts: 7

Rep: Reputation: 0
Lightbulb Here's what I have going with multiple Linux distributions.

Have you considered running Sun VirtualBox (or VMWare) and running these other distributions in a virtual form. Currently, I have Sun VirtualBox on my Windows 7 main system (dual bootable with Sabayon Linux (Gnome)) and I have five separate distributions that can be booted into at any time I need them. The five distributions I currently have loaded are Ubuntu 9.10, Linux Mint 8 (Gnome), Linux Mint 8 (KDE), Sabayon Linux 5 (KDE), and Fedora Core 11. I have had four of these systems running in their own virtual machines at once (running these like this is only limited by the amount of RAM on my system - currently 4GB). I don't know if this is an option, but it gets around the problems with multiple boots (and takes up a whole lot less of disk space). What do you think? Thanks for filling me in on GParted; I was not aware of that capability.
 
Old 04-06-2010, 10:07 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
What was on sda2 previously? You installed PCLinux there as your last installation and installed its Grub to the master boot record?

You state you have 13 Linux partitions plus vista but your menu.lst you posted shows only a total of 13? Type?

Which ones don't boot? Maybe it would be easier to list the one which DO boot as there are only five?
 
Old 04-06-2010, 10:53 PM   #6
fh.nixer
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Virtualization

Quote:
Originally Posted by demitchell55 View Post
Have you considered running Sun VirtualBox (or VMWare) and running these other distributions in a virtual form. Currently, I have Sun VirtualBox on my Windows 7 main system (dual bootable with Sabayon Linux (Gnome)) and I have five separate distributions that can be booted into at any time I need them. The five distributions I currently have loaded are Ubuntu 9.10, Linux Mint 8 (Gnome), Linux Mint 8 (KDE), Sabayon Linux 5 (KDE), and Fedora Core 11. I have had four of these systems running in their own virtual machines at once (running these like this is only limited by the amount of RAM on my system - currently 4GB). I don't know if this is an option, but it gets around the problems with multiple boots (and takes up a whole lot less of disk space). What do you think? Thanks for filling me in on GParted; I was not aware of that capability.
I use both Sun and Vmware for testing. However, there my demo is to
show install on bare metal coexisting with the "high priced spead".
 
Old 04-06-2010, 11:10 PM   #7
fh.nixer
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
What was on sda2 previously? You installed PCLinux there as your last installation and installed its Grub to the master boot record?

You state you have 13 Linux partitions plus vista but your menu.lst you posted shows only a total of 13? Type?

Which ones don't boot? Maybe it would be easier to list the one which DO boot as there are only five?
You're too sharpe-eyed :-) There are, indeed, only 12 Linux distos. The distro on sda2 boots as, I believe, because it was in the config file that grub created and installed on that partition (along w/Vista). The other 11 entries were hand installed by me. Only 3 of those 11 will install from the grub menu on the hard drive. However, the cd utility "Super Grub" loads them all and, even, displays the menu.lst file data that I created.
 
Old 04-06-2010, 11:16 PM   #8
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Rep: Reputation: 45
Smile

To chainload a Linux it should be; root (hd0,7) and not; rootnoverify since that is only needed for windows mostly. What I do with multiple boot of many Linux is to install grub on each root partition, so that you can chainload to each one's own grub boot menu. Your Linux distros versions appear to be not the newer releases, so yours is grub 1, not 2.
 
Old 04-07-2010, 02:45 AM   #9
fh.nixer
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by james2b View Post
To chainload a Linux it should be; root (hd0,7) and not; rootnoverify since that is only needed for windows mostly. What I do with multiple boot of many Linux is to install grub on each root partition, so that you can chainload to each one's own grub boot menu. Your Linux distros versions appear to be not the newer releases, so yours is grub 1, not 2.
Would you, pls, be more specific. Indeed, all my grub versions are .97.
What I believe you're saying is that instead of installing grub in the
mbr for each installation, the 1st install should be in the mbr and
all remaining installs should have grub installed in /boot of the new
install partition. For example, 1st install is Ubuntu in /dev/sda2. For this, grub should be installed in the mbr. A new install of kbuntu in /dev/sda3 should have grub installed into /dev/sda3/boot. Then menu.lst in /dev/sda/boot/grub should contain the specific details (root, kernel, initrd, etc) for Ubuntu (hd0,1). The next entry should look like this:
root (hd0,2)
chainloader +1

Have I missed something??
 
Old 04-07-2010, 03:20 PM   #10
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Rep: Reputation: 45
Smile

If your Linux installs were to just root "/" and not a separate partition for /boot, then you install grub to each Linux root, so with out the boot folder like this for your sda3; /dev/sda3. And to boot by chainload this will be the entry in your main grub menu file;
title Kubuntu
root (hd0,2)
chainloader +1
boot
The savedefault in your Puppy Linux is only needed for which one you want to always boot by default, such as your windows.
You can install grub to any of your Linux root partitions from either a grub prompt at the grub boot menu screen, or in a terminal as root user. So as root just type this; grub, hit enter, root (hd0,2), hit enter, and then setup (hd0,2), enter, and then quit to exit. Where grub is sourcing the files from is the "root", and where it is installing to is the "setup".

Last edited by james2b; 04-07-2010 at 03:22 PM. Reason: edit
 
Old 04-07-2010, 08:18 PM   #11
fh.nixer
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by james2b View Post
If your Linux installs were to just root "/" and not a separate partition for /boot, then you install grub to each Linux root, so with out the boot folder like this for your sda3; /dev/sda3. And to boot by chainload this will be the entry in your main grub menu file;
title Kubuntu
root (hd0,2)
chainloader +1
boot
The savedefault in your Puppy Linux is only needed for which one you want to always boot by default, such as your windows.
You can install grub to any of your Linux root partitions from either a grub prompt at the grub boot menu screen, or in a terminal as root user. So as root just type this; grub, hit enter, root (hd0,2), hit enter, and then setup (hd0,2), enter, and then quit to exit. Where grub is sourcing the files from is the "root", and where it is installing to is the "setup".

Thanks. I will give it a try on my laptop.
Your help is appreciated.
 
  


Reply

Tags
grub2



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
Grub Error 22 after deleting Fedora Partition on Vista Machine CSMajor2012 Fedora 4 03-21-2010 07:12 PM
multiboot external usb hd grub error 5 koen plessers Linux - General 3 03-15-2009 11:02 AM
grub overwrote lilo multiboot, missing one boot in Grub rl23455 Linux - Newbie 1 12-09-2007 01:50 PM
Grub ?????? [Multiboot] UsualTuxpect Linux - Software 4 09-13-2004 12:37 AM
GRUB multiboot zokik Linux - General 7 06-25-2003 06:41 AM

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

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