* Re: mbr-install for Raid 1 [not found] <20041005093440.2b639e71@zrr.local> @ 2004-10-05 9:08 ` Michael Tokarev 2004-10-05 9:39 ` Zeno R.R. Davatz ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Michael Tokarev @ 2004-10-05 9:08 UTC (permalink / raw) To: Zeno R.R. Davatz, RAID Linux [I'm getting quite some questions similar to this one -- so instead of replying to every and each, I'm posting to linux-raid@, to be able to refer to this post in the future... ;)] Zeno R.R. Davatz wrote: > Hi! > > I am just reading a post of yours regarding using 'install-mbr' for linux-raid. > > Something I do not understand about the post: > http://lists.debian.org/debian-testing/2004/04/msg00054.html > > is following: > "mark your boot raid partitions active...". What do you mean by that? Set the partitions (single partition on every disk) where your root raid device resides to be active with fdisk. > Do you mean to mark all the first partitions of all the disks /dev/sd[abcd]1 as boot with fdisk? Not necessary first ones, but it is simpler to have your root fs on first partition. Again, it is the root-raid partition that should be active. > In that case I would have to do install-mbr /dev/md0 --force No, you would have to use boot=/dev/md0 in your lilo.conf, and install-mbr /dev/sd[abcd]1. > Is that correct? Basically, the scenario is as follows. Standard mbr (master boot record) from mbr package (note lilo also have it, see lilo -M) is installed into standard place (where BIOS will expect it to be) into all your disks once (don't forget to install the same mbr when you plug new disk). The mbr code (it resides on the first sector of the disk) works by reading partition table, finding partition marked as "active" (or "boot" -- the same flag but different terminology), loading boot record from that partition and executing it. Mbr code is stable and you don't have to change it -- the first sector of your disks will never change. In contrast, you will do eg kernel upgrades and similar stuff, for which lilo boot tables needs to be refreshed, and that should be done on all disks (to be able to boot off any disk in case first one fails). For this to work, you set up lilo to write it's boot record into the device where your root filesystem is -- it is raid1 array created off all active (boot) partitions of all your disks. Lilo writes boot record into the beginning of md0, and raid code propagates that boot record into your disks, all of them -- remember, md0 is composed of active partitions on all your disks -- this is exactly the place where mbr code will look for the bootloader. So, you have the same mbr code on all your disks (installed once when you configure each disk), and "second-stage" boot record, installed by lilo into md0 and again propagated to all disks (into active or boot partition of each), which will be loaded by mbr -- this boot record will be updated -- on all disks -- when you re-run lilo. In case any disk fails, you have the same boot code and sequence on every other disk, so you could boot off any working, non-failed disk. But be warned -- boot (active) partition on every disk should be at the exactly same place, or else file offsets written by lilo will be valid for one disk but not valid for other. /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1 2004-10-05 9:08 ` mbr-install for Raid 1 Michael Tokarev @ 2004-10-05 9:39 ` Zeno R.R. Davatz 2004-10-05 13:47 ` Zeno R.R. Davatz 2004-10-06 8:56 ` mbr-install for Raid 1, rerun Lilo necessary? Zeno R.R. Davatz 2 siblings, 0 replies; 8+ messages in thread From: Zeno R.R. Davatz @ 2004-10-05 9:39 UTC (permalink / raw) To: Michael Tokarev; +Cc: linux-raid Hi! Thanks for your prompt and detailed response, I appreciate your time! I will post it on our website as well. I done as follows and get the following: On Tue, 05 Oct 2004 13:08:19 +0400 Michael Tokarev <mjt@tls.msk.ru> wrote: > No, you would have to use boot=/dev/md0 in your lilo.conf, > and install-mbr /dev/sd[abcd]1. Now when I boot, I get MBR FA: I hit A for 'Advanced', then I get: MBR 1234A: Then I hit '1' then I get: MBR MBR MBR FA: And nothing happens :-( Any hints? Thanks for your Feedback. Zeno ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1 2004-10-05 9:08 ` mbr-install for Raid 1 Michael Tokarev 2004-10-05 9:39 ` Zeno R.R. Davatz @ 2004-10-05 13:47 ` Zeno R.R. Davatz 2004-10-05 18:25 ` Bernd Fischer 2004-10-06 8:56 ` mbr-install for Raid 1, rerun Lilo necessary? Zeno R.R. Davatz 2 siblings, 1 reply; 8+ messages in thread From: Zeno R.R. Davatz @ 2004-10-05 13:47 UTC (permalink / raw) To: Michael Tokarev; +Cc: RAID Linux, Hannes Wyss Hi I am just thinking of one more problem that turned up. You suppose that I am running a RAID1 as you say I should install the boot-image of lilo to my root partition because Install-Mbr checks for it there. My problem: My Root-Partition is a RAID5. I would like to boot from a RAID1 and get my RAID5 going from there. Any hints? Zeno On Tue, 05 Oct 2004 13:08:19 +0400 Michael Tokarev <mjt@tls.msk.ru> wrote: > [I'm getting quite some questions similar to this > one -- so instead of replying to every and each, > I'm posting to linux-raid@, to be able to refer to > this post in the future... ;)] > > Zeno R.R. Davatz wrote: > > Hi! > > > > I am just reading a post of yours regarding using 'install-mbr' for linux-raid. > > > > Something I do not understand about the post: > > http://lists.debian.org/debian-testing/2004/04/msg00054.html > > > > is following: > > "mark your boot raid partitions active...". What do you mean by that? > > Set the partitions (single partition on every disk) where your root raid > device resides to be active with fdisk. > > > Do you mean to mark all the first partitions of all the disks /dev/sd[abcd]1 as boot with fdisk? > > Not necessary first ones, but it is simpler to have your root fs on > first partition. Again, it is the root-raid partition that should > be active. > > > In that case I would have to do install-mbr /dev/md0 --force > > No, you would have to use boot=/dev/md0 in your lilo.conf, > and install-mbr /dev/sd[abcd]1. > > > Is that correct? > > Basically, the scenario is as follows. > > Standard mbr (master boot record) from mbr package (note lilo also > have it, see lilo -M) is installed into standard place (where BIOS > will expect it to be) into all your disks once (don't forget to > install the same mbr when you plug new disk). The mbr code (it > resides on the first sector of the disk) works by reading partition > table, finding partition marked as "active" (or "boot" -- the same > flag but different terminology), loading boot record from that > partition and executing it. Mbr code is stable and you don't have > to change it -- the first sector of your disks will never change. > In contrast, you will do eg kernel upgrades and similar stuff, > for which lilo boot tables needs to be refreshed, and that should > be done on all disks (to be able to boot off any disk in case > first one fails). For this to work, you set up lilo to write > it's boot record into the device where your root filesystem is -- > it is raid1 array created off all active (boot) partitions of > all your disks. Lilo writes boot record into the beginning of > md0, and raid code propagates that boot record into your disks, > all of them -- remember, md0 is composed of active partitions > on all your disks -- this is exactly the place where mbr code > will look for the bootloader. > > So, you have the same mbr code on all your disks (installed > once when you configure each disk), and "second-stage" boot > record, installed by lilo into md0 and again propagated to > all disks (into active or boot partition of each), which will > be loaded by mbr -- this boot record will be updated -- on > all disks -- when you re-run lilo. In case any disk fails, > you have the same boot code and sequence on every other disk, > so you could boot off any working, non-failed disk. > > But be warned -- boot (active) partition on every disk should > be at the exactly same place, or else file offsets written by > lilo will be valid for one disk but not valid for other. > > /mjt > -- Mit freundlichen Grüssen / best regards Zeno Davatz Verkauf & Akquisition +41 1 350 85 86 www.ywesee.com > intellectual capital connected > www.oddb.org - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1 2004-10-05 13:47 ` Zeno R.R. Davatz @ 2004-10-05 18:25 ` Bernd Fischer 2004-10-06 5:59 ` mbr-install for Raid 1 with Root on Raid5 Zeno R.R. Davatz 0 siblings, 1 reply; 8+ messages in thread From: Bernd Fischer @ 2004-10-05 18:25 UTC (permalink / raw) To: RAID Linux; +Cc: Zeno R.R. Davatz Zeno R.R. Davatz wrote: > I am just thinking of one more problem that turned up. > You suppose that I am running a RAID1 as you say I should install the > boot-image of lilo to my root partition because Install-Mbr checks > for it there. My problem: My Root-Partition is a RAID5. I would like > to boot from a RAID1 and get my RAID5 going from there. Basically the same procedure. Just replace the words "root partition" with "boot partition" or "partition on which you install your kernel" in Michaels instructions. Bernd Fischer ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1 with Root on Raid5 2004-10-05 18:25 ` Bernd Fischer @ 2004-10-06 5:59 ` Zeno R.R. Davatz 0 siblings, 0 replies; 8+ messages in thread From: Zeno R.R. Davatz @ 2004-10-06 5:59 UTC (permalink / raw) To: RAID Linux; +Cc: Bernd Fischer, Hannes Wyss Bernd! thanks for your Mail, Time and Help. On Tue, 05 Oct 2004 20:25:02 +0200 Bernd Fischer wrote: > > You suppose that I am running a RAID1 as you say I should install the > > boot-image of lilo to my root partition because Install-Mbr checks > > for it there. My problem: My Root-Partition is a RAID5. I would like > > to boot from a RAID1 and get my RAID5 going from there. > > Basically the same procedure. Just replace the words "root partition" > with "boot partition" or "partition on which you install your kernel" in > Michaels instructions. I'm doing exactly that or at least I believe so. I run install-mbr -t 150 /dev/sda1 install-mbr -t 150 /dev/sdb1 install-mbr -t 150 /dev/sdc1 install-mbr -t 150 /dev/sdd1 then in lilo.conf I put boot = /dev/md0 root = /dev/md2 then I reboot and I get: MBR FA: (I hit 'A') MBR 1234F: (I hit '1') MBR MBR FA: .. and nothing boots. MBR just stands there forever. Any hints? Thanks for your Feedback. Zeno PS: Lilo can not write it's boot-image on RAID5, only on RAID1. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1, rerun Lilo necessary? 2004-10-05 9:08 ` mbr-install for Raid 1 Michael Tokarev 2004-10-05 9:39 ` Zeno R.R. Davatz 2004-10-05 13:47 ` Zeno R.R. Davatz @ 2004-10-06 8:56 ` Zeno R.R. Davatz 2004-10-06 16:16 ` Bernd Fischer 2 siblings, 1 reply; 8+ messages in thread From: Zeno R.R. Davatz @ 2004-10-06 8:56 UTC (permalink / raw) To: RAID Linux; +Cc: Michael Tokarev On Tue, 05 Oct 2004 13:08:19 +0400 Michael Tokarev <mjt@tls.msk.ru> wrote: > No, you would have to use boot=/dev/md0 in your lilo.conf, Do I have to run 'lilo -v' so lilo gets this? Because whenever I run lilo -v (22.5.8) with 'boot=/dev/md0 I get the wonderful Error of: Fatal: Trying to map files from unnamed device 0x0000 (NFS ?) Any hints? Thanks Zeno ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1, rerun Lilo necessary? 2004-10-06 8:56 ` mbr-install for Raid 1, rerun Lilo necessary? Zeno R.R. Davatz @ 2004-10-06 16:16 ` Bernd Fischer 2004-10-06 16:34 ` mbr-install for Raid 1, mdadm -a /dev/md0 /dev/sda1 Zeno R.R. Davatz 0 siblings, 1 reply; 8+ messages in thread From: Bernd Fischer @ 2004-10-06 16:16 UTC (permalink / raw) To: RAID Linux; +Cc: Zeno R.R. Davatz Zeno R.R. Davatz wrote: >> No, you would have to use boot=/dev/md0 in your lilo.conf, > Do I have to run 'lilo -v' so lilo gets this? As usual, you have to run lilo everytime you install a new kernel or edit lilo.conf > Because whenever I run lilo -v (22.5.8) with 'boot=/dev/md0 I get the wonderful Error of: > Fatal: Trying to map files from unnamed device 0x0000 (NFS ?) > Any hints? I had the same problem some time ago. AFAIR it went away when I updated to lilo 22.6 As a workaround, create a symlink to /dev/md0 ( e.g. /dev/MD0 ) and use this as your boot device in lilo.conf. Bernd Fischer ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mbr-install for Raid 1, mdadm -a /dev/md0 /dev/sda1 2004-10-06 16:16 ` Bernd Fischer @ 2004-10-06 16:34 ` Zeno R.R. Davatz 0 siblings, 0 replies; 8+ messages in thread From: Zeno R.R. Davatz @ 2004-10-06 16:34 UTC (permalink / raw) To: RAID Linux; +Cc: Bernd Fischer Hi Bernd Thanks for your prompt reply. On Wed, 06 Oct 2004 18:16:57 +0200 Bernd Fischer wrote: > Zeno R.R. Davatz wrote: > > >> No, you would have to use boot=/dev/md0 in your lilo.conf, > > > Do I have to run 'lilo -v' so lilo gets this? > > As usual, you have to run lilo everytime you install a new kernel or > edit lilo.conf > > > Because whenever I run lilo -v (22.5.8) with 'boot=/dev/md0 I get the wonderful Error of: > > Fatal: Trying to map files from unnamed device 0x0000 (NFS ?) > > > Any hints? > > I had the same problem some time ago. AFAIR it went away when I updated > to lilo 22.6 > As a workaround, create a symlink to /dev/md0 ( e.g. /dev/MD0 ) and use > this as your boot device in lilo.conf. I managed to boot my /dev/md2 (using find . -xdev | cpio -pm /mnt/newroot instead of cp -ax / /mnt/newroot to copy my system to Raid). Now I am doing 'mdadam -a /dev/md2 /dev/sda3' as next I would do 'mdadm -a /dev/md0 /dev/sda1' Will the lilo problem then vanish? Thanks for your Feedback. Zeno ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-06 16:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20041005093440.2b639e71@zrr.local>
2004-10-05 9:08 ` mbr-install for Raid 1 Michael Tokarev
2004-10-05 9:39 ` Zeno R.R. Davatz
2004-10-05 13:47 ` Zeno R.R. Davatz
2004-10-05 18:25 ` Bernd Fischer
2004-10-06 5:59 ` mbr-install for Raid 1 with Root on Raid5 Zeno R.R. Davatz
2004-10-06 8:56 ` mbr-install for Raid 1, rerun Lilo necessary? Zeno R.R. Davatz
2004-10-06 16:16 ` Bernd Fischer
2004-10-06 16:34 ` mbr-install for Raid 1, mdadm -a /dev/md0 /dev/sda1 Zeno R.R. Davatz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).