1

Trying to install slackware onto a raid 1 on 2 2TB drives.

I followed the official readme.

I have two drives, sda and sdb. They each have two partitions, one for /(50GB) and one for /home(Rest of drive, ~1950GB) No swap, have 32GB ram.

I partitioned them with gparted in a live distro, as when I did it in the slackware setup with cfdisk, fdisk -l would say that the partition "does not start on physical sector boundary", and I'm bad at fdisk (trying to get the trailing 100MB suggested by the readme was the hard bit there)

So I get the disks partitioned, make both partitions raid 1, resulting in /dev/md0 and /dev/md1. I continue with the install, everything going smoothly. After setup finishes, I modify lilo.conf, setting boot = /dev/md0, and raid-extra-boot = mbr-only

Restart, lilo comes up, starts booting slackware, then I get

md: autodetecting RAID arrays.
md: Scanned 0 and added 0 devices
...
REISERFS warning (device md0): sh-2006 read_super_block: bread failed (dev md0, block 2, size 4096)
REISERFS warning (device md0): sh-2006 read_super_block: bread failed (dev md0, block 16, size 4096)
...
EXT4-fs (md0): unable to read superblock
...
Please append a correct "root=" boot option ...
...
kernel panic-not syncing VFS:unable to mount root fs on unknown-block(9,0)

So it's not detecting the raid correctly, it seems.

If I boot into parted magic, or the slackware setup, it does find /dev/md0.

2
  • So I would have thought the 9,0 means ninth device, first partition. You thought wrong. That would be the major and minor device numbers. brw-r----- 1 root disk 9, 0 Sep 2 2011 md0.
    – yoonix
    Feb 6, 2015 at 1:01
  • @yoonix Makes sense. I'll go verify that matches /dev/md0, and edit the question.
    – mtfurlan
    Feb 6, 2015 at 2:04

2 Answers 2

0

I am not familiar with Slackware, but if your initramfs does not detect the raid properly, you can try to make it work with the kernel's raid auto detection. To do that, set the partition type to 0xFD. I am not sure about the number, use the l command in fdisk or gdisk to find the "raid autodetect" partition type.

0
0

I am not sure, but may be slackware rename your raid partition. Have you specify mdadm.conf in initrd(if you use one)?

I have an working manual for installing slackware with grub on raid :

Create directory for mounting usb and iso

1  mkdir 111 222 
2  mount /dev/sdc1 111/
3  mount -o loop 111/boot/slackware-current-install-dvd.iso 222/

Copy tagfiles and grub configuration

4  cp 111/min_slack_tagfiles.tar.gz tag/
5  cp 111/boot.tar.gz tag/

If needed stop all current arrays

6  mdadm --stop /dev/md0
7  mdadm --stop /dev/md1
8  cat /proc/mdstat 

Create new partition table. You need to have at least 1M before the first partition when using MBR or have a dedicated 1M+ grub bios partition under GPT when installing newer grub version with softraid and/or lvm.

9   fdisk -l
10  fdisk /dev/sda

Clone partition table to other disk

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

And create arrays. Array with metadata=0.90 must be bootable (in linux boot directory must be mounted in here).

12  mdadm --create /dev/md0 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda2 /dev/sdb2 
13  cat /proc/mdstat 
14  mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
15  cat /proc/mdstat 

Wait until array will complite

16  watch  cat /proc/mdstat 

Run slackware setup utility

17  setup 

Copy basic configuration to new system.

18  cp /tag/boot.tar.gz /mnt/root/

Add array configuration to new system's mdadm.conf

19  mdadm --detail --scan >> /mnt/etc/mdadm.conf 

Chroot into new system

20  chroot /mnt/

Install grub to disks

21  grub-install --no-floppy /dev/sda              
22  grub-install --no-floppy /dev/sdb              

Untar basic configuration for grub and mkinitrd

23  cd root/                                       
24  tar xf boot.tar.gz                             

Cony configs

25  cp grub.cfg /boot/grub/                        
26  cp mkinitrd.conf /etc/                         

Edit grub config

27  cd /boot/grub/                                 
28  vim grub.cfg                                   

Create initrd image

29  mkinitrd -F                                    
30  cp /etc/mkinitrd.conf /boot/initrd-tree/etc/   
31  mkinitrd                                       

Exit from chroot

32  exit                                           

Reboot to new system

33 reboot

Good luck!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .