LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2001, 05:03 AM   #1
kris.kj.jacobs
Member
 
Registered: Jun 2001
Location: Belgium
Distribution: Mandrake
Posts: 57

Rep: Reputation: 15

Dear reader,

Maybe you can help me with the following problem.

I'm trying to set up a software mirror on Mandrake 8.0 using two IDE-disks. I already consulted the Boot+Root+RAID-HOWTO and some mailing lists but I can't get it to work.

I always get the error message: 'Unable to mount root fs on ...'.

I've already several things but I can't get it to work. More details are included.

Please help.

Many thanks.

Kris

1/ Disk layout /dev/hda (fdisk -ul):

Disk /dev/hda: 255 heads, 63 sectors, 1245 cylinders
Units = sectors of 1 * 512 bytes

Device Start End Blocks Id System
/dev/hda1 63 64259 32098+ 83 Linux
/dev/hda2 64260 112454 24097+ 4 FAT16 <32M
/dev/hda3 112455 176714 32130 83 Linux
/dev/hda4 176715 20000924 9912105 f Win95 Ext'd (LBA)
/dev/hda5 176778 385559 104391 83 Linux

2/ Disk layout /dev/hdb (fdisk -ul):

Disk /dev/hdb: 255 heads, 63 sectors, 2434 cylinders
Units = sectors of 1 * 512 bytes

Device Start End Blocks Id System
/dev/hdb1 63 64259 32098+ 83 Linux
/dev/hdb2 64260 112454 24097+ 14 Hidden FAT16 <32M
/dev/hdb3 112455 176714 32130 83 Linux
/dev/hdb4 176715 39102209 19462747+ f Win95 Ext'd (LBA)
/dev/hdb5 176778 385559 104391 83 Linux

3/ Created 2 RAID-1 partitions (/etc/raidtab):

# BOOT
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hda1
raid-disk 0
device /dev/hdb1
raid-disk 1

# ROOT
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hda5
raid-disk 0
device /dev/hdb5
raid-disk 1

As you can see, root is /dev/md1 (/dev/hda5, /dev/hdb5) and boot is /dev/md0 (/dev/hda1, /dev/hdb1).

Commands executed:
mkraid /dev/md0
mkraid /dev/md1
newfs /dev/md0
newfs /dev/md1

4/ Copied the files from my old boot and root filesystems to the filesystems on the mirror.

5/ Modified /etc/fstab on raid device (/dev/md1):

/dev/md1 / ext2 defaults 1 1
/dev/md0 /boot ext2 defaults 1 2

5/ Created a new initrd-file (initrd-raid.img) containing the raid1 module:

mount /dev/md1 /tmp/mnt
mount /dev/md0 /tmp/mnt/boot
chroot /tmp/mnt
mount /dev/hda12 /usr
mkinitrd -v /boot/initrd-raid.img 2.4.3-20mdk

6/ Made a lilo.conf.hda-file in the chrooted environment with the following contents:

disk=/dev/md1
bios=0x80
sectors=63
heads=255
cylinders=1245
partition=/dev/md0
start=63
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
default=linux
keytable=/boot/be-latin1.klt
lba32
linear
prompt
timeout=50
message=/boot/message-graphic
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label=linux
root=/dev/md1
initrd=/boot/initrd-raid.img
append=" hdc=ide-scsi quiet"
vga=788
read-only

lilo -C /etc/lilo.conf.hda (also in chrooted env).

7/ Cleanup a bit (unmount, raidstop, etc.) and reboot.

Result: Unable to mount root fs.

I've tried several other things also:

Do an rdev on the kernel image (rdev vmlinuz /dev/md1).
Use real partition names in lilo.conf i.s.o. md-names.
Copy initrd-image to old /boot dir and do the lilo in the non-mirrored environment.
Comment out lba32 in lilo.conf.

 
Old 06-03-2001, 06:15 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
How 'bout setting up the RAID partitions as type 'fd' "Linux RAID Atuodetect"?

You appear to be loading the kernel as you can't find the root device (unable to mount root fs on ???) - ergo you found the /boot, correct?

It looks like you have 'boot=/dev/hda' - should boot be /dev/md0? ( I need to go back to lilo skool) or is the boot= just to tell lilo where to write the boot code?

And being that I am lazy I build RAID support into the kernel rather than as a module. It seems to make life less miserable.

I dunno... I don't set up RAID on my /boot. Too much hassle for no real benefit other than some boot redendancy. However all I can point to is the obligatory howto at section 4.11 as it has the most up-to-date info (stuff I didn't have on my SuSE 7.1)

http://www.ibiblio.org/pub/Linux/doc...TO.html#ss4.11

I usually just flip the /boot image to all my tiny hdX1 partitions and use lilo -r to stuff the mbr on each disk. A little laborious but easier than /boot RAID.

Your config makes my first attempt at a root RAID setup look a lot easier now.
 
Old 06-03-2001, 07:15 AM   #3
kris.kj.jacobs
Member
 
Registered: Jun 2001
Location: Belgium
Distribution: Mandrake
Posts: 57

Original Poster
Rep: Reputation: 15
Smile

Quote:
Originally posted by mcleodnine
How 'bout setting up the RAID partitions as type 'fd' "Linux RAID Atuodetect"?
That was the last missing part. It works fine now.

Quote:
It looks like you have 'boot=/dev/hda' - should boot be /dev/md0? ( I need to go back to lilo skool) or is the boot= just to tell lilo where to write the boot code?
The boot= is to tell lilo where to write the boot code. It has to be a device name of a "real" hard disk or partition.

Quote:
And being that I am lazy I build RAID support into the kernel rather than as a module. It seems to make life less miserable.
My opinion is that one should use the technology available. Due to the modular kernel, you don't have to recompile the kernel anymore. This is one of the things that scares of newbies.

Quote:
I dunno... I don't set up RAID on my /boot. Too much hassle for no real benefit other than some boot redendancy. However all I can point to is the obligatory howto at section 4.11 as it has the most up-to-date info (stuff I didn't have on my SuSE 7.1)

http://www.ibiblio.org/pub/Linux/doc...TO.html#ss4.11

I usually just flip the /boot image to all my tiny hdX1 partitions and use lilo -r to stuff the mbr on each disk. A little laborious but easier than /boot RAID.
I agree with that, but setting boot on the mirror just looked a bit more "professional" to me.

Quote:
Your config makes my first attempt at a root RAID setup look a lot easier now.
I got most of the information from the Boot+Root+RAID-HOWTO.

Many thanks.

Kris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Software RAID 1 from Existing Boot Drive johnwyles Linux - General 1 08-05-2005 11:42 AM
boot from software RAID 1 maenho Linux - Software 2 02-20-2005 03:41 AM
software RAID on the root partition spuzzzzzzz Linux - Hardware 5 08-12-2004 11:28 PM
Root on Software RAID cryptodev Linux - Software 0 04-16-2004 12:50 PM
Cannot boot from hdc with Software RAID 1 on RH 9.0 leo_tango Linux - General 3 12-19-2003 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration