LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   13.37 64bit Raid 5 (3x2To) new installation initrd boot failed (https://www.linuxquestions.org/questions/slackware-14/13-37-64bit-raid-5-3x2to-new-installation-initrd-boot-failed-4175411369/)

Eeel 06-14-2012 02:22 AM

13.37 64bit Raid 5 (3x2To) new installation initrd boot failed
 
1 Attachment(s)
I'm trying to setup a new raid NAS with 3x2To following README_RAID.TXT generic kernel with initrd crash and computer freeze, i'm trying to google different message but i'm stuck need help please.

Eeel 06-14-2012 08:23 AM

here is more detail what i've done:

partition created with cfdisk:
Code:

/boot sd[abc]1 md3 100m (bootable)
/    sd[abc]2 md0 25Go
/home sd[abc]3 md1 3.7T
swap  sd[abc]4 md2 4Go
freespace          100m

partition type is FD, i've read somewhere that we should use type AD ? with current only ?

Code:

sfdisk -d /dev/sda | sfdisk /dev/sdb
sfdisk -d /dev/sda | sfdisk /dev/sdc

Code:

mdadm --stop /dev/md[0123] (else i can't use mdadm --create)

/: mdadm --create /dev/md0 --level 5 --raid-devices 3 /dev/sda2 /dev/sdb2 /dev/sdc2 --force (--force else mdadm don't take the 3 disks)
/home: mdadm --create /dev/md1 --level 5 --raid-devices 3 /dev/sda3 /dev/sdb3 /dev/sdc3 --force
swap: mdadm --create /dev/md2 --level 1 --raid-devices 3 /dev/sda4 /dev/sdb4 /dev/sdc4
/boot: mdadm --create /dev/md3 --level 1 --raid-devices 3 /dev/sda1 /dev/sdb1 /dev/sdc1 --metadata=0.90

Then i run slackware 13.37 64 setup normaly and choose to install lilo in simple mode to the MBR with the option:

Code:

- When asked about additional "append=" parameters, RAID 0 and
  RAID 5 users should type in "root=/dev/md0", to ensure that the proper array is mounted on / at bootup.

i exit from the setup and continue:
Code:

Start by switching into your actual installation directory:
 - chroot /mnt


Let's make sure LILO boots from the RAID arrays properly.  Using your
favorite editor (vim/nano/pico), edit /etc/lilo.conf:
 - add a new line (add it anywhere, but don't indent it):
    raid-extra-boot = mbr-only
 - You will need to change the following line:
    boot = <something>
  RAID 0 and RAID 5 users, change it to:
    boot = /dev/md3                                  <----- according to what i have created
 
 - Save the file and exit your editor.
 - run "lilo".

Here i don't understand what the word indent mean ? Reverso and Google translation in french don't help me on this one

After this point i don't reboot and directly edit to use the generic kernel. i have done a previous install that didn't work and tested to reboot with the huge.s default kernel but computer also freeze.

Code:

Typically, a user switches to a generic kernel by booting the system, and
afterwards running the following:
 - cd /boot
 - rm vmlinuz System.map config
 - ln -s vmlinuz-generic-smp-*    vmlinuz
 - ln -s System.map-generic-smp-*  System.map
 - ln -s config-generic-smp-*      config

Don't run lilo yet, we'll do that soon.

Next, edit (create, if necessary) /etc/mkinitrd.conf and add:
  MODULE_LIST="ext3"
  RAID="1"

We're almost done.

Edit /etc/lilo.conf, and find the line at the very end that says:
  image = /boot/vmlinuz
Add a new line after it that says:
  initrd = /boot/initrd.gz
In this case, be sure to indent the line you've added!


Next, create the initrd based on the config file created earlier.
  mkinitrd -F


Finally, run "lilo" to make the new settings take effect, give yourself a
pat on the back, and reboot your finished system. :)

then i reboot and computer freeze at the screenshot attached in previous post.

i have followed the README_RAID.TXT to build the same computer in RAID 1 with two drive of 2To and everything went fine.

I'm searching google as much as i can and don't find any solution, can anyone tell me what I have missed? Thanks in advance.

Richard Cranium 06-15-2012 04:17 AM

Can you post the exact contents of your lilo.conf file?

As for the word "indent", that means "put some amount of whitespace at the front of the line of text." I know that some computer languages (Python is famous for this) use the amount of indentation to indicate blocks of code.

For example, in Python this bit of code...
Code:

    for x in range(chunks):
        yield line[offset:offset+6]
        offset += 6

...is not the same as this bit of code...
Code:

    for x in range(chunks):
        yield line[offset:offset+6]
    offset += 6

In the first example, "offset" is incremented by 6 inside the "for" loop. In the second one, "offset" is incremented by 6 only when the loop ends.

I suspect lilo works the same way, judging from the comment you posted (I use grub, myself).

Eeel 06-15-2012 07:19 AM

Hello,

thanks for your answer, i'm not at home, i'll post my lilo.conf tonight, i haven't put any whitespace in front of the line. I started a fresh install again yesterday.

regards.

NyteOwl 06-15-2012 12:53 PM

From the screen shot, you got the terminating error because the root device wasn't mounted - as indicated in teh previosu warning line that mount could not find the entry in /etc/fstab so you might start there.

Eeel 06-15-2012 12:56 PM

i've started a fresh install yesterday with 3 partition instead of 4 with no bootable, i've read somewhere that when lilo is in MBR it doesn't need the boot flag, i end up with the same screenshot error

my lilo.conf:
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
raid-extra-boot = mbr-only
append="root=/dev/md0 vt.default_utf8=0"
boot = /dev/md2

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 120
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x64k
vga = 791
# Normal VGA console
#vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/md0
  label = Linux
  read-only
# Linux bootable partition config ends

/etc/mkinitrd:
Code:

MODULE_LIST="ext3"
RAID="1"

i have followed the README_RAID.TXT for the initrd:
Code:

Edit /etc/lilo.conf, and find the line at the very end that says:
  image = /boot/vmlinuz
Add a new line after it that says:
  initrd = /boot/initrd.gz
In this case, be sure to indent the line you've added!


Next, create the initrd based on the config file created earlier.
  mkinitrd -F

Finally, run "lilo" to make the new settings take effect, give yourself a
pat on the back, and reboot your finished system. :)

my fstab:
Code:

/dev/md1        swap            swap        defaults        0  0
/dev/md0        /                ext4        defaults        1  1
/dev/md2        /boot            ext4        defaults        1  2
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

cat /proc/mdstat:
Code:

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md1 : active raid1 sda3[0] sdc3[2] sdb3[1]
      1999056 blocks super 1.2 [3/3] [UUU]
     
md0 : active raid5 sda2[0] sdc2[3] sdb2[1]
      3902635008 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
     
md2 : active raid1 sda1[0] sdc1[2] sdb1[1]
      96256 blocks [3/3] [UUU]
     
unused devices: <none>


Eeel 06-15-2012 01:09 PM

1 Attachment(s)
Hello NyteOwl, thx for the idea, i have attached my fstab and an updated version of the screenshot error with 3 partition. Is it normal that my /etc/mdadm.conf is entirely commented ?

Eeel 06-15-2012 04:52 PM

Hello,

It works, problem seems to be an incomplete mkinitrd.conf, i'll post the complete configuration tomorrow and pass the thread solved, but need some sleep first ;)

Eeel 06-16-2012 06:54 AM

Hello,

finally after some sleep and a new fresh install this morning my complete setup RAID 5 on 3x2To following README_RAID.TXT, hope that it can be useful to someone ^^

Run Slackware 13.37 64bit install from USB/DvD, partitioning with cfdisk:

Code:

/boot        100Mo        sda1        DA        RAID 1        md3       
/        25Go        sda2        DA        RAID 5        md0
/home        3.6T        sda3        DA        RAID 5        md1
swap        4Go        sda4        DA        RAID 1        md2
free        100mo

partition type DA.
no bootable partition.

Duplicate partition to three 2To drives with sfdisk:

Code:

sfdisk -d /dev/sda | sfdisk /dev/sdb
sfdisk -d /dev/sda | sfdisk /dev/sdc

Stop eventually old raid array from previous install with mdadm:

- see wich "mdx"(x=0,1,2...) array may be up from an eventually previous install
Code:

cat /proc/mdstat
- stop old "mdx"(x=0,1,2...) array with mdadm:
Code:

mdadm --stop /dev/mdx
Create new array with mdadm:

Code:

/:        mdadm --create /dev/md0 --level 5 --raid-devices 3 /dev/sda2 /dev/sdb2 /dev/sdc2 --metadata=1.2
/home:        mdadm --create /dev/md1 --level 5 --raid-devices 3 /dev/sda3 /dev/sdb3 /dev/sdc3 --metadata=1.2
swap:        mdadm --create /dev/md2 --level 1 --raid-devices 3 /dev/sda4 /dev/sdb4 /dev/sdc4 --metadata=1.2
/boot:        mdadm --create /dev/md3 --level 1 --raid-devices 3 /dev/sda1 /dev/sdb1 /dev/sdc1 --metadata=0.90

Format swap partition with mkswap:

Code:

mkswap -f /dev/md2
Format other array with mkfs:

Code:

mkfs.ext4 /dev/md0
mkfs.ext4 /dev/md1
mkfs.ext4 /dev/md3

Install Slackware using "setup":

- Install LILO "simple" setup
- OS/2 Boot Manager found: NO
- Additional append parameter: root=/dev/md0
- Install LILO in MBR
- EXIT setup

Switch to installation directory with chroot:

Code:

chroot /mnt/
Edit lilo.conf (be careful white space at beginning of lines):

Code:

# Start LILO global section
raid-extra-boot = mbr-only
# Append any additional kernel parameters:
append="root=/dev/md0 vt.default_utf8=0"
boot = /dev/md3

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/md0
  label = Linux
  read-only
# Linux bootable partition config ends

Use the Generic Kernel:

Code:

- cd /boot
 - rm vmlinuz System.map config
 - ln -s vmlinuz-generic-*    vmlinuz
 - ln -s System.map-generic-*  System.map
 - ln -s config-generic-*      config

Create mkinitrd.conf:

Code:

cp /etc/mkinitrd.conf.sample /etc/mkinitrd.conf
Edit mkinitrd.conf:

Code:

# mkinitrd.conf.sample
# See "man mkinitrd.conf" for details on the syntax of this file
#
SOURCE_TREE="/boot/initrd-tree"
#CLEAR_TREE="0"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="en"
MODULE_LIST="ext4"
#LUKSDEV="/dev/sda2"
#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
ROOTDEV="/dev/md0"
ROOTFS="ext4"
#RESUMEDEV="/dev/sda2"
RAID="1"
#LVM="1"
#UDEV="1"
#MODCONF="0"
#WAIT="1"

Create the initrd with mkinitrd:

Code:

mkinitrd -F
Run Lilo:
Code:

lilo
Code:

reboot.
Declare email and Raid array in /etc/mdadm.conf to receive mail Postfix alert with rc.mdadm:
Code:

echo MAILADDR your-mail@somewhere.com >> /etc/mdadm.conf
mdadm -Es >> /etc/mdadm.conf


wildwizard 06-16-2012 07:16 AM

Quote:

Originally Posted by Eeel (Post 4703096)
partition type is FD, i've read somewhere that we should use type AD ? with current only ?

It's "da" and it is for any recent Slackware version 13.x

The old kernel auto detect (which needs "fd") is no longer used, it has been replaced by mdadm in the initrd scanning the disks and assembling the arrays instead.

See :-
https://raid.wiki.kernel.org/index.php/RAID_Boot

caduqued 06-16-2012 05:45 PM

Quote:

Originally Posted by Eeel (Post 4704780)
Hello,

finally after some sleep and a new fresh install this morning my complete setup RAID 5 on 3x2To following README_RAID.TXT, hope that it can be useful to someone ^^

It is useful indeed! Thanks a lot for sharing your experience!

Eeel 06-17-2012 12:18 PM

@Wildwizard,
Thx for the confirmation.

@Caduqued,
it's the less i can do, whithout LQ my computer running windows ;)


EDIT: few test later, some recovery test

Code:

/boot        100Mo        sd[a,b,c] 1        md3        DA        RAID 1
/        25Go        sd[a,b,c] 2        md0        DA        RAID 5
/home        ~        sd[a,b,c] 3        md1        DA        RAID 5
swap        4Go        sd[a,b,c] 4        md2        DA        RAID 1

Power off, remove drive /dev/sdb, restart and verify:

Code:

root@1337-64r:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md2 : active raid1 sda4[0] sdb4[2]
      3999149 blocks super 1.2 [3/2] [U_U]
     
md1 : active raid5 sda3[0] sdb3[3]
      3848640512 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [U_U]
     
md0 : active raid5 sda2[0] sdb2[3]
      49991680 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [U_U]
     
md3 : active raid1 sda1[0] sdb1[2]
      96256 blocks [3/2] [U_U]

note: sdc is now sdb

Email alerte received, computer work perfectly.

Power off, connect new drive in place of /dev/sdb, reboot and verify:

Code:

root@1337-64r:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md2 : active raid1 sda4[0] sdc4[2]
      3999149 blocks super 1.2 [3/2] [U_U]
     
md1 : active raid5 sda3[0] sdc3[3]
      3848640512 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [U_U]
     
md0 : active raid5 sda2[0] sdc2[3]
      49991680 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [U_U]
     
md3 : active raid1 sda1[0] sdc1[2]
      96256 blocks [3/2] [U_U]

note: sdc is now sdc like it was before

Verify with cfdisk disk partitions:

Code:

cfdisk /dev/sda
cfdisk /dev/sdb
cfdisk /dev/sdc

New sdb is not partitioned.

Copy partition to sdb with sfdisk:

sfdisk -d /dev/sda | sfdisk /dev/sdb

Code:

root@1337-64r:~# sfdisk -d /dev/sda | sfdisk /dev/sdb
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 243201 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sdb: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = sectors of 512 bytes, counting from 0

  Device Boot    Start      End  #sectors  Id  System
/dev/sdb1            63    192779    192717  da  Non-FS data
/dev/sdb2        192780  50187059  49994280  da  Non-FS data
/dev/sdb3      50187060 3898830914 3848643855  da  Non-FS data
/dev/sdb4    3898830915 3906831284    8000370  da  Non-FS data                                                                                                                                               
Warning: no primary partition is marked bootable (active)                                                                                                                                                     
This does not matter for LILO, but the DOS MBR will not boot this disk.                                                                                                                                       
Successfully wrote the new partition table                                                                                                                                                                   
             
Re-reading the partition table
                 
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)                                                                                                                                     
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1                                                                                                                                     
(See fdisk(8).)

Attach sdb to existing array with mdadm:

Code:

mdadm --add /dev/md0 /dev/sdb2
mdadm --add /dev/md1 /dev/sdb3
mdadm --add /dev/md2 /dev/sdb4
mdadm --add /dev/md3 /dev/sdb1

Verify resync status:

Code:

root@1337-64r:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md2 : active raid1 sdb4[3] sda4[0] sdc4[2]
      3999149 blocks super 1.2 [3/2] [U_U]
        resync=DELAYED
     
md1 : active raid5 sdb3[4] sda3[0] sdc3[3]
      3848640512 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [U_U]
        resync=DELAYED
     
md0 : active raid5 sdb2[4] sda2[0] sdc2[3]
      49991680 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [U_U]
      [=>...................]  recovery =  7.8% (1973556/24995840) finish=9.0min speed=42546K/sec
     
md3 : active raid1 sdb1[3] sda1[0] sdc1[2]
      96256 blocks [3/2] [U_U]
        resync=DELAYED


Don't reboot until recovery is complete.


All times are GMT -5. The time now is 12:45 AM.