Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]: Linear RAID install: /sbin/lilo fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Tue Jul 26, 2005 9:03 pm    Post subject: [SOLVED]: Linear RAID install: /sbin/lilo fails Reply with quote

Hi, ALL,
I have a very interesting problem (for me anyway)..... :)
And by searching the forums I couldn't find the answer, so, here we go:

I am installing the Gentoo with the RAID Linear support. I have2 hard drives, and I broke them as follows:

Code:

/dev/hda1     83     Linux                 *
/dev/hda2     82     Linux swap
/dev/hda3     fd      raid autodetect

/dev/hdb1     82     Linux swap
/dev/hdb2     fd      raid autodetect


I followed thru the installation using the RAID Linear mode on the Advanced Installation->Software RAID, RAID Linear Mode one of the threads on the forum about installing Gentoo on the software RAID. I issued the correct command with the corect RAID option.

The installation went smoothly, there was no problem at all. However at the very last step, after isuing the command:
"/sbin/lilo",

I got following error:

Code:

livecd   linux   # /sbin/lilo
Warning: '/proc/partitions' does not match '/dev/ directory structure
    Name change: '/dev/md0' -> '/dev/md0'
Fatal: Illegal 'root=' specification '/dev/md0'


Everything was compiled fine. It's just this small problem.
Now, every single thread here, and even an installation HOWTO are talking about RAID-1,2, etc with the GRUB. My configuration is a litle bit different: I am using RAID linear mode with the LILO.

My /etc/fstab looks like this:

Code:

/dev/hda1       /boot       ext2
/dev/hda2       none        swap
/dev/hdb1       none        swap
/dev/md0        /             ext3


My lilo.conf file looks like this:

Code:

boot=/dev/hda
prompt
timeout=30
default=genoo

image=/boot/kernl-2.6.12-r6-gentoo-sources
label=gentoo
read-only
root=/dev/md0


