SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-09-19 23:51:49

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

[abandoned]Grub and RAID0 don't seem to work

UPDATED AND CONDENSED

First things, first I don't know almost anything about RAID of any number, I have been doing research on it and RAID0 seems to be my first pick and gives a good boost to my computers performence.

I have a desktop that I have been using as a file/virtual box server and I have decided that I want to put #! as the OS. This decision did not come lightly... ok it was kind of forced on me. I have been running windows 7 ulitame 64-bit for a good long time, the thing i hated about that OS is that for some reason I never have been about to find why, there was a system reserve on my ram. The system reserve on my ram limited my 4gb of ram to 3.25gb of ram, so I began to look for another OS that wouldn't do this to me, before I had decided on a new OS a power surge killed the power supply and motherboard. So now I am here, having rebuilt this computer from spare parts I had. Oh and cause I am sure this is important this computer has NO internet connection.

MOTHERBOARD:    Gigabyte GA-MA78G-DS3H
(1 IDE port)
CPU:        AMD Athlon 64 X2 Dual Core Processor 4800+
RAM:        4GB DDR2
HDD:        80GB IDE
        20GB IDE
------------------------

So my atempts:

ATEMPT 1:
As a resault of being able to boot #! on a USB drive, I replaced the 20GB HDD with a CD-ROM and continued on with #! CD.
My plan was to set up the 80GB HDD this way:
md0    RAID0    20GB    /
-sda1    raid    10GB
-sda2    raid    10GB

sda    80GB
-sda1    raid    10GB
-sda2    raid    10GB
-sda3    ext4    56GB    /home
-sda4    swap    4GB    swap

This was met with a prompt death when I got to loading a boot manager and all failed to install, would have just not installed one, but #! wouldn't have it.

ATEMPT 2:
My plan set up 20GB HDD and set it aside, then setup 80GB HDD, after install reconnect the 20GB HDD. I don't know how to add the drive into the RAID0 but I have seen some documents that show how to add a HDD in to an already made RAID0 and thought that would work perfect. So I went about making a degraded RAID0 with the drives setup like this:

(please also note that this is a very large / partition but I plan to have 1 virutal box machine in it and need the room for the HDD file)
md0    RAID0    40GB    /
-sda1    raid    20GB
-sdb1    raid    20GB

sda    80GB
-sda1    ext4    1GB    /boot
-sda2    raid    20GB
-sda3    ext4    51GB    /home
-sda4    swap    8GB    swap

sdb    20GB
-sdb1    raid    20GB

Well this atempted still hasn't happend since I would perfer to have both HDD present in the machine at install. which made for a new idea!

ATEMPT 2.5:
My plan to perform Atempt 2 in a virtual box machine (this comes from pulling my server out, stealing my desktops... everything makes it very annoying to do, also the USB problem and I don't know if this will in fact work, so I am cheating)

so the virtual box machine will be done up like this:

CPU:    32-bit
RAM:    1gb
HDD:    2
TYPE:    .vdi
SIZE:    20gb (fixed)

PARTITIONS:
md0    RAID0    20GB    /
-sda1    raid    10GB
-sdb1    raid    10GB

sda    80GB
-sda1    ext4    1GB    /boot
-sda2    raid    10GB
-sda3    ext4    8GB    /home
-sda4    swap    2GB    swap

sdb    20GB
-sdb1    raid    10GB

so far this as been interesting but all problems were dealt with until GRUB wouldn't load. [see posts this one below]

Last edited by ansem_of_nexus (2012-10-07 18:27:54)


You can find my work here

Make everything ok button

Offline

Help fund CrunchBang, donate to the project!

#2 2012-09-20 05:25:02

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

Condensed

Last edited by ansem_of_nexus (2012-09-22 04:35:09)


You can find my work here

Make everything ok button

Offline

#3 2012-09-20 07:17:21

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

Condensed

Last edited by ansem_of_nexus (2012-09-22 04:35:34)


You can find my work here

Make everything ok button

Offline

#4 2012-09-21 05:15:20

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

Update
Started from scratch the install in VB with both drives present, this was fine, set up the MD0 RAID0 no problem and finished the install without any problems. I thought I was home free, system restarted and look an error... @#!*

this is the error I got after GRUB auto selected the first option in it's menu

  Booting 'CrunchBang Linux, with Linux 2.6.32-5-686'

Loading Linux 2.6.32-5-686 ...
Loading initial ramdisk ...
Loading, Please wait ...
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/md0 does not exist.  Dropping to a shell!



BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) _

