LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 12-05-2021, 01:16 PM   #1
amaretzek
LQ Newbie
 
Registered: Jun 2021
Location: Lisbon, Portugal
Distribution: Slackware
Posts: 8

Rep: Reputation: Disabled
root on md raid 1 not out of the box for slackware current as of 2021-12-04


Hi!
When installing slackware current (as of 2021-dec-04) on a md raid level 1, the UUID doesn't make it to (/mnt)/etc/mdadm.conf and hence booting after installation fails.
I did this:
- boot with USB PEN drive
- setup md0 for root, metadate 0.90.
- start setup
- My workaround:
- - as soon as the mdadm package is on disk,
- - (in another terminal) mdadm -Es >> /mnt/etc/mdadm.conf
- finish setup and reboot
Hope this helps...
 
Old 12-09-2021, 11:03 AM   #2
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 941

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
From README_RAID.TXT:

Code:
=== Finishing touches ===

After exiting the installer, we have just a few settings to tweak.

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/md2
   RAID 1 users, change it to:
     boot = /dev/md0
   
 - Save the file and exit your editor.
 - run "lilo".


Now's let's create a customized /etc/mdadm.conf for your system:
 - mdadm -Es > /etc/mdadm.conf
You should get something like this (note that this output is not consistent
with the instructions above):
  ARRAY /dev/md0 UUID=bb259b84:6bf27834:208cdb8d:9e23b04b
  ARRAY /dev/md1  metadata=1.2 UUID=ea798427:4ae79ea8:9e7e263d:5ae8f69e name=slackware:1
  ARRAY /dev/md2  metadata=1.2 UUID=4ca90e7a:99de6d09:f1f9ca9d:b2ea6e1b name=slackware:2

If this is done on a live running system, you will notice that the arrays
created with 1.2 metadata will show /dev/md/$name (e.g. /dev/md/1) instead
of /dev/md1 in /etc/mdadm.conf; this is perfectly acceptable, and actually
preferable, so you might want to go ahead and fix that now.

If you plan to run the generic kernel (which is probably necessary, but you 
are certainly welcome to try the huge kernel instead), then continue on to
the next section; otherwise, skip to the exit and reboot part.
 
Old 12-09-2021, 12:10 PM   #3
amaretzek
LQ Newbie
 
Registered: Jun 2021
Location: Lisbon, Portugal
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
This doesn't tell how to re-create initrd after setup before boot. But the initrd after setup has to contain mdadm.conf with the array specified, or boot will fail.
 
1 members found this post helpful.
Old 12-10-2021, 02:54 PM   #4
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 941

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Quote:
Originally Posted by amaretzek View Post
But the initrd after setup has to contain mdadm.conf with the array specified, or boot will fail.
Ah, I didn't realize that part. My raid array is just a data drive, not the root drive.
 
Old 01-29-2022, 02:15 PM   #5
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 348

Rep: Reputation: Disabled
Quote:
Originally Posted by amaretzek View Post
This doesn't tell how to re-create initrd after setup before boot. But the initrd after setup has to contain mdadm.conf with the array specified, or boot will fail.
lilo man page: -x option

mkinitrd man page: -R option
 
Old 01-29-2022, 03:27 PM   #6
amaretzek
LQ Newbie
 
Registered: Jun 2021
Location: Lisbon, Portugal
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi, thanks.
Meanwhile I figured a few things, some I have to re-check.
So, after "chroot /mnt" one can recreate intrd like this:
Minimum, something like this:
mkinitrd -c -k 5.15.17 -m ext4 -f ext4 -r /dev/md0 -R -o /boot/initrd.gz
More general:
cmd_mkinitrd=$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
# check if it is ok
echo $cmd_mkinitrd
# execute it
$cmd_mkinitrd
# for UEFI, copy to EFI partition
cp -ip /boot/initrd.gz /boot/efi/EFI/Slackware/

Now, I once had the BIOS picking up the EFI partition that didn't had the kernel and initrd.
I had to copy them to both EFI partitions (not in chroot!).

Concerning lilo, didn't test nowadays...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] Thu Feb 18 19:29:30 UTC 2021 and 20:47:35 UTC 2021: Strange ChangeLog? Thom1b Slackware 4 02-20-2021 01:55 AM
Date update from internet on boot fails on RP4/8GB system using Jan 22 2021 Slackware Arm Current image. rsamurti Slackware - ARM 4 01-27-2021 06:32 AM

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

All times are GMT -5. The time now is 10:32 AM.

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