FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 01-31-2008, 09:59 PM
"Mikkel L. Ellertson"
 
Default Is a distro independent grub boot possible using a boot partition???

Joe(theWordy)Philbrook wrote:

Is a distro independent grub boot possible using a boot partition???

Hello, I'm trying to set up a boot partition on my multi-boot laptop
using grub. But I must be doing something wrong. And I'm not sure if
it can do what I really want anyway...

I was hoping that if I properly set up a boot partition with grub, it
would still work if I replaced the distro with which I originally
installed grub to the mbr???

I set up a boot partition (sort of) I copied mepis' /boot to it,
modified both menu.lst files to replace lines consisting of:
root (hd0,6)
[ the mepis partition ] with lines containing:
root (hd0,2)
[ the intended boot partition ]

The problem is that the Grub first stage that is installed on the
MBR is looking for the Grub stage 1.5 in a specific place on the
drive. Because the first stage is very small, it does not know about
file systems. This is what the stage 1.5 does. So it is ignoring the
new stage 1.5, and is using the old one. That one is looking at the
original /boot/grub directory.



I know it's using the vmlinuz from (hd0,2) because I temporarily
renamed the one I had for the kubuntu in the mepis /boot dir
and could still boot kubuntu... I also know I'm still using the
menu.lst file on (hd0,6) because I modified one of the title lines to
include the words "native /boot" And that was displayed in the boot
menu.

I suspect that to make grub use the menu.lst that's on (hd0,2) what I
need to do is to mount /dev/hda3 on /boot while running the mepis that
installed grub, and then do a "grub-install /dev/hda". But I'd like to
confirm that before I wing it because unlike my old pc there is no
floppy so I can't test it with "grub-install /dev/fd0" first. So I guess
I'm asking if that's all there is to it?

But what I really want to know is once the grub installed to the mbr is
booting from (hd0,2) using the menu.lst from that partition, will it
continue to boot from the mbr if the linux that installed it to the mbr
is no longer there?

Or will I always have to reinstall grub to the mbr from some other
installed linux before I trash the distro that last installed it???

You might want to consider creating a small partition just for Grub.
The menu in this version would just chainload the boot loader for
the other versions, or Windows, depending on what you pick from the
menu. You would then install Grub for each distribution to the boot
record of its /boot partition, if it has one, or its root partition
if it does not.


For a quick fix, you can mount the new /boot partition using /bot as
the mount poing, and run grub-install. You can then get rid of the
mepis install if you want, as long as you do not get rid of your new
/boot partition.


Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-31-2008, 09:59 PM
"Mikkel L. Ellertson"
 
Default Is a distro independent grub boot possible using a boot partition???

Joe(theWordy)Philbrook wrote:

Is a distro independent grub boot possible using a boot partition???

Hello, I'm trying to set up a boot partition on my multi-boot laptop
using grub. But I must be doing something wrong. And I'm not sure if
it can do what I really want anyway...

I was hoping that if I properly set up a boot partition with grub, it
would still work if I replaced the distro with which I originally
installed grub to the mbr???

I set up a boot partition (sort of) I copied mepis' /boot to it,
modified both menu.lst files to replace lines consisting of:
root (hd0,6)
[ the mepis partition ] with lines containing:
root (hd0,2)
[ the intended boot partition ]

The problem is that the Grub first stage that is installed on the
MBR is looking for the Grub stage 1.5 in a specific place on the
drive. Because the first stage is very small, it does not know about
file systems. This is what the stage 1.5 does. So it is ignoring the
new stage 1.5, and is using the old one. That one is looking at the
original /boot/grub directory.



I know it's using the vmlinuz from (hd0,2) because I temporarily
renamed the one I had for the kubuntu in the mepis /boot dir
and could still boot kubuntu... I also know I'm still using the
menu.lst file on (hd0,6) because I modified one of the title lines to
include the words "native /boot" And that was displayed in the boot
menu.