Last edited by ansem_of_nexus (2012-09-22 04:36:37)


You can find my work here

Make everything ok button

Offline

#5 2012-09-21 08:04:25

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: [abandoned]Grub and RAID0 don't seem to work

When you are on the GRUB menu, press 'e' to edit the first entry.
Publish what you get next on this forum.

Offline

#6 2012-09-21 11:03:30

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

Crunchbang linux, with linux 2.6.32-5-686

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-8620-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.IMG-2.6.32-5-686

You can find my work here

Make everything ok button

Offline

#7 2012-09-21 14:15:56

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: [abandoned]Grub and RAID0 don't seem to work

Arent you missing

insmod raid

And if your root device is part of the raid, the set root should reflect that.

See https://wiki.archlinux.org/index.php/Grub2#RAID

Hope this helps.
I dont use raid myself, but I do use LVM - thanks to el_koraco.

Offline

#8 2012-09-21 18:46:48

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

ok this is what I thought I understood the changes needed To be, but like many things didn't work

insmod part_msdos
insmod ext2
insmod raid
set root='(md0,msdos1)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-8620-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.IMG-2.6.32-5-686

I am wondering why the msdos lines are there, I would think that would only be used in a windows entry, or is it because this is a software RAID and not a hardware

also when I formatted the RAID0 I made it a ext4 Or does that not have anything to do with that "insmod ext2"


You can find my work here

Make everything ok button

Offline

#9 2012-09-22 05:34:12

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: [abandoned]Grub and RAID0 don't seem to work

Try

root=(md0)

And try to catch the exact error message. Post it here.

part_msdos is for the traditional msdos partition table. It is not windows-only. Used to distinguish from gpt-partitioning.

ext4 is built on ext2. ext2 is sufficient for grub usage.

Did you enable raid during install or afterwards? Try rebuilding initramfs:

sudo update-initramfs

Offline

#10 2012-09-22 06:49:36

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

as I did not fully understand what you ment by "root=(md0)" and if it went with the add "insmod raid" these are what I atempted. as you will see I did it wrong or it didn't work. I also was wondering why GRUB is trying to talk to the RAID (md0) when sda1 = /boot?

Here as asked for the error messages and the grub entry as well

#Try 1:

insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-820-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686

#Error Message

Gave up waiting for root device.  Common problems:
 - boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/md0 does not exist.  Dropping in to shell!

#Try 2:

insmod part_msdos
insmod ext2
insmod raid
set root='(md0)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-820-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686

#Error Message

Gave up waiting for root device.  Common problems:
 - boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/md0 does not exist.  Dropping in to shell!

#Try 3:

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-820-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686

#Error Message

mount: mounting /md0 on /root failed: No suck file or directory
mount: mounting /dev on /root/dev failed: no such file or directory
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /proc on /root/proc failed: no such file or directory
target filesystem doesn't have requested /sbin/init.
no init found. try passing init= bootarg.

#Try 4:

insmod part_msdos
insmod ext2
insmod raid
set root='(md0)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-820-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686

#Error Message

mount: mounting /md0 on /root failed: No suck file or directory
mount: mounting /dev on /root/dev failed: no such file or directory
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /proc on /root/proc failed: no such file or directory
target filesystem doesn't have requested /sbin/init.
no init found. try passing init= bootarg.

