* Re: Making bootable SATA RAID1 array in Mandriva 2006
@ 2006-08-14 10:50 andy liebman
2006-08-15 11:48 ` Luca Berra
0 siblings, 1 reply; 13+ messages in thread
From: andy liebman @ 2006-08-14 10:50 UTC (permalink / raw)
To: linux-raid
Thanks for the reply, Luca
> On Sun, Aug 13, 2006 at 07:51:42PM -0400, andy liebman wrote:
>>-- I copied the contents of /dev/sda1 (/ partition) and /dev/sda6 (/home
>>partition) to /dev/sdb1 and /dev/sdb6 using rsync.
> this is not really important, but you should have used the raid devices
> as a target.
Sorry, I wrote this incorrectly. In my case, /dev/sdb1 = /dev/md1 and
/dev/sdb6 = /dev/md2. Remember, my md devices each have a drive missing
at this point. I had the mdX devices started and mounted, and I rsynced
from /dev/sda1 to /dev/md1, /dev/sda6 to /dev/md2.
>
>>-- I edited fstab and lilo.conf on the the RAID1 "/" partition so that
>>they would refer to /dev/md1
>>-- I ran chroot on the /dev/md1 partition
> did you mount /dev, /proc and /sys before chrooting?
> i.e
> mount --bind /dev /newroot/dev
> mount -t proc /proc /newroot/proc
> mount -t sysfs /sys /newroot/sys
Why do I have to do this? I haven't seen this in any "recipies". My
Linux setup only has three partitions: "/", swap, and "/home".
My experience with fixing bootloaders in the past is that I can boot up
with a LIVE CD or rescue disk, chroot say into /dev/sda and run lilo
right to fix the bootloader on /dev/sda. I do this when need to move my
OS drive from an IDE to SATA or back again.
I'm not sure I understand what you're saying about mounting /dev, /proc
and /sys.
Regards,
Andy Liebman
.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-14 10:50 Making bootable SATA RAID1 array in Mandriva 2006 andy liebman
@ 2006-08-15 11:48 ` Luca Berra
0 siblings, 0 replies; 13+ messages in thread
From: Luca Berra @ 2006-08-15 11:48 UTC (permalink / raw)
To: linux-raid
On Mon, Aug 14, 2006 at 06:50:30AM -0400, andy liebman wrote:
>>>-- I edited fstab and lilo.conf on the the RAID1 "/" partition so that
>>>they would refer to /dev/md1
>>>-- I ran chroot on the /dev/md1 partition
>>did you mount /dev, /proc and /sys before chrooting?
>>i.e
>>mount --bind /dev /newroot/dev
>>mount -t proc /proc /newroot/proc
>>mount -t sysfs /sys /newroot/sys
>
>Why do I have to do this? I haven't seen this in any "recipies". My
you need it because mkinitrd will need info from /proc and /sys to work
correctly and lilo will try to access /proc/partitions and /dev/md1 if
your /boot is on /dev/md1.
>Linux setup only has three partitions: "/", swap, and "/home".
/dev /proc and /sys are not disk based filesystems
/dev is a ram disk which is populated at runtime by udev
/proc and /sys are virtual filesystem that expose some of your hw and
kernel configuration to userspace
>I'm not sure I understand what you're saying about mounting /dev, /proc
>and /sys.
just run:
mount --bind /dev /newroot/dev
mount -t proc /proc /newroot/proc
mount -t sysfs /sys /newroot/sys
before chrooting
L.
btw, be sure to add "auto=yes" to the ARRAY lines in /etc/mdadm.conf
or you might find some arrays are not recognized after boot.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
@ 2006-08-16 13:12 andy liebman
2006-08-16 13:18 ` Mark Hahn
2006-08-16 14:35 ` Justin Piszcz
0 siblings, 2 replies; 13+ messages in thread
From: andy liebman @ 2006-08-16 13:12 UTC (permalink / raw)
To: bluca, linux-raid
>
>>I'm not sure I understand what you're saying about mounting /dev, /proc
>>and /sys.
>
> just run:
> mount --bind /dev /newroot/dev
> mount -t proc /proc /newroot/proc
> mount -t sysfs /sys /newroot/sys
> before chrooting
>
> L.
> btw, be sure to add "auto=yes" to the ARRAY lines in /etc/mdadm.conf
> or you might find some arrays are not recognized after boot.
>
> L.
Thank you Luca. That was helpful. I have a couple of other questions
about Mandriva and mkinitrd. They probably don't belong on this list.
But we're both here.
1) I am running a custom-compiled 2.6.16.20 kernel on Mandriva 2006.
When I run mkinitrd, I'm getting several messages "skip dups". Is that
anything to be concerned about? I googled that and can't find anything.
2) It seems the format of initrd's being made is cpio + gz. In other
words, if I want to inspect the initrd, I cannot use the technique that
I always used:
mkdir /tmp/initrd
cd initrd
cp /boot/newinitrd.img .
mv newinitrd.img newinitrd.ext2.gz
gunzip newinitrd.ext2.gz
mkdir mount
mount newinitrd.ext2 mount -o loop
That doesn't work anymore with the 2.6.16 kernel. Now I have to do:
mkdir /tmp/initrd
cd initrd
cp /boot/newinitrd.img .
mv newinitrd.img newinitrd.ext2.gz
gunzip newinitrd.ext2.gz
mkdir mount
cd mount
cpio -id < ../newinitrd.ext2
Does that make sense? Has the format changed for initrd's. I also
noticed that the new initrds have a script called "init" instead of
"linuxrc".
Andy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-16 13:12 andy liebman
@ 2006-08-16 13:18 ` Mark Hahn
2006-08-16 14:35 ` Justin Piszcz
1 sibling, 0 replies; 13+ messages in thread
From: Mark Hahn @ 2006-08-16 13:18 UTC (permalink / raw)
To: andy liebman; +Cc: linux-raid
> Does that make sense? Has the format changed for initrd's. I also noticed
> that the new initrds have a script called "init" instead of "linuxrc".
see Documentation/filesystems/ramfs-rootfs-initramfs.txt
in the kernel sources.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-16 13:12 andy liebman
2006-08-16 13:18 ` Mark Hahn
@ 2006-08-16 14:35 ` Justin Piszcz
2006-08-16 23:49 ` Nix
1 sibling, 1 reply; 13+ messages in thread
From: Justin Piszcz @ 2006-08-16 14:35 UTC (permalink / raw)
To: andy liebman; +Cc: bluca, linux-raid
-- snip --
If you are using a custom compiled kernel, why on earth would you want to
use an initrd?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-16 14:35 ` Justin Piszcz
@ 2006-08-16 23:49 ` Nix
0 siblings, 0 replies; 13+ messages in thread
From: Nix @ 2006-08-16 23:49 UTC (permalink / raw)
To: Justin Piszcz; +Cc: andy liebman, bluca, linux-raid
On 16 Aug 2006, Justin Piszcz murmured woefully:
>
> -- snip --
>
> If you are using a custom compiled kernel, why on earth would you want to use an initrd?
> -
> 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
Lack of understanding of initramfs? :) it's new and many distros don't
use it yet, so I can understand a bit of confusion.
Andy, you might want to look at
<http://linux-raid.osdl.org/index.php/RAID_Boot> for the initramfs setup
I use, based around uClibc and busybox. It can fsck-and-mount root
stored on RAID+LVM or on LVM alone, and with small adjustments should be
able to boot RAID alone with no LVM involved (I'll make those changes
shortly, I just haven't needed them myself).
--
`We're sysadmins. We deal with the inconceivable so often I can clearly
see the need to define levels of inconceivability.' --- Rik Steenwinkel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Making bootable SATA RAID1 array in Mandriva 2006
@ 2006-08-13 23:51 andy liebman
2006-08-14 8:17 ` Luca Berra
2006-08-14 13:39 ` Laurent Lesage
0 siblings, 2 replies; 13+ messages in thread
From: andy liebman @ 2006-08-13 23:51 UTC (permalink / raw)
To: linux-raid
Hi,
I have spent the better part of this weekend struggling to get a SATA
RAID1 array to boot in Mandriva 2006. I have read EVERYTHING I can find
that's related. I'm stuck. Maybe somebody can point me in the right
direction.
First, let me say it's not practical for me to compile all necessary
drivers into the kernel. I realize that might make like easier.
So, here's the story in summary:
-- I have a motherboard with an ICH5 SATA chipset
-- My normal Mandriva installation boots off of SATA (in real SATA mode,
not pretending to be IDE).
-- A while back, when I installed the bootloader on the single SATA
drive, I chose to put it in the MBR and NOT on the first partition (I
fear that might be part of the problem)
-- I added a second SATA drive, /dev/sdb, which came up fine.
-- I copied the partition layout from /dev/sda with sfdisk
-- I created two RAID1 devices from /dev/sdb1 and /dev/sdb6, with their
counterparts "missing" (using mdadm)
-- I formated the two md devices with ext3
-- I rebooted with a LIVE CD version of Mandriva
-- I copied the contents of /dev/sda1 (/ partition) and /dev/sda6 (/home
partition) to /dev/sdb1 and /dev/sdb6 using rsync.
-- I edited fstab and lilo.conf on the the RAID1 "/" partition so that
they would refer to /dev/md1
-- I ran chroot on the /dev/md1 partition
-- I set up an /etc/mdadm.conf file (using mdadm --detail
--scan>>/etc/mdadm.conf -- that's where Mandriva puts it)
-- I added to lilo.conf "raid-extra-boot= and tried both "mbr" and
"/dev/sda,/dev/sdb"
-- I ran mkinitrd and created a new initrd in /boot on /dev/md1. I got
an error about not finding the 3w_9xxx driver, but I don't need to load
that in the initrd anyway so I reran with --builtin=3w_9xxx so that
mkinitrd would skip that driver that I don't need.
BUT, after all of this, I get a bunch of errors when I try to run lilo:
Fatal: Trying to map files from unnamed device 0x0000
or
trying map files unnamed
I tried putting an MBR on /dev/sdb with:
lilo -M /dev/sdb
I tried booting without /dev/sda and of course there's no bootloader on
/dev/sdb so nothing happens.
Does anybody see a solution or see what I'm missing? Help would be
appreciated. I can't believe this is so complicated! :(
Regards,
Andy Liebman
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-13 23:51 andy liebman
@ 2006-08-14 8:17 ` Luca Berra
2006-08-14 10:34 ` Henrik Holst
2006-08-14 13:39 ` Laurent Lesage
1 sibling, 1 reply; 13+ messages in thread
From: Luca Berra @ 2006-08-14 8:17 UTC (permalink / raw)
To: linux-raid
On Sun, Aug 13, 2006 at 07:51:42PM -0400, andy liebman wrote:
>-- I copied the contents of /dev/sda1 (/ partition) and /dev/sda6 (/home
>partition) to /dev/sdb1 and /dev/sdb6 using rsync.
this is not really important, but you should have used the raid devices
as a target.
>-- I edited fstab and lilo.conf on the the RAID1 "/" partition so that
>they would refer to /dev/md1
>-- I ran chroot on the /dev/md1 partition
did you mount /dev, /proc and /sys before chrooting?
i.e
mount --bind /dev /newroot/dev
mount -t proc /proc /newroot/proc
mount -t sysfs /sys /newroot/sys
>-- I set up an /etc/mdadm.conf file (using mdadm --detail
>--scan>>/etc/mdadm.conf -- that's where Mandriva puts it)
>-- I added to lilo.conf "raid-extra-boot= and tried both "mbr" and
>"/dev/sda,/dev/sdb"
mbr should do
>-- I ran mkinitrd and created a new initrd in /boot on /dev/md1. I got
>an error about not finding the 3w_9xxx driver, but I don't need to load
>that in the initrd anyway so I reran with --builtin=3w_9xxx so that
>mkinitrd would skip that driver that I don't need.
>
>BUT, after all of this, I get a bunch of errors when I try to run lilo:
> Fatal: Trying to map files from unnamed device 0x0000
Regards,
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-14 8:17 ` Luca Berra
@ 2006-08-14 10:34 ` Henrik Holst
0 siblings, 0 replies; 13+ messages in thread
From: Henrik Holst @ 2006-08-14 10:34 UTC (permalink / raw)
To: linux-raid
Luca Berra wrote:
> On Sun, Aug 13, 2006 at 07:51:42PM -0400, andy liebman wrote:
>> -- I copied the contents of /dev/sda1 (/ partition) and /dev/sda6
>> (/home partition) to /dev/sdb1 and /dev/sdb6 using rsync.
> this is not really important, but you should have used the raid devices
> as a target.
Just a question. Did you copy the file system or the block device? I am
not familiar with rsync but I can think that it is a problem to sync the
file system so the block devices become 1:1 with each other.
Henrik Holst
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-13 23:51 andy liebman
2006-08-14 8:17 ` Luca Berra
@ 2006-08-14 13:39 ` Laurent Lesage
2006-08-14 14:52 ` andy liebman
1 sibling, 1 reply; 13+ messages in thread
From: Laurent Lesage @ 2006-08-14 13:39 UTC (permalink / raw)
To: linux-raid; +Cc: andy liebman
Hi Andy,
I did the same a few times (!) with a Debian stable. I found two pages
with "recipes" that were convenient to me. For what could be related to
you, I had to modify the "/etc/mkinirtd/mkinitrd.conf" file :
>
> If you are using a SATA drive you pay attention!
>
> edit /etc/mkinitrd/mkinitrd.conf and change:
>
> MODULES=most
>
> to
>
> ###MODULES=most
> MODULES=dep
>
> and
>
> ROOT=probe
>
> to
>
> ###ROOT=probe
> ROOT="/dev/md2 jfs"
>
> This tells init to use what it takes to boot off of a raid device not
> the /dev/sda device currently used.
(modify according to your specs) The first part (mo=dep) is not
mandatory (it just makes a smaller image), but the second is!
I took this form this page :
http://www.xtronics.com/reference/SATA-RAID-debian-for-2.6.html
this other page is useful if you want to use grub instead of lilo (but
part of it is about IDE drive, which is not useful here) :
http://www.epimetrics.com/topics/one-page?page_id=421&topic=Bit-head%20Stuff&page_topic_id=120
hope that helps.
Laurent
andy liebman wrote:
> Hi,
>
> I have spent the better part of this weekend struggling to get a SATA
> RAID1 array to boot in Mandriva 2006. I have read EVERYTHING I can
> find that's related. I'm stuck. Maybe somebody can point me in the
> right direction.
>
> First, let me say it's not practical for me to compile all necessary
> drivers into the kernel. I realize that might make like easier.
>
> So, here's the story in summary:
>
> -- I have a motherboard with an ICH5 SATA chipset
> -- My normal Mandriva installation boots off of SATA (in real SATA
> mode, not pretending to be IDE).
> -- A while back, when I installed the bootloader on the single SATA
> drive, I chose to put it in the MBR and NOT on the first partition (I
> fear that might be part of the problem)
> -- I added a second SATA drive, /dev/sdb, which came up fine.
> -- I copied the partition layout from /dev/sda with sfdisk
> -- I created two RAID1 devices from /dev/sdb1 and /dev/sdb6, with
> their counterparts "missing" (using mdadm)
> -- I formated the two md devices with ext3
> -- I rebooted with a LIVE CD version of Mandriva
> -- I copied the contents of /dev/sda1 (/ partition) and /dev/sda6
> (/home partition) to /dev/sdb1 and /dev/sdb6 using rsync.
> -- I edited fstab and lilo.conf on the the RAID1 "/" partition so that
> they would refer to /dev/md1
> -- I ran chroot on the /dev/md1 partition
> -- I set up an /etc/mdadm.conf file (using mdadm --detail
> --scan>>/etc/mdadm.conf -- that's where Mandriva puts it)
> -- I added to lilo.conf "raid-extra-boot= and tried both "mbr" and
> "/dev/sda,/dev/sdb"
> -- I ran mkinitrd and created a new initrd in /boot on /dev/md1. I
> got an error about not finding the 3w_9xxx driver, but I don't need to
> load that in the initrd anyway so I reran with --builtin=3w_9xxx so
> that mkinitrd would skip that driver that I don't need.
>
> BUT, after all of this, I get a bunch of errors when I try to run lilo:
> Fatal: Trying to map files from unnamed device 0x0000
>
> or
>
> trying map files unnamed
>
>
> I tried putting an MBR on /dev/sdb with:
> lilo -M /dev/sdb
>
> I tried booting without /dev/sda and of course there's no bootloader
> on /dev/sdb so nothing happens.
>
> Does anybody see a solution or see what I'm missing? Help would be
> appreciated. I can't believe this is so complicated! :(
>
> Regards,
> Andy Liebman
>
> -
> 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] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-14 13:39 ` Laurent Lesage
@ 2006-08-14 14:52 ` andy liebman
2006-08-14 15:13 ` Laurent Lesage
0 siblings, 1 reply; 13+ messages in thread
From: andy liebman @ 2006-08-14 14:52 UTC (permalink / raw)
To: laurent; +Cc: linux-raid
laurent@lesagepono.be wrote:
> Hi Andy,
>
> I did the same a few times (!) with a Debian stable. I found two pages
> with "recipes" that were convenient to me. For what could be related to
> you, I had to modify the "/etc/mkinirtd/mkinitrd.conf" file :
>>
>> If you are using a SATA drive you pay attention!
>>
>> edit /etc/mkinitrd/mkinitrd.conf and change:
>>
>> MODULES=most
>>
>> to
>>
>> ###MODULES=most
>> MODULES=dep
>>
>> and
>>
>> ROOT=probe
>>
>> to
>>
>> ###ROOT=probe
>> ROOT="/dev/md2 jfs"
>>
>> This tells init to use what it takes to boot off of a raid device not
>> the /dev/sda device currently used.
> (modify according to your specs) The first part (mo=dep) is not
> mandatory (it just makes a smaller image), but the second is!
>
Thank you Laurent. I saw that in the same "how to" document. The problem
is, Mandriva does NOT have a mkinitrd.conf.
I could create it, but I don't know if mkinitrd will use it! In
Mandriva, it probably just has to be in /etc/ if if's useful at all.
Andy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-14 14:52 ` andy liebman
@ 2006-08-14 15:13 ` Laurent Lesage
2006-08-15 11:57 ` Luca Berra
0 siblings, 1 reply; 13+ messages in thread
From: Laurent Lesage @ 2006-08-14 15:13 UTC (permalink / raw)
To: andy liebman; +Cc: linux-raid
Hi Andy,
there are options for the "mkinitrd" command, that are like the
parameters in "mkinitrd.conf" (this is the case in "Debian"). did you
use the -root=xxx option?
Laurent
andy liebman wrote:
> laurent@lesagepono.be wrote:
>> Hi Andy,
>>
>> I did the same a few times (!) with a Debian stable. I found two
>> pages with "recipes" that were convenient to me. For what could be
>> related to you, I had to modify the "/etc/mkinirtd/mkinitrd.conf" file :
>>>
>>> If you are using a SATA drive you pay attention!
>>>
>>> edit /etc/mkinitrd/mkinitrd.conf and change:
>>>
>>> MODULES=most
>>>
>>> to
>>>
>>> ###MODULES=most
>>> MODULES=dep
>>>
>>> and
>>>
>>> ROOT=probe
>>>
>>> to
>>>
>>> ###ROOT=probe
>>> ROOT="/dev/md2 jfs"
>>>
>>> This tells init to use what it takes to boot off of a raid device
>>> not the /dev/sda device currently used.
>> (modify according to your specs) The first part (mo=dep) is not
>> mandatory (it just makes a smaller image), but the second is!
>>
>
> Thank you Laurent. I saw that in the same "how to" document. The
> problem is, Mandriva does NOT have a mkinitrd.conf.
>
> I could create it, but I don't know if mkinitrd will use it! In
> Mandriva, it probably just has to be in /etc/ if if's useful at all.
>
> Andy
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Making bootable SATA RAID1 array in Mandriva 2006
2006-08-14 15:13 ` Laurent Lesage
@ 2006-08-15 11:57 ` Luca Berra
0 siblings, 0 replies; 13+ messages in thread
From: Luca Berra @ 2006-08-15 11:57 UTC (permalink / raw)
To: linux-raid
On Mon, Aug 14, 2006 at 05:13:47PM +0200, Laurent Lesage wrote:
>Hi Andy,
>
>there are options for the "mkinitrd" command, that are like the
>parameters in "mkinitrd.conf" (this is the case in "Debian"). did you
>use the -root=xxx option?
Laurent,
mkinitrd in debian and mandriva are two completely different beasts,
there is no relation between those two.
besides that, i believe that all Andy has to do for mkinitrd is mounting
/sys on the chroot before running mkinitrd.
there is no mkinitrd.conf on mandriva.
mkinitrd will use fstab to find the root filesystem, so the change Andy
did is correct.
and please, please, stop top-posting and try to quote relevant parts of
messages when answering, or the thread will become unreadable.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-08-16 23:49 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-14 10:50 Making bootable SATA RAID1 array in Mandriva 2006 andy liebman
2006-08-15 11:48 ` Luca Berra
-- strict thread matches above, loose matches on Subject: below --
2006-08-16 13:12 andy liebman
2006-08-16 13:18 ` Mark Hahn
2006-08-16 14:35 ` Justin Piszcz
2006-08-16 23:49 ` Nix
2006-08-13 23:51 andy liebman
2006-08-14 8:17 ` Luca Berra
2006-08-14 10:34 ` Henrik Holst
2006-08-14 13:39 ` Laurent Lesage
2006-08-14 14:52 ` andy liebman
2006-08-14 15:13 ` Laurent Lesage
2006-08-15 11:57 ` Luca Berra
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).