Re: Grub and raid

2008-02-05 Thread Lennart Sorensen
On Tue, Feb 05, 2008 at 08:02:49AM -0500, [EMAIL PROTECTED] wrote:
> Not even /boot?

/boot is part of / in that case.  You only make /boot seperate from / if
you have a good reason.  If you make / be LVM then you need /boot
seperate outside LVM if using grub 0.97 (which most people do).  Some
old systems (and a few current broken ones) limited the bios functions
to the first 1024 cylinders of a disk, in which case /boot had to be at
the start of the disk to allow the boot loader to work, after which the
kernel took over and didn't have the limitations of the bios to worry
about.  Most people fortunately don't have to worry about that one
anymore.

> So here / is in LVM but /boot outside?

Yep.  In general I have kept / outside LVM just in case something screws
up, so that I have a reasonably functional system to use to recover LVM.
WIth / in LVM you need to work within the initrd environment, or perhaps
using a livecd to recover which can be a bit of a pain.

> > 
> > I am in the middle of installing a machine with new disks where I have
> > done this:
> > 
> > raid1 / using
> > sda1 25G
> > sdb1 25G
> > raid1 /home using
> > sdc1 25G
> > sdd1 25G
> > raid5 LVM using
> > sda2 475G
> > sdb2 475G
> > sdc2 475G
> > sdd2 475G
> > 
> > LVM contains swap and /var since I will be using it mainly for mythtv
> > which stores piles of stuff in /var.  I didn't allocate all the LVM
> > space yet so I have 200G free for other stuff if I think of something.
> 
> Ah!  To have free space!  I thought 250G was pretty big when I set it up two 
> years ago.

Well the machine it is updating has a raid1 with a pair of 320G.  I
thought those were big 18 months ago.

--
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-05 Thread hendrik
On Mon, Feb 04, 2008 at 12:13:11PM -0500, Lennart Sorensen wrote:
> On Mon, Feb 04, 2008 at 10:18:13AM -0500, [EMAIL PROTECTED] wrote:
> > I have almost all of my system on LVM/RAID1, with only a 2G paritition
> > outside of LVM/RAID on each of my two disks.
> > 
> > That's the one I boot from, using grub.
> > 
> > The LVM space used to have just the user data, but reently I've had to move 
> > /usr into 
> > LVM space too because the 2G became crowded.
> > 
> > What I'd like to know (running Debain etch, but will upgrade to lenny when 
> > that 
> > becomes stable) is:
> > 
> > Which of the top-level file systems have to be outside LVM storage when 
> > booting from 
> > grub?
> 
> I have generally myself used / outside LVM and nothing else.

Not even /boot?

> I did
> recently setup one install with only /boot outside LVM and it worked
> fine.

So here / is in LVM but /boot outside?

> 
> I am in the middle of installing a machine with new disks where I have
> done this:
> 
> raid1 / using
> sda1 25G
> sdb1 25G
> raid1 /home using
> sdc1 25G
> sdd1 25G
> raid5 LVM using
> sda2 475G
> sdb2 475G
> sdc2 475G
> sdd2 475G
> 
> LVM contains swap and /var since I will be using it mainly for mythtv
> which stores piles of stuff in /var.  I didn't allocate all the LVM
> space yet so I have 200G free for other stuff if I think of something.

Ah!  To have free space!  I thought 250G was pretty big when I set it up two 
years ago.

-- hendrik


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-04 Thread Lennart Sorensen
On Mon, Feb 04, 2008 at 10:18:13AM -0500, [EMAIL PROTECTED] wrote:
> I have almost all of my system on LVM/RAID1, with only a 2G paritition
> outside of LVM/RAID on each of my two disks.
> 
> That's the one I boot from, using grub.
> 
> The LVM space used to have just the user data, but reently I've had to move 
> /usr into 
> LVM space too because the 2G became crowded.
> 
> What I'd like to know (running Debain etch, but will upgrade to lenny when 
> that 
> becomes stable) is:
> 
> Which of the top-level file systems have to be outside LVM storage when 
> booting from 
> grub?

