Skip to contentSkip to conversation

Making bootable SATA RAID1 array in Mandriva 2006

DISCUSSION andy liebman 2 participants 2 messages Aug 14, 2006 – Aug 15, 2006 MD RAID

lore
Share & tools
lore
#0 lore raw

Thanks for the reply, Luca

Quoted 5 lines · andy liebman
Quoted 2 lines

-- 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.

Quoted 9 lines
Quoted 4 lines

-- 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
.

#1 lore raw
Quoted 10 lines · andy liebman
Quoted 8 lines
Quoted 3 lines

-- 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.

Quoted 1 line

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

Quoted 1 line

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.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \