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 07-30-2010, 10:21 PM
Timothy Murphy
 
Default Grub and logical partitions

Can grub boot from a logical partition?

It seems from my reading that it cannot.

But I found that I could in fact boot from /dev/sda5
if I used grub interactively, starting with
root (hd0,4)
then using tab to look for kernel and initrd
and finally booting.

However, if I put exactly the same commands in grub.conf
the boot failed, with "File not found ...".

(Nb I am not using LVM, sda5 is a logical partition
within the extended partition sda4.)

Can some guru explain this to me please.


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 01:33 AM
"Daniel B. Thurman"
 
Default Grub and logical partitions

On 07/30/2010 03:21 PM, Timothy Murphy wrote:
> Can grub boot from a logical partition?
>
> It seems from my reading that it cannot.
>
> But I found that I could in fact boot from /dev/sda5
> if I used grub interactively, starting with
> root (hd0,4)
> then using tab to look for kernel and initrd
> and finally booting.
>
> However, if I put exactly the same commands in grub.conf
> the boot failed, with "File not found ...".
>
> (Nb I am not using LVM, sda5 is a logical partition
> within the extended partition sda4.)
>
> Can some guru explain this to me please.
>
>
It can if you set the MBR for each boot partition.
For example:

#grub
grub> find /grub/stage1
hd0,4
hd0,6
hd0,8

In my setup, 4 is a front-end, MBR for the
entire drive and the boot partition has a single
grub directory with all of the stages, splash, grub.conf
and no kernel/initrc/mem/etc., nothing above the grub
directory. Just make sure that the grub directory is the
latest grub that supports ext4. The grub.conf file
contains only chainloaders such as:

title Fedora 13
rootnoverify (hd0,6)
chainloader +1
savedefault

title Ubuntu 10
rootnoverify (hd0,8)
chainloader +1
savedefault

As seen above, 6 is Fedora's boot partition,
7 is Fedora's root partition, 8 is Ubuntu's
boot partition (using old grub, not grub2)
and 9 is Ubuntu's root partition and so on.

To get the ball rolling one must in grub do:

grub> root (hd0,4) # Master grub MBR
grub> setup (hd0)
grub> root (hd0,6) # Fedora
grub> setup (hd0,6)
grub> root (hd0,8) # Ubuntu
grub> setup (hd0,8)

So you will basically get two grub menus, one for the
master list (MBR) and the other for the selected OS
containing it's own kernel context information.

Hope this helps.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 01:37 AM
Frantisek Hanzlik
 
Default Grub and logical partitions

Timothy Murphy wrote:
> Can grub boot from a logical partition?
>
> It seems from my reading that it cannot.
>
> But I found that I could in fact boot from /dev/sda5
> if I used grub interactively, starting with
> root (hd0,4)
> then using tab to look for kernel and initrd
> and finally booting.
>
> However, if I put exactly the same commands in grub.conf
> the boot failed, with "File not found ...".
>
> (Nb I am not using LVM, sda5 is a logical partition
> within the extended partition sda4.)
>
> Can some guru explain this to me please.

I'm using legacy grub1 for booting from logical partitions (ext2/ext3
and now ext4) routinely long since early Fedora (maybe Redhat 7.x/8/9)
versions, already without problems.

But just now on F13 i686 I run across other, maybe similar problem:
I install it on /dev/sda8 (sda is 200GB SATA drive, DOS type partition
table, grub installed in MBR), installation passed OK. But when booting,
grub not print any error, but display stage2 message:

GNU GRUB version 0.97 (639K lower / 1047488K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.


It seems to me as if it could not find configfile. But, when I type
"root (hd0,7)" and "configfile /boot/grub/grub.conf" (or "configfile
/boot/grub/menu.lst"), then normally appears f13 grub splash screen with
menu items and after selecting one grub correctly boot it.

- reinstalling grub ( "root (hd0,7)" and then "setup [--force-lba]
(hd0)" does not help.

- when I restore grub for Fedora 12, which is installed on /dev/sda7 (in
same manner: "root (hd0,7)" and then "setup (hd0)" ), then grub works fine.

- only thing which hit me is about accessing files beyond 137 GB (28 bit
LBA limit), as sda8 partition lies at <117GB,144GB>. But - on other i686
PC I have F12 on /dev/sda10 (sda10 partition start on 128GB and ends at
148GB) and F13 on /dev/sda9, and both are bootable via grub1 without
problems. Moreover, I think, when there would be 28-bit addressing
problem, then nor handy specification should be successfull.

Some grub1 guru should be likely in Fedora/Redhat suite, as grub1 is
stated as legacy and isn't supported ?

Franta
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 01:51 AM
Frantisek Hanzlik
 
Default Grub and logical partitions

Frantisek Hanzlik wrote:
> Timothy Murphy wrote:
>> Can grub boot from a logical partition?
>>
>> It seems from my reading that it cannot.
>>
>> But I found that I could in fact boot from /dev/sda5
>> if I used grub interactively, starting with
>> root (hd0,4)
>> then using tab to look for kernel and initrd
>> and finally booting.
>>
>> However, if I put exactly the same commands in grub.conf
>> the boot failed, with "File not found ...".
>>
>> (Nb I am not using LVM, sda5 is a logical partition
>> within the extended partition sda4.)
>>
>> Can some guru explain this to me please.
>
> I'm using legacy grub1 for booting from logical partitions (ext2/ext3
> and now ext4) routinely long since early Fedora (maybe Redhat 7.x/8/9)
> versions, already without problems.
>
> But just now on F13 i686 I run across other, maybe similar problem:
> I install it on /dev/sda8 (sda is 200GB SATA drive, DOS type partition
> table, grub installed in MBR), installation passed OK. But when booting,
> grub not print any error, but display stage2 message:
>
> GNU GRUB version 0.97 (639K lower / 1047488K upper memory)
>
> [ Minimal BASH-like line editing is supported. For the first word, TAB
> lists possible command completions. Anywhere else TAB lists the possible
> completions of a device/filename.
>
>
> It seems to me as if it could not find configfile. But, when I type
> "root (hd0,7)" and "configfile /boot/grub/grub.conf" (or "configfile
> /boot/grub/menu.lst"), then normally appears f13 grub splash screen with
> menu items and after selecting one grub correctly boot it.
>
> - reinstalling grub ( "root (hd0,7)" and then "setup [--force-lba]
> (hd0)" does not help.
>
> - when I restore grub for Fedora 12, which is installed on /dev/sda7 (in
> same manner: "root (hd0,7)" and then "setup (hd0)" ), then grub works fine.
>
> - only thing which hit me is about accessing files beyond 137 GB (28 bit
> LBA limit), as sda8 partition lies at<117GB,144GB>. But - on other i686
> PC I have F12 on /dev/sda10 (sda10 partition start on 128GB and ends at
> 148GB) and F13 on /dev/sda9, and both are bootable via grub1 without
> problems. Moreover, I think, when there would be 28-bit addressing
> problem, then nor handy specification should be successfull.
>
> Some grub1 guru should be likely in Fedora/Redhat suite, as grub1 is
> stated as legacy and isn't supported ?
>
> Franta

I forgot to tell - all my above mentioned Fedora installations occupies
one partition, I have no extra "/boot/" partitions.
Franta
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 01:56 AM
"Daniel B. Thurman"
 
Default Grub and logical partitions

On 07/30/2010 06:37 PM, Frantisek Hanzlik wrote:
> Timothy Murphy wrote:
>
>> Can grub boot from a logical partition?
>>
>> It seems from my reading that it cannot.
>>
>> But I found that I could in fact boot from /dev/sda5
>> if I used grub interactively, starting with
>> root (hd0,4)
>> then using tab to look for kernel and initrd
>> and finally booting.
>>
>> However, if I put exactly the same commands in grub.conf
>> the boot failed, with "File not found ...".
>>
>> (Nb I am not using LVM, sda5 is a logical partition
>> within the extended partition sda4.)
>>
>> Can some guru explain this to me please.
>>
> I'm using legacy grub1 for booting from logical partitions (ext2/ext3
> and now ext4) routinely long since early Fedora (maybe Redhat 7.x/8/9)
> versions, already without problems.
>
> But just now on F13 i686 I run across other, maybe similar problem:
> I install it on /dev/sda8 (sda is 200GB SATA drive, DOS type partition
> table, grub installed in MBR), installation passed OK. But when booting,
> grub not print any error, but display stage2 message:
>
> GNU GRUB version 0.97 (639K lower / 1047488K upper memory)
>
> [ Minimal BASH-like line editing is supported. For the first word, TAB
> lists possible command completions. Anywhere else TAB lists the possible
> completions of a device/filename.
>
>
> It seems to me as if it could not find configfile. But, when I type
> "root (hd0,7)" and "configfile /boot/grub/grub.conf" (or "configfile
> /boot/grub/menu.lst"), then normally appears f13 grub splash screen with
> menu items and after selecting one grub correctly boot it.
>
> - reinstalling grub ( "root (hd0,7)" and then "setup [--force-lba]
> (hd0)" does not help.
>
> - when I restore grub for Fedora 12, which is installed on /dev/sda7 (in
> same manner: "root (hd0,7)" and then "setup (hd0)" ), then grub works fine.
>
> - only thing which hit me is about accessing files beyond 137 GB (28 bit
> LBA limit), as sda8 partition lies at <117GB,144GB>. But - on other i686
> PC I have F12 on /dev/sda10 (sda10 partition start on 128GB and ends at
> 148GB) and F13 on /dev/sda9, and both are bootable via grub1 without
> problems. Moreover, I think, when there would be 28-bit addressing
> problem, then nor handy specification should be successfull.
>
> Some grub1 guru should be likely in Fedora/Redhat suite, as grub1 is
> stated as legacy and isn't supported ?
>
> Franta
>
I did not state it in my previous thread, but I am using 2 TiB drives
which is well beyond the boundary - also - I have windows 2k, XP,
and Vista (no problems) but very special care must be taken into
consideration dealing with w2K - but that is legacy anyway.

As for grub2, grub1 does boot grub2, so as long as the MBR for
that grub2 boot partition is MBR set, but as it is, it is hard to figure
out just how to do this manually, as I was only able to install MBR for
the grub2 boot partition via Ubuntu's LiveCD installer and have yet to
learn from the Ubuntu community just how to do that.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 02:00 AM
"Daniel B. Thurman"
 
Default Grub and logical partitions

On 07/30/2010 06:51 PM, Frantisek Hanzlik wrote:
> Frantisek Hanzlik wrote:
>
>> Timothy Murphy wrote:
>>
>>> Can grub boot from a logical partition?
>>>
>>> It seems from my reading that it cannot.
>>>
>>> But I found that I could in fact boot from /dev/sda5
>>> if I used grub interactively, starting with
>>> root (hd0,4)
>>> then using tab to look for kernel and initrd
>>> and finally booting.
>>>
>>> However, if I put exactly the same commands in grub.conf
>>> the boot failed, with "File not found ...".
>>>
>>> (Nb I am not using LVM, sda5 is a logical partition
>>> within the extended partition sda4.)
>>>
>>> Can some guru explain this to me please.
>>>
>> I'm using legacy grub1 for booting from logical partitions (ext2/ext3
>> and now ext4) routinely long since early Fedora (maybe Redhat 7.x/8/9)
>> versions, already without problems.
>>
>> But just now on F13 i686 I run across other, maybe similar problem:
>> I install it on /dev/sda8 (sda is 200GB SATA drive, DOS type partition
>> table, grub installed in MBR), installation passed OK. But when booting,
>> grub not print any error, but display stage2 message:
>>
>> GNU GRUB version 0.97 (639K lower / 1047488K upper memory)
>>
>> [ Minimal BASH-like line editing is supported. For the first word, TAB
>> lists possible command completions. Anywhere else TAB lists the possible
>> completions of a device/filename.
>>
>>
>> It seems to me as if it could not find configfile. But, when I type
>> "root (hd0,7)" and "configfile /boot/grub/grub.conf" (or "configfile
>> /boot/grub/menu.lst"), then normally appears f13 grub splash screen with
>> menu items and after selecting one grub correctly boot it.
>>
>> - reinstalling grub ( "root (hd0,7)" and then "setup [--force-lba]
>> (hd0)" does not help.
>>
>> - when I restore grub for Fedora 12, which is installed on /dev/sda7 (in
>> same manner: "root (hd0,7)" and then "setup (hd0)" ), then grub works fine.
>>
>> - only thing which hit me is about accessing files beyond 137 GB (28 bit
>> LBA limit), as sda8 partition lies at<117GB,144GB>. But - on other i686
>> PC I have F12 on /dev/sda10 (sda10 partition start on 128GB and ends at
>> 148GB) and F13 on /dev/sda9, and both are bootable via grub1 without
>> problems. Moreover, I think, when there would be 28-bit addressing
>> problem, then nor handy specification should be successfull.
>>
>> Some grub1 guru should be likely in Fedora/Redhat suite, as grub1 is
>> stated as legacy and isn't supported ?
>>
>> Franta
>>
> I forgot to tell - all my above mentioned Fedora installations occupies
> one partition, I have no extra "/boot/" partitions.
> Franta
>
Well, I used a separate /boot partition because in the past somehow,
grub or partition MBR got lost when something changed via an update.
Maybe this a non-issue by now?

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 02:24 AM
Frantisek Hanzlik
 
Default Grub and logical partitions

Daniel B. Thurman wrote:
> Well, I used a separate /boot partition because in the past somehow,
> grub or partition MBR got lost when something changed via an update.
> Maybe this a non-issue by now?
>

I never met with it. But I never use LVM or device-mapper logical
devices, only plain or md ones (and HW RAIDs, but it isn't probably
essential)
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 08:41 AM
Michael Schwendt
 
Default Grub and logical partitions

On Fri, 30 Jul 2010 18:33:53 -0700, Daniel wrote:

> On 07/30/2010 03:21 PM, Timothy Murphy wrote:
> > Can grub boot from a logical partition?
> >
> > It seems from my reading that it cannot.

It can.

> > But I found that I could in fact boot from /dev/sda5
> > if I used grub interactively, starting with
> > root (hd0,4)
> > then using tab to look for kernel and initrd
> > and finally booting.
> >
> > However, if I put exactly the same commands in grub.conf
> > the boot failed, with "File not found ...".
> >
> > (Nb I am not using LVM, sda5 is a logical partition
> > within the extended partition sda4.)
> >
> > Can some guru explain this to me please.
> >
> >
> It can if you set the MBR for each boot partition.

Be careful here. There is only one Master Boot Record. By definition, the
MBR is the first sector of the storage medium, which also holds the
partition table and is located in front of the first partition. What you
refer to is the Partition Boot Sector, the first sector of a partition.

> For example:
>
> #grub
> grub> find /grub/stage1
> hd0,4
> hd0,6
> hd0,8
>
> In my setup, 4 is a front-end, MBR for the
> entire drive and the boot partition has a single
> grub directory with all of the stages, splash, grub.conf
> and no kernel/initrc/mem/etc., nothing above the grub
> directory. Just make sure that the grub directory is the
> latest grub that supports ext4. The grub.conf file
> contains only chainloaders such as:
>
> title Fedora 13
> rootnoverify (hd0,6)
> chainloader +1
> savedefault
>
> title Ubuntu 10
> rootnoverify (hd0,8)
> chainloader +1
> savedefault

'rootnoverify' should only be necessary, if the primary GRUB doesn't
understand the filesystem used on the chainloaded partition.
If the MBR's GRUB is a recent one like from Fedora 13 or Rawhide,
you can use 'root' instead of 'rootnoverify'.

'savedefault' in a GRUB example without explaining it is not good.
It is not needed.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 11:16 AM
Timothy Murphy
 
Default Grub and logical partitions

Michael Schwendt wrote:

>> > Can grub boot from a logical partition?
>> >
>> > It seems from my reading that it cannot.
>
> It can.

Well, I know it can, since I described (below)
exactly how I did it.

But what puzzles me - and none of the gurus in this thread
seem to have answered my question -
is that I can do it interactively,
but when I put exactly the same commands into grub.conf
they do not work.

WHY IS THIS?

I'm using the standard grub in a standard up-to-date Fedora-13.

>> > But I found that I could in fact boot from /dev/sda5
>> > if I used grub interactively, starting with
>> > root (hd0,4)
>> > then using tab to look for kernel and initrd
>> > and finally booting.

Incidentally, you say it can be done.
So why not just give your stanza in grub.conf
that has the desired effect?



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-31-2010, 05:57 PM
Michael Schwendt
 
Default Grub and logical partitions

On Sat, 31 Jul 2010 13:16:10 +0200, Timothy wrote:

> But what puzzles me - and none of the gurus in this thread
> seem to have answered my question -

But of course! There was only one question mark in your message,
and the question in front of it has been answered.

> is that I can do it interactively,
> but when I put exactly the same commands into grub.conf
> they do not work.
>
> WHY IS THIS?

PEBKAC?

> I'm using the standard grub in a standard up-to-date Fedora-13.
>
> >> > But I found that I could in fact boot from /dev/sda5
> >> > if I used grub interactively, starting with
> >> > root (hd0,4)
> >> > then using tab to look for kernel and initrd
> >> > and finally booting.

Why don't you load the grub.conf from /dev/sda5 instead of loading
kernel and initrd manually?

And even that would not be "chain-loading" or "booting from a logical
partition". For either one, you would install a GRUB boot loader into
the first sector of /dev/sda5.

> Incidentally, you say it can be done.
> So why not just give your stanza in grub.conf
> that has the desired effect?

To boot /dev/sda5 from any GRUB, I do:

title SomeOS
root (hd0,4)
chainloader +1

That is under the assumption that /dev/sda5 contains a boot loader in
its first sector.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 07:59 AM.

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