As for when the RAID was made question, I made it during the install process


You can find my work here

Make everything ok button

Offline

#11 2012-09-22 13:14:20

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: [abandoned]Grub and RAID0 don't seem to work

Can you give us more info on your setup?
You have a separate boot partition? outside of the raid? root is on the raid? do you use encryption?

The message you get is telling you that it cant find the root device.

/dev/md0 doesnt exist means that either no raid device exists, or the kernel module that handles the raid is not included in the intrd.img file.

It is possible to collect more info using the grub shell, but answer above questions first, if you dont mind.

Last edited by xaos52 (2012-09-22 13:21:57)

Offline

#12 2012-09-22 22:02:02

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

As requested my setup, I believe this is the information you want.

loaded CD Crunchbang-10-20120207-i386.iso
selected text install
(skipping username, password and all that)
when I got to the partitioner this is the way I setup the drives:

SCSI1 (0,0,0) (sda) - 21.5 GB ATA VBOX HARDDISK
 #1 primary 1 GB f ext4 /boot
 #2 primary 10 GB K physical volume for RAID
 #3 primary 8 GB f ext4 /home
 #5 logical 2 GB f swap swap
SCSI2 (0,1,0) (sdb) - 21.5 GB ATA VBOX HARDDISK
 #1 primary 10 GB H physical volume for RAID

Then I went to "Configure software RAID"
selected RAID0
marked "*":

[*] /dev/sda2    (10000MB; raid)
[*] /dev sdb1     (9993MB; raid)

This is what my prtition table looked after that:

RAID0 device #0 - 20 GB Software RAID device
 #1  20 GB  f  ext4  /
    (I forget) B  unusable
SCSI1 (0,0,0) (sda) - 21.5 GB ATA VBOX HARDDISK
 #1 primary 1 GB f ext4 /boot
 #2 primary 10 GB K physical volume for RAID
 #3 primary 8 GB f ext4 /home
 #5 logical 2 GB f swap swap
SCSI2 (0,1,0) (sdb) - 21.5 GB ATA VBOX HARDDISK
 #1 primary 10 GB H physical volume for RAID

as you can see I do have a /boot partition, this came from an earlier problem (I was unable to install any kind of boot manager in the / partition that is located inside the RAID0 because of the way files are orginized).

I do not use any encryption

I would believe that "the kernel module that handles the raid is not included in the intrd.img file", cause I made the RAID. this is like the 10th time that I have set this system up this way, but this is the first time I have gotten it this far.

If this is not enough and I do need to us the GRUB shell, does "more" work in GRUB shell so that I can read all of the output?


You can find my work here

Make everything ok button

Offline

#13 2012-09-23 09:01:04

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: [abandoned]Grub and RAID0 don't seem to work

OK.
Thanksfor the info.
I havent seen anything that jumps out yet.
So we are still collecting more info.
Lets try the grub shell:

When you are on the grub menu, put your cursor on the line corresponding to the boot entry youwant to boot.
Press the 'F2' key to enter grub shell
You should get the grub > prompt
type 'set'
make a note of the reponse. Post it in the forum after you are done.
type 'ls'
again take note of the response.

Press 'Esc' key to get back to the previuos screen.
take note of the lines starting with 'linux' and 'initrd'.

Now post all requested info.

Offline

#14 2012-09-23 20:29:53

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

#GRUB entry:
CrunchBang Linux, with Linux 2.6.32-5-686

#press F2:
(initramfs) #prompt

#type "set":
(initramfs) set
???
#blur
???
PPID='1'
PS1='(initramfs)'
PS2='>'
PS4='+'
pwd'/'
REASON'ALEART!  /dev/md0 does not exist.  Dropping to a shell!'
REPLY=''
ROOT='/dev/md0'
ROOTDELAY=''
ROOTFLAGS=''
ROOTFSTYLE=''
TERM='linux'
UBIMTD=''
_='10'
blacklist=''
break=''
debug=''
init='/sbin/init'
panic=''
quiet='y'
readonly='y'
resome='UUID=c715786d-0d41-4d80-b12b-8f84ce31721a'
resume_offset=''
rootmnt='/root'