I have generally myself used / outside LVM and nothing else.  I did
recently setup one install with only /boot outside LVM and it worked
fine.

I am in the middle of installing a machine with new disks where I have
done this:

raid1 / using
sda1 25G
sdb1 25G
raid1 /home using
sdc1 25G
sdd1 25G
raid5 LVM using
sda2 475G
sdb2 475G
sdc2 475G
sdd2 475G

LVM contains swap and /var since I will be using it mainly for mythtv
which stores piles of stuff in /var.  I didn't allocate all the LVM
space yet so I have 200G free for other stuff if I think of something.

--
Len SOrensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-04 Thread hendrik
On Mon, Feb 04, 2008 at 09:53:54AM -0500, Lennart Sorensen wrote:
> 
> Well grub 0.97 doesn't do LVM at all, and as for raid it doesn't have a
> clue but simply relies on the fact you can read a raid1 device
> independantly of it's clone.  grub2 (1.95 and higher) does support LVM,
> and possibly raid other than raid1 (I haven't checked if raid support
> has been updated).
> 

I have almost all of my system on LVM/RAID1, with only a 2G paritition
outside of LVM/RAID on each of my two disks.

That's the one I boot from, using grub.

The LVM space used to have just the user data, but reently I've had to move 
/usr into 
LVM space too because the 2G became crowded.

What I'd like to know (running Debain etch, but will upgrade to lenny when that 
becomes stable) is:

Which of the top-level file systems have to be outside LVM storage when booting 
from 
grub?

-- hendrik


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid (Solved)

2008-02-04 Thread Gudjon I. Gudjonsson
Hi
   Thank you all for very through answers. The problem was very strange. I
had to disable the "ACPI APIC Support" in BIOS. Then I could run
grub-install but the computer then lost interrupt to hda (CDROM) and
also interrupts to the hard drives. With Grub installed, I could enable
this option again and now everything works.
   Before this change I used to boot with the install CD and make a chroot
to the installed system with the dev and proc directories rbind
mounted. Then I tried to run X. I got kdm working but if I tried to log
in, the computer went into sleeping mode. After the procedure described
above, I can switch between console and X mode without any problem.
   This looks quite like black magic to me but I hope to understand it
someday :)

Thanks again
Gudjon



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-04 Thread Lennart Sorensen
On Sun, Feb 03, 2008 at 01:22:43PM -0800, Alex Malinovich wrote:
> Stage 1 is the portion of GRUB that is stored in the MBR itself. When
> you install grub it copies stage 1 from the filesystem into the MBR. So
> a stage 1 error would indicate that either the file that was used for
> writing it is corrupt, as Marcus suggests, or that the data in the MBR
> was corrupted either during or after writing somehow. Most commonly this
> will happen if you use tools that like to mess with your MBR, most
> notably if you still have LILO installed, or if you happen to do certain
> operation from a Windows partition or a Windows install disk.
> 
> I do remember hearing that software RAID uses the MBR for some things as
> well so this could very well be the problem, but I know very little
> about it as I don't use it myself.

Well if you run raid directly on the raw device with no partition table,
then yes there could be a problem.  If however you make partitions and
use those for raid, then there is no problem since the raid will stay
entirely inside the partition.  Using partitions is of course the normal
and recommended method.

> One thing that might help you with troubleshooting is a brief breakdown
> of the various GRUB stages and what they do.
> 
> http://en.wikipedia.org/wiki/GNU_GRUB#Boot_process
> http://www.phrack.org/issues.html?issue=63&id=10&mode=txt
> 
> In a nutshell:
> 
> stage1: The core GRUB functionality stored in the MBR. (512 bytes)
> 
> stage1.5: (optional) stage1.5 is only written if it is necessary, and it
> goes into the extended area after the MBR. (30KB) If you're using a
> filesystem that can't be relied upon to store a file as an easily
> readable block on disk (i.e. pretty much every FS other than ext2/3),
> then you need 1.5. Loading 1.5 loads actual filesystem drivers as well
> as extended device drivers for things like LVM and, I would assume,
> software RAID as well.

Well grub 0.97 doesn't do LVM at all, and as for raid it doesn't have a
clue but simply relies on the fact you can read a raid1 device
independantly of it's clone.  grub2 (1.95 and higher) does support LVM,
and possibly raid other than raid1 (I haven't checked if raid support
has been updated).

> stage2: This is the full GRUB functionality. This is the portion that
> actually lives on your boot partition and needs to have the original
> file around. (You can, if you choose, delete the files stage1, and
> stage1.5 from disk after installing GRUB, but stage 2 must stay there.)
> This is the portion that does most of the heavy lifting, loads the
> menu.lst, etc.
> 
> Hope that helps. Wish I knew more about software RAID in the hopes of
> being more helpful, but I've never had need to use it. (I use hardware
> RAID boards.)

--
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-03 Thread Alex Malinovich
On Sun, 2008-02-03 at 14:24 +0100, Marcus Beranek wrote:
> Am Sonntag, den 03.02.2008, 12:38 +0100 schrieb Gudjon I. Gudjonsson:
> > Hi again
> >Thanks for the answers but there seems to be a problem with Grub. The
> > device map is OK but when installing GRUB it stops with the message
> > Error reading stage1
> 
> Just a guess: maybe the file "stage1" on the disk is corrupted?

Stage 1 is the portion of GRUB that is stored in the MBR itself. When
you install grub it copies stage 1 from the filesystem into the MBR. So
a stage 1 error would indicate that either the file that was used for
writing it is corrupt, as Marcus suggests, or that the data in the MBR
was corrupted either during or after writing somehow. Most commonly this
will happen if you use tools that like to mess with your MBR, most
notably if you still have LILO installed, or if you happen to do certain
operation from a Windows partition or a Windows install disk.

I do remember hearing that software RAID uses the MBR for some things as
well so this could very well be the problem, but I know very little
about it as I don't use it myself.

One thing that might help you with troubleshooting is a brief breakdown
of the various GRUB stages and what they do.

http://en.wikipedia.org/wiki/GNU_GRUB#Boot_process
http://www.phrack.org/issues.html?issue=63&id=10&mode=txt

In a nutshell:

stage1: The core GRUB functionality stored in the MBR. (512 bytes)

stage1.5: (optional) stage1.5 is only written if it is necessary, and it
goes into the extended area after the MBR. (30KB) If you're using a
filesystem that can't be relied upon to store a file as an easily
readable block on disk (i.e. pretty much every FS other than ext2/3),
then you need 1.5. Loading 1.5 loads actual filesystem drivers as well
as extended device drivers for things like LVM and, I would assume,
software RAID as well.

stage2: This is the full GRUB functionality. This is the portion that
actually lives on your boot partition and needs to have the original
file around. (You can, if you choose, delete the files stage1, and
stage1.5 from disk after installing GRUB, but stage 2 must stay there.)
This is the portion that does most of the heavy lifting, loads the
menu.lst, etc.

Hope that helps. Wish I knew more about software RAID in the hopes of
being more helpful, but I've never had need to use it. (I use hardware
RAID boards.)

-- 
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837



signature.asc
Description: This is a digitally signed message part


Re: Grub and raid

2008-02-03 Thread Marcus Beranek
Am Sonntag, den 03.02.2008, 12:38 +0100 schrieb Gudjon I. Gudjonsson:
> Hi again
>Thanks for the answers but there seems to be a problem with Grub. The
> device map is OK but when installing GRUB it stops with the message
> Error reading stage1

Just a guess: maybe the file "stage1" on the disk is corrupted?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-03 Thread Gudjon I. Gudjonsson
Hi again
   Thanks for the answers but there seems to be a problem with Grub. The
device map is OK but when installing GRUB it stops with the message
Error reading stage1
I tried to make a boot CDROM. It starts booting the kernel but then the
computer restarts. Has anyone tried the CDROM from grub-rescue-pc?

Is it possible that I have to switch to GRUB2?

Thanks
Gudjon

PS. Sorry. I have a huge time press on my right now. I could have searched
the internet better for solutions.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-03 Thread Gudjon I. Gudjonsson
Hi again
   Thanks for the answers but there seems to be a problem with Grub. The
device map is OK but when installing GRUB it stops with the message
Error reading stage1
I tried to make a boot CDROM. It starts booting the kernel but then the
computer restarts. Has anyone tried the CDROM from grub-rescue-pc?

Is it possible that I have to switch to GRUB2?

Is there any way to boot the machine from a CD and let it switch to the
hard drive automatically as a last solution?

Thanks
Gudjon

PS. Sorry. I have a huge time press on my right now. I could have searched
the internet better for solutions.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-01 Thread Jack Malmostoso
On Fri, 01 Feb 2008 23:30:21 +0100, Gudjon I. Gudjonsson wrote:

> But
> anyway, is there any unknown trick in making a computer with two raid1
> SATA disks boot with Grub?

I have two SATA disks on a nForce4 motherboard in RAID1, and boot happily 
with Grub. The RAID was set up during installation and it is:

/dev/md0: /dev/sda1 + /dev/sdb1 --> /
/dev/md1: /dev/sda2 + /dev/sdb2 --> swap
/dev/md2: /dev/sda3 + /dev/sdb3 --> /home

Grub is installed on both disks, removing one does not prevent the system 
to be booted.
My device.map is:

[EMAIL PROTECTED]:~$ cat /boot/grub/device.map 
(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/sdb

See if yours is different.

-- 
Best Regards, Jack
Linux User #264449
Powered by Debian GNU/Linux on AMD64


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-01 Thread Marcus Beranek
Am Freitag, den 01.02.2008, 23:19 +0100 schrieb Gudjon I. Gudjonsson:
> Hi
>I am using a 64 bit computer but the problem might be general. But
> anyway, is there any unknown trick in making a computer with two raid1
> SATA disks boot with Grub?
> [...]

Hi,

have a look at:
http://www.planamente.ch/emidio/pages/linux_howto_root_lvm_raid_etch.php#3.3
http://www.gentoo.org/doc/de/gentoo-x86-tipsntricks.xml#software-raid
http://wiki.debian.org/SataRaid

These are generic instructions for installing a software-raid and GRUB.
I think, the problem is not related to 64 bits... 

HTH,
Marcus


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Grub and raid

2008-02-01 Thread Jack Schneider


>-Original Message-
>From: Gudjon I. Gudjonsson [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 1, 2008 04:19 PM
>To: debian-amd64@lists.debian.org
>Subject: Grub and raid
>
>Hi
> I am using a 64 bit computer but the problem might be general. But
>anyway, is there any unknown trick in making a computer with two raid1
>SATA disks boot with Grub?
>
>I can mount /dev/md* when I boot the system on the install CD but I am
>unable to install grub on /dev/sda nor /dev/sdb.
>
>Thanks
>Gudjon
>
>
>-- 
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>
Look at this link. It allowed me to do a rock solid install with grub..
http://www.debian-administration.org/articles/512
 YMMV.

Good luck.




Grub and raid

2008-02-01 Thread Gudjon I. Gudjonsson
Hi
   I am using a 64 bit computer but the problem might be general. But
anyway, is there any unknown trick in making a computer with two raid1
SATA disks boot with Grub?

I can mount /dev/md* when I boot the system on the install CD but I am
unable to install grub on /dev/sda nor /dev/sdb.

Thanks
Gudjon


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]