No, my question is: Is it even posible to install Gentoo on the Linear RAID devices? And if yes, how I could fix the "/sbin/lilo" error?
I would realy like to make this install up and running..... :(

Thank you in advance.


Last edited by ONEEYEMAN on Mon Aug 01, 2005 6:33 pm; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Tue Jul 26, 2005 9:35 pm    Post subject: Reply with quote

ONEEYEMAN,

Well, grub Just Works.

On a more constructive note, did you moount /proc inside the chroot before you did the chroot.
What does
Code:
ls /proc
(from inside the chroot) show ?

Lilo should work too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Tue Jul 26, 2005 9:52 pm    Post subject: Reply with quote

Hi, NeddySeagoon,
Thank you for the reply.
I just did the "ls /proc" inside th chrooted environment. It shows the directory structure.

[EDIT]: Installed LILO 22.7. [/EDIT]
What else I should check?

Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Tue Jul 26, 2005 10:24 pm    Post subject: Reply with quote

ONEEYEMAN,

Is /dev/md0 there ?
Lilo is looking for your root partition.

Can you try grub ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Tue Jul 26, 2005 10:59 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Quote:

Is /dev/md0 there ?


The file /etc/raidtab contains following:

Code:

raiddev /dev/md0
        raid-level      linear
        nr-raid-disks   2
        chunk-size      32
        persistent-superblock 1
        device          /dev/mda3
        raid-disk       0
        device          /dev/mdb2
        raid-disk       1


I just found out that I misspelled the name of the first RAID device: "mda3" instead of "hda3". The same goes for the second RAID drive. Is there any way to fix it without re-installing? Also, I wonder how come during the installation it was not caught up.....? :(

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Wed Jul 27, 2005 2:30 am    Post subject: Reply with quote

OK, I just tried the GRUB, and it was installed fine.
However, after reboot, I got the kernel panic, the error is follows:

Code:

md: Autodetecting RAID arrays
md: invalid raid superblock magic on hda3
md: hda3 has invalid sb, not importing!
md: autorun....
md: considering hdb2.....
md:   ading hdb2
md: created md0
md: bind<hdb2>
md: running: <hdb2>
linear: Not enough drives present. Aborting!
md: pers->run() failed
md: do_md_run returned -22
md: md0 stopped
md: unbind <hdb2>
md: export_hdev<hdb2>
md: .....autorun done
EXT3-fs: unable to read superblock
EXT2-fs: unable to read superblock
FAT: unable to read boot sector
VFS: Cannot open root device "md0" or unknown-block(9,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,0)


The file /boot/grub/grub.conf looks like this:

Code:

default 0
timeout 30
#splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.11-r3
root (hd0,0)
kernel /boot/kernel-2.6.12-r6-gentoo-sources root=/dev/md0


There is also the thread that I followed.

What could I do about that? My hda3 partition is a type "fd" raid autodetect. I am pretty sure about that.

Maybe that's why I couldn't set up LILO?

Thank you in advance.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Wed Jul 27, 2005 4:09 pm    Post subject: Reply with quote

ONEEYEMAN,

Code:
VFS: Cannot open root device "md0" or unknown-block(9,0)

That means that it cant find the device with major number 9 minor number 0. Thats /dev/md0, ,or your root partition.

I'm surprised that mkraid didin't complain when you built the raid prior to the install.
How was your /etc/raidtab created?
You had to type one up outside the chroot to be able to make the raid prior to install. How did you create the /etc/raidtab inside the install ?
Since you are able to mount /dev/md0 to see whats in /etc/raidtab I suspect you have typed the file twice. Onece for the install and once inside the chroot. Its not used for mounting, so its probably not important.

Your grub.conf is fine - its found and loaded the kernel, then the kernel cannot find your root device.
How did you build the raid modules you need?
As modules or into the kernel ?
Also how did you build the root filesystem?
With [M] or [*]?

I don't think you need to reinstall.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Wed Jul 27, 2005 4:28 pm    Post subject: Reply with quote

Thank you for the reply, NedySeagoon.
I created the /etc/raidtab file only once, when I began installation. I just started nano I typed the file. But first I ran

modprobe md

When I configured the kernel I build the RAID Linear support into the kernel, and not as a module.
The root filesystem, which is ext3 is in the kernel, and it's not compiled as a module.

There is another interesting thing. I don't remember what happened when I started installation, but...
I boot with the LiveCD, did "modprobe md", then retype the /etc/raidtab, and and run:

Code:

mknod /dev/md0 b 9 0
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1


I got following results:

Code:

mdadm: chunk size default to 64K
mdadm: /dev/hda3 appears to contain ext2fs file system
    size=.....   mtime=.....
mdadm: /dev/hdb2 appears to be part of a raid array
   level=-1 devices=2 ctime=.....
Continue creating array?


I wonder why it has 2 different output? Maybe it's not recognized by RAID software? Do I need to change the parameters somewhere?

Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Wed Jul 27, 2005 5:06 pm    Post subject: Reply with quote

ONEEYEMAN,

Thats all the right answers.
Your raidtab contains
Code:
chunk-size      32
but your latest error says
Code:
mdadm: chunk size default to 64K
I'm not sure if the chunk size matters for linear raid but you should not attempt to change it after the raid has been created.

I think
Code:
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
destroys all your data as it creates the raid set (if you say Y). You need the command
Code:
raidstart /dev/md0

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Wed Jul 27, 2005 8:56 pm    Post subject: Reply with quote

Thank you for the reply, NeddySeagoon.
Actually the "mdadm" works on the logical level, which means that everything is in place.
Also, according to the RAID HOWTO link from the first post of the thread, the chunk-size parameter is here, just to get the the file /etc/raidtab to be the same for all RAID levels.

Maybe all I need is to change the "persistent-superblock" parameter from 1 to 0? Or my first HD is not compatible with the RAID software?

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Thu Jul 28, 2005 6:45 am    Post subject: Reply with quote

Anybody?

Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Thu Jul 28, 2005 4:31 pm    Post subject: Reply with quote

ONEEYEMAN,

Since your raid is linear, and you think you may have made an error in /etc/raidrab, thy mounting each part of the raid
/dev/sda1 and /dev/sdb1 as your root.

It should fail too, if you really made and installed on a raid array.

Regardless of the outcome, it will provide useful information.

====== edit ==========

Early in the thread you said your partition scheme was
Code:
/dev/hda1     83     Linux                 *
/dev/hda2     82     Linux swap
/dev/hda3     fd      raid autodetect

/dev/hdb1     82     Linux swap
/dev/hdb2     fd      raid autodetect
which ties in with your raidtab.
Recently you said
Code:
mknod /dev/md0 b 9 0
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
which suggests you were trying to make your /boot and swap into a raid volume.

There must be some typos here somewhere. Where ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Thu Jul 28, 2005 5:34 pm    Post subject: Reply with quote

Thank you for the reply.
When I try to mount both, got following (outside of chroot):

Code:

mount -t ext3 /dev/hda3 /mnt/gentoo
mount: /dev/hda3 already mounted or /mnt/gentoo busy
mount: according to mtab, /dev/md0 already mounted on /mnt/gentoo


If I unmount /mnt/gentoo and try again, I will get following:

Code:

umount /mnt/gentoo
mount -t ext3 /dev/hda3 /mnt/gentoo
mount: /dev/hda3 already mounted or /mnt/gentoo busy


When I do mount to check if it's really mounted, it did NOT give either /dev/hda3, /dev/hdb2 or /mnt/gentoo. So I guess it's still assuming the array created by mdadm.

Do you want me to do it prior to the array creation?

Also, I remembered that when I started the installation, I by mistake started the filesystem application to the /dev/hda3 instead of /dev/md0. Typed:

mke2fs -j /dev/hda3

but then interrupted the process by Ctrl+C and entered the correct command with /dev/md0. Could that be the problem? In this case I guess I will need to re-install the system.... :(

[EDIT]: Forgot to mention. The typo is in "mdadm" command. I need to pay attention. People are reading my posts.... :D
Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Thu Jul 28, 2005 6:32 pm    Post subject: Reply with quote

ONEEYEMAN,

All these commands should ahev been done outside the chroot.
Since you can mount your /dev/md0 outside the chroot but not with your own kernel, its looking like a kernel problem.
udev is ruled out, since its not running when the root filestsem is mounted.

Please confirm that you are able to mount your /dev/mdo when you boot with the liveCD and that its contens are still intect.
If that works, can you post your kernel .config file, or at least, the Multi-device support (RAID and LVM) section.
You nead to copy and paste it.
From outside the chroot, its at /mnt/gentoo/usr/src/linux/.config
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Thu Jul 28, 2005 9:51 pm    Post subject: Reply with quote

Thank you NeddySeagoon.
Yes, I could mount it from the outside chroot environment. All I need to do is:

Code:

modprobe md
nano -w /etc/raidtab
...put the file content in and save the file...
mknod /dev/md0 b 9 0
mdadm --create --verbose /dev/md0 --level=linear --raid-devices=2 /dev/hda3 /dev/hdb2
mount -t ext3 /dev/md0 /mnt/gentoo


And when I do the "ls -l /mnt/gentoo" the content of the hard drive is still present.

So you don't think it's related to the fact that I incidentally started to put the filesystem on the /dev/hda3 instead of /dev/md0?

Thank you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Thu Jul 28, 2005 9:57 pm    Post subject: Reply with quote

ONEEYEMAN,

I think its your kernel configuration. You have just shown that you can mount /dev/md0 when you use another kernel.
Your kernel has to do the mount without the help of /etc/raidtab which is where the partition type 0xfd and persistant superblock comes in.

Can you provide the file fragment I asked for earlier please?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Thu Jul 28, 2005 10:31 pm    Post subject: Reply with quote

Yes, here we go:

Code:

cat /mnt/gentoo/usr/src/linux/.config |grep RAID |more
#CONFIG_BLK_DEV_3W_XXX_RAID is not set
#CONFIG_SCSI_AACRAID is not set
#CONFIG_MEGARAID_NEWGEN is not set
#Multi device support (RAID and LVM)
#CONFIG_MD_RAID0 is not set
#CONFIG_MD_RAID1 is not set
#CONFIG_MD_RAID10 is not set
#CONFIG_MD_RAID5 is not set
#CONFIG_MD_RAID6 is not set


For some reason it doesn't show the Linear support for RAID.....

OK, found it:

Code:

cat /mnt/gentoo/usr/src/linux/.config |more
#Multi-device support (RAID and LVM)
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y


Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Mon Aug 01, 2005 2:41 am    Post subject: [PARTIALLY SOLVED]: Linear RAID install: /sbin/lilo fails Reply with quote

OK, I partially solved the problem.
It looks like the documentation has a bug. The following link indicates that during installation I have to run "mknod" only once outside the chroot environment. But in order for the "/dev/md0" to work properly, I have to run in again in the chroot environment in order to create a link "/dev/md/0" to the "/dev/md0". I am going to file a bug for that.

Unfortunately it solves only part of the problem. After running this command again and re-running the "/sbin/lilo", I got the following:

Code:

FATAL: Only RAID1 devices are suppoted for boot images.


But if you look at my /etc/fstab, it shows that I am using just a regular /dev/hda1 with the ext2 for the /boot which has a tyoe of 83, which is Linux. I am not planning to use the RAID for the boot partition.

Still need help.

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Mon Aug 01, 2005 4:38 am    Post subject: [SOLVED]: Linear RAID install: /sbin/lilo fails, using GRUB Reply with quote

Apparently after I ran the "mknod" command it began to work with the GRUB. LILO still fails. With the error from the previous post.
I guess I am going to file a bug for the LILO to be checked out.

Thank you to everybody, who tried to help to all who read the thread.

2Moderator: What should I do in order to mark the thread as solved? When I hi "Reply" button and change the subject line, I can't see that it's changed...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Mon Aug 01, 2005 4:51 pm    Post subject: Reply with quote

ONEEYEMAN,

Do you have udev, hotplug and coldplug installed?
coldplug needs to be in the boot runlevel and hotplug in the defualt runlevel, although, if you have the latest baselayout,
hotplug doesn't do anything any more.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Mon Aug 01, 2005 6:10 pm    Post subject: Reply with quote

I am sorry I should've mentioned it, and I thought I did.
I installedthe GRUB and I am able to boot in the Gentoo. I filed 2 bugs for those issues: 100962 and 100967.

Thank you for the help.

P.S.: How I could check the thread as solved? I tried to change the subject line when I do a reply, but no luck..... :(
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Mon Aug 01, 2005 6:53 pm    Post subject: Reply with quote

ONEEYEMAN,

I think you have to choose to edit your original post, since the subject is created there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum