LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-19-2018, 07:45 AM   #1
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 156

Rep: Reputation: Disabled
Angry Help wanted for Slackware installation with mdadm raid


Hello,

from last few days I reading sites with information about how to make my first software raid and no one from them worked for me. I need help with that, I don't know where is my mistake. Hard drives is new the same model and size.

Here is my steps.
1. I setup my BIOS to activate RAID mode - Intel
2. When pc boot from Slackware 14.2 x86_64 DVD I start to configure hards.
3. I use cfdisk on /dev/sda to make 3 partitions, sda1 with 100MB size for boot, sda2 for swap space and sda3 for rest of the system. All 3 partitions is: linux raid autodetect - fd
4. I use sfdisk to copy partitions with: sfdisk -d /dev/sda | sfdisk /dev/sdb
5. Stop mdadm with : mdadm -S /dev/md126 && mdadm -S /dev/md127
6. Create drives:
/: mdadm --create /dev/md0 --level 1 --raid-devices 2 /dev/sda3 /dev/sdb3 --metadata=1.2
swap: mdadm --create /dev/md2 --level 1 --raid-devices 2 /dev/sda2 /dev/sdb2 --metadata=1.2
/boot: mdadm --create /dev/md3 --level 1 --raid-devices 2 /dev/sda1 /dev/sdb1 --metadata=0.90
7. Format drives:
mkfs.ext4 /dev/md0
mkfs.ext4 /dev/md3
mkswap /dev/md2
8. I wait 4 hours all 3 raids to be synced. With cat /proc/mdstatus all 3 raids is OK and UP.
9. Start FULL installation
10. Install LILO "simple" setup
- Additional append parameter: root=/dev/md0
- Install LILO in MBR
- EXIT setup
11. I do chroot /mnt/
12. My lilo.conf:

# Start LILO global section
raid-extra-boot = mbr-only
# Append any additional kernel parameters:
append="root=/dev/md0 vt.default_utf8=1"
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

13.I do mdadm -Es >> /etc/mdadm.conf
14. cp /etc/mkinitrd.conf.sample /etc/mkinitrd.conf
15. I edit mkinitrd, now looks like:
# 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="us"
MODULE_LIST="ext4"
#LUKSDEV="/dev/sda2"
ROOTDEV="/dev/md0"
ROOTFS="ext4"
#RESUMEDEV="/dev/sda2"
RAID="1"
#LVM="1"
#UDEV="1"
#MODCONF="0"
#WAIT="1"

16. mkinitrd -F
17. lilo
18. reboot

After reboot it's seems Im in initrd with kernel panic.

Here is screenshot after booting: http://www.stz-bg.com/uploads/881cc4...52f27ed745.png

Here is screenshot on mdstat. Interesting, md0 is missing and again md126 and md127 http://www.stz-bg.com/uploads/dd2ff9...d5950199f8.png

And here is screenshot of mdadm.conf made from: mdadm -Es >> /etc/mdadm.conf
http://www.stz-bg.com/uploads/d8e790...16834ab57a.png

Any one can point me where is the mistake and what Im doing wrong.
 
Old 09-19-2018, 10:03 AM   #2
Olek
Member
 
Registered: Jul 2012
Location: Wroclaw Poland
Distribution: Slackware
Posts: 110

Rep: Reputation: 27
You made mistake at first step. You should'n set RAID mode in BIOS. Just leave BIOS as before - AHCI mode. Linux software RAID starts after kernel is loaded to memory.
 
Old 09-20-2018, 01:42 AM   #3
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 156

Original Poster
Rep: Reputation: Disabled
Okay,
I revert option in BIOS to ACHI mode and its seems linux start, but loading is stop at initrd with the same error. I can try remake it again, but Im not sure where is my second mistake I mean if I do same things with mkinitrd and configuration after reboot I will get the same error. I will try to reinstall it. Did I really need mkinitrd if I use only "stock" huge kernel ?
 
Old 09-20-2018, 02:15 AM   #4
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Have you tried following the documentation included in the Slackware DVD?:
https://mirror.csclub.uwaterloo.ca/s...EADME_RAID.TXT

Just note:
https://www.linuxquestions.org/quest...ml#post5887047

Last edited by Skaendo; 09-20-2018 at 02:19 AM.
 
Old 09-20-2018, 02:23 AM   #5
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 156

Original Poster
Rep: Reputation: Disabled
Yes, as or if you read above I do the same.
 
Old 09-20-2018, 03:33 AM   #6
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 156

Original Poster
Rep: Reputation: Disabled
I have another question too, after I finish install just before to chroot /mnt I do : mdadm -Es and I see:
ARRAY /dev/md3 UUID=432422...
ARRAY /dev/md/2 metadata=1.2 UUID=... name=slackware:2
ARRAY /dev/md/0 metadata=1.2 UUID=... name=slackware:0

after quick: ls -la /dev/md* I see /dev/md0 /dev/md2 /dev/md3 and don't see /dev/md/2 or /dev/md/3

Is that normal ?
 
Old 09-20-2018, 03:53 PM   #7
linuxtinker
Member
 
Registered: Dec 2013
Location: NJ / USA
Distribution: Slackware 64 -Current
Posts: 232

Rep: Reputation: 99
boot up via your install disk.. what does fdisk -l look like and lsblk?
Also did you mount your /dev/md3 as /boot in your fstab?
Might want to use UUID's , I have a system that the bios changed the md#'s on me and its the only way it boots .
 
Old 09-21-2018, 05:22 AM   #8
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 156

Original Poster
Rep: Reputation: Disabled
Problem resolved.

I change my BIOS setting from RAID to ACHI as Olek told me, then I reinstall system again. After a few unsuccessful restarts I see kernel panic with unable to mount root fs, unknown partition. I realize probably some of modules in initrd missing and mostly for the raid because error is for md0. I have a local slackware mirror and after quick view on stock initrd I see mkinitrd -F does not add dm-raid module. I don't know if this is a problem, but I added that module, write lilo and system now boot normal.

Thanks for help.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] RAID + MDADM + LILO Questions: Slackware 14.1 telemeister Slackware 5 05-13-2014 09:13 AM
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-14-2009 05:59 PM
mdadm (lvm) expertise wanted. zaxonus Linux - Server 1 01-08-2009 05:23 PM
mdadm: re-assembling raid array on new installation hamish Linux - Server 3 06-10-2007 02:23 PM
help me setup software raid 1 on slackware with mdadm xrado Slackware 2 03-02-2005 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:03 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