#type "ls":
bin    dev    init    proc    sbin    sys    var
conf    etc    lib    root    scripts    tmp

Find lines that start with "linux" and "initrd":
well since I couldn't esc out it didn't work so well, so I rebooted and here are the screens for GRUB and I am assuming you mean look for "linux" and "initrd" in the GRUB entrys, as they are in the last 4 lines. Also pressing "F2" didn't get me where it seems you wanted me to be, so I will add the info for what it seems that you wanted.

CrunchBang Linux, with linux 2.6.32-5-686
CrunchBang Linux, with linux 2.6.32-5-686 (recovery mode)
---------------------------------------------------------
#CrunchBang Linux, with linux 2.6.32-5-686
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-8620-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686

#CrunchBang Linux, with linux 2.6.32-5-686 (recovery mode)
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set f1cfc612-3ee3-4a8b-8620-3935fc43fb1a\

echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/md0 ro  quiet splash
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686
----------------------------------------------------------
#GRUB entry:
CrunchBang Linux, with Linux 2.6.32-5-686

#Press "c":
grub> #prompt

#type "set":
grub> set
?=0
color_highlight=
color_normal=
default=0
lang=en
local_dir=(hd0,msdos1)/grub/local
menu_color_highlight=black/white
menu_color_normal=light-gray/black
pager=
prefix=(hd0,msdos1)/grub
root=hd0,msdos1

#type "ls":
grub> ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)

Ok looking at this information I think I understand this better now.
hd0=sda as in my master HDD
hd1=sdb as in my slave HDD
hd0,msdos5=sda,sda5 as in my swap partition

so how do I check to make sure md0 is there or was it supposed to show up on "ls" command?


You can find my work here

Make everything ok button

Offline

#15 2012-09-24 07:24:13

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: [abandoned]Grub and RAID0 don't seem to work

It was supposed to show in the ls output.

I can see now why activating the grub shell did not work for you.
When positioned on the line you want to boot, press 'e' first, for 'editing' that grub entry.
Then pressing 'F2' should get you the
grub >
prompt.

Try loading the grub raid module first, like this

grub >insmod raid
grub >ls

Now the raid devices should turn up.

The 'insmod raid' directive that is missing in the grub entry is for me an indication that, for some reason, while building your initrd.img, raid was not included.

Last edited by xaos52 (2012-09-24 07:27:01)

Offline

#16 2012-09-30 20:23:07

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

(sorry about how long it took me to get back to this, new job wiped me out)


as per your instruction I atempted to do the e f2 combination, this did not work. upon booting plop to see if maybe another boot manager could load my system correctly, I noticed something strange. plop only saw sda1, sda2, sda3, sda5, and did not see sdb1. upon booting live cd and checking dives with gparted, sdb is unformated and the raid partition that is supposed to be on sdb is not there. this is wrong, I know that it should be there. I have set this system up over 10 times the exact same way every time, and have check the partitions several times to verify that all was well, so I am setting it up again.

ok so I don't know why my system has to be like this but I finally got the md0 to show up. instead of insmod raid and ls, I used insmod mdraid, ls and I got it. though I don't get why it's md/0 instead of md0 like hd0

grub> insmod mdraid
grub> ls
(md/0) (hd0) (hd0,msdos5) (hd0,msdos4) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1)

You can find my work here

Make everything ok button

Offline

#17 2012-10-07 18:26:38

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: [abandoned]Grub and RAID0 don't seem to work

Ok I just wanted to make this an official announcement.

I am abandoning this project. I still have everything to do it and can continue if someone would like to finish it. Right now I just have other problems and setup issues to work on.


You can find my work here

Make everything ok button

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo