* patch for [xfs, grub-probe -t fs] and a question about lvm
@ 2008-02-28 5:12 Adrian Migraso
2008-02-28 6:57 ` Bean
2008-02-28 7:11 ` Michael Guntsche
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Migraso @ 2008-02-28 5:12 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]
hi... can we add this patch... at least the first patch @ lines 249, i was trying to grub-probe the xfs filesystem under the lvm, and got some error...
Also,... i have been trying to use the lvm.mod with the grub, the problem is, my logical volumes are not detected by 'ls' command during grub resucue>
is lvm.mod ok?
can i have a peek of how grub2 works? I mean its flow... thanks guys...
--- 20080226/grub2/kern/disk.c 2008-02-08 12:22:51.000000000 +0000
+++ grub2/kern/disk.c 2008-02-26 15:58:58.000000000 +0000
@@ -246,7 +246,8 @@
for (dev = grub_disk_dev_list; dev; dev = dev->next)
{
- if ((dev->open) (raw, disk) == GRUB_ERR_NONE)
+ grub_errno = (dev->open) (raw, disk);
+ if (grub_errno == GRUB_ERR_NONE)
break;
else if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE)
grub_errno = GRUB_ERR_NONE;
@@ -364,7 +365,8 @@
grub_dprintf ("disk", "Reading `%s'...\n", disk->name);
/* First of all, check if the region is within the disk. */
- if (grub_disk_check_range (disk, §or, &offset, size) != GRUB_ERR_NONE)
+ grub_errno = grub_disk_check_range (disk, §or, &offset, size);
+ if (grub_errno != GRUB_ERR_NONE)
{
grub_error_push ();
grub_dprintf ("disk", "Read out of range: sector 0x%llx (%s).\n",
@@ -407,9 +409,9 @@
else
{
/* Otherwise read data from the disk actually. */
- if ((disk->dev->read) (disk, start_sector,
- GRUB_DISK_CACHE_SIZE, tmp_buf)
- != GRUB_ERR_NONE)
+ grub_errno = (disk->dev->read) (disk, start_sector,
+ GRUB_DISK_CACHE_SIZE, tmp_buf);
+ if (grub_errno != GRUB_ERR_NONE)
{
/* Uggh... Failed. Instead, just read necessary data. */
unsigned num;
[-- Attachment #2: Type: text/html, Size: 4030 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: patch for [xfs, grub-probe -t fs] and a question about lvm
2008-02-28 5:12 patch for [xfs, grub-probe -t fs] and a question about lvm Adrian Migraso
@ 2008-02-28 6:57 ` Bean
2008-02-28 7:11 ` Michael Guntsche
1 sibling, 0 replies; 3+ messages in thread
From: Bean @ 2008-02-28 6:57 UTC (permalink / raw)
To: The development of GRUB 2
On Thu, Feb 28, 2008 at 1:12 PM, Adrian Migraso
<adrian.migraso@outsourcing.ph> wrote:
>
>
> hi... can we add this patch... at least the first patch @ lines 249, i was
> trying to grub-probe the xfs filesystem under the lvm, and got some error...
>
> Also,... i have been trying to use the lvm.mod with the grub, the problem
> is, my logical volumes are not detected by 'ls' command during grub resucue>
>
> is lvm.mod ok?
>
> can i have a peek of how grub2 works? I mean its flow... thanks guys...
>
>
> --- 20080226/grub2/kern/disk.c 2008-02-08 12:22:51.000000000 +0000
> +++ grub2/kern/disk.c 2008-02-26 15:58:58.000000000 +0000
> @@ -246,7 +246,8 @@
>
> for (dev = grub_disk_dev_list; dev; dev = dev->next)
> {
> - if ((dev->open) (raw, disk) == GRUB_ERR_NONE)
> + grub_errno = (dev->open) (raw, disk);
> + if (grub_errno == GRUB_ERR_NONE)
> break;
> else if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE)
> grub_errno = GRUB_ERR_NONE;
> @@ -364,7 +365,8 @@
> grub_dprintf ("disk", "Reading `%s'...\n", disk->name);
>
> /* First of all, check if the region is within the disk. */
> - if (grub_disk_check_range (disk, §or, &offset, size) !=
> GRUB_ERR_NONE)
> + grub_errno = grub_disk_check_range (disk, §or, &offset, size);
> + if (grub_errno != GRUB_ERR_NONE)
> {
> grub_error_push ();
> grub_dprintf ("disk", "Read out of range: sector 0x%llx (%s).\n",
> @@ -407,9 +409,9 @@
> else
> {
> /* Otherwise read data from the disk actually. */
> - if ((disk->dev->read) (disk, start_sector,
> - GRUB_DISK_CACHE_SIZE, tmp_buf)
> - != GRUB_ERR_NONE)
> + grub_errno = (disk->dev->read) (disk, start_sector,
> + GRUB_DISK_CACHE_SIZE, tmp_buf);
> + if (grub_errno != GRUB_ERR_NONE)
> {
> /* Uggh... Failed. Instead, just read necessary data. */
> unsigned num;
It's generally not a good idea to set grub_errno directly, have you
got a reason to do so ?
--
Bean
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: patch for [xfs, grub-probe -t fs] and a question about lvm
2008-02-28 5:12 patch for [xfs, grub-probe -t fs] and a question about lvm Adrian Migraso
2008-02-28 6:57 ` Bean
@ 2008-02-28 7:11 ` Michael Guntsche
1 sibling, 0 replies; 3+ messages in thread
From: Michael Guntsche @ 2008-02-28 7:11 UTC (permalink / raw)
To: The development of GRUB 2
On Thu, 28 Feb 2008 13:12:08 +0800, "Adrian Migraso"
<adrian.migraso@outsourcing.ph> wrote:
<snip>
> Also,... i have been trying to use the lvm.mod with the grub, the problem
> is, my logical volumes are not detected by 'ls' command during grub
> resucue>
>
> is lvm.mod ok?
>
> can i have a peek of how grub2 works? I mean its flow... thanks guys...
FYI I boot off a LV with grub2 for months now without a problem. I am
running ext3 on it though but I do not think that XFS is the problem. For
testing purposes, do you see your LVs in grub-emu?
Kind regards,
Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-28 9:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 5:12 patch for [xfs, grub-probe -t fs] and a question about lvm Adrian Migraso
2008-02-28 6:57 ` Bean
2008-02-28 7:11 ` Michael Guntsche
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.