I suspect that to make grub use the menu.lst that's on (hd0,2) what I
need to do is to mount /dev/hda3 on /boot while running the mepis that
installed grub, and then do a "grub-install /dev/hda". But I'd like to
confirm that before I wing it because unlike my old pc there is no
floppy so I can't test it with "grub-install /dev/fd0" first. So I guess
I'm asking if that's all there is to it?

But what I really want to know is once the grub installed to the mbr is
booting from (hd0,2) using the menu.lst from that partition, will it
continue to boot from the mbr if the linux that installed it to the mbr
is no longer there?

Or will I always have to reinstall grub to the mbr from some other
installed linux before I trash the distro that last installed it???

You might want to consider creating a small partition just for Grub.
The menu in this version would just chainload the boot loader for
the other versions, or Windows, depending on what you pick from the
menu. You would then install Grub for each distribution to the boot
record of its /boot partition, if it has one, or its root partition
if it does not.


For a quick fix, you can mount the new /boot partition using /bot as
the mount poing, and run grub-install. You can then get rid of the
mepis install if you want, as long as you do not get rid of your new
/boot partition.


Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-31-2008, 11:21 PM
John Summerfield
 
Default Is a distro independent grub boot possible using a boot partition???

Joe(theWordy)Philbrook wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is a distro independent grub boot possible using a boot partition???


yes it is.
Create a small partition. For the sake of argument, we will assume it's
/dev/hda1
Format it and install grub's files in it. See the grub docs for detailed
information. Read until it becomes clear:-)


Install its boot record to /dev/hda

For every other distro, install its boot record to its partition.

The grub menu in the grub partition needs to point to each Linux distro
(and Windows).


You might consider adding a menu entry for each Linux distro (and
Windows) to boot the MBR so you can get back to the original menu.


Note that if you want to boot something not in the menu, you can go the
grub's commandline and do it there.


The only problem I see with reusing a Mepis partition is it's way bigger
than you need. 1 Mbyte should be enough.





<snip>



confirm that before I wing it because unlike my old pc there is no
floppy so I can't test it with "grub-install /dev/fd0" first. So I guess
I'm asking if that's all there is to it?


Adapt and run this script; it will create a boot CD:

09:11 [summer@numbat ~]$ cat bin/grub-cdrom
#!/bin/bash
set -e
iso=$(mktemp -d /tmp/isoXXXXXX)
ls -dl ${iso}
cd ${iso}
mkdir -p boot/grub
cp -p /usr/share/grub/*/stage2_eltorito boot/grub
cat <<. >boot/grub/menu.lst
default=0
timeout=20
$( [ -f boot/grub/splash.xpm.gz ] && echo
splashimage=/boot/grub/splash.xpm.gz)

title Boot from disk
root (hd0)
chainloader +1
boot
.
cp -l boot/grub/menu.lst boot/grub/grub.conf
cat boot/grub/grub.conf
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot
-boot-load-size 4 -boot-info-table -o /tmp/grub.iso .
ls -hl /tmp/grub.iso
rm -rf ${iso}
echo cdrecord -blank=fast -sao -eject /tmp/grub.iso
09:11 [summer@numbat ~]$





But what I really want to know is once the grub installed to the mbr is
booting from (hd0,2) using the menu.lst from that partition, will it
continue to boot from the mbr if the linux that installed it to the mbr
is no longer there?


It needs the partition where its stage 1.5 and stage 2 live.



Or will I always have to reinstall grub to the mbr from some other
installed linux before I trash the distro that last installed it???


never ever replace the MBR "because it seemed a good idea."




--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 02-01-2008, 09:27 PM
Konstantin Svist
 
Default Is a distro independent grub boot possible using a boot partition???

This might not really answer your question, but there's an option you
can use to switch from one grub to another (in stage 2).


When I was switching from FC6 to F8, I installed F8 on a separate
partition (not wishing to destroy any of the old data). That included a
fresh /boot partition.

Then, I added an entry to the new /boot/grub/menu.lst:

title Fedora FC6
root (hd0,5)
configfile /boot/grub/menu.lst

(hd0,5) was the old / partition

Since I initially installed grub to MBR, instead of partition,
chainloader directive didn't work


HTH

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 01:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org