Page 1 of 1
How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Mon Nov 18, 2024 9:39 pm
by dcung
I have an old Dell server (PE9250).
I currently use USB stick to boot DebianDog, works fine.
I prefer to boot from its HDD if possible.
It has PERC 5i controller, which my reading indicated that I need to add megaraid_sas driver to boot from it.
I came across this viewtopic.php?p=136004#p136004
fredx181 wrote: ↑Mon Nov 18, 2024 9:39 am
- Found that it didn't boot from my nvme drive
- Made some changes for initrd creating to support nvme
This is what I get when I boot of the HDD.
How do I add support for megaraid_sas ?
- perc5i-boot.jpg (86.07 KiB) Viewed 378 times
Re: How to add boot support for megaraid controller (PERC 5i)?
Posted: Tue Nov 19, 2024 12:18 pm
by fredx181
@dcung
First must say that I don't know and cannot test, but may be worth trying for you by adding megaraid_sas to the kernel modules in the initrd1.xz.
Therefore edit '/usr/local/cr-initrd/mkinitrd' by adding: copy_including_deps /$LMK/kernel/drivers/scsi/megaraid/megaraid_sas.*
edit: also perhaps copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_sas.*
EDIT; Ooops..., almost forgot: also add megaraid_sas and scsi_transport_sas to: '/usr/local/cr-initrd/initramfs/modlist'
So then e.g. looks like this:
Code: Select all
#copy_including_deps /$LMK/kernel/drivers/ata/pata_*.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_amd.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_atiixp.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_jmicron.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_marvell.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_mpiix.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_pcmcia.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_pata_sil680.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_pata_sis.*
copy_including_deps /$LMK/kernel/drivers/ata/pata_pata_via.*
copy_including_deps /$LMK/kernel/drivers/scsi/megaraid/megaraid_sas.* # <<<<-----
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_sas.* # <<<<-----
# network support drivers
....
And run /usr/local/cr-initrd/mkinitrd
to create new initrd1.xz (in /tmp/)
But there may be more required to add to initrd1.xz
Also, it may work booting with live-boot (initrd.img), it has much more included.
Re: How to add boot support for megaraid controller (PERC 5i)?
Posted: Tue Nov 19, 2024 12:41 pm
by hikohan
Seems Dell PowerEdge 2950's mainboard DP-249
built-in a SATA plug for disk/CD-ROM.
Maybe this way easist.
Tried Precisepup32 on AMD MP with Ultra-160 SCSI.
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Tue Nov 19, 2024 6:09 pm
by dcung
@fredx181
Adding megaraid driver - works!
It boots of HDD now. Thanks.
.
.
.
fredx181 wrote: ↑Tue Nov 19, 2024 12:18 pm
Also, it may work booting with live-boot (initrd.img), it has much more included.
I never use initrd.img -
Do you mean boot of usb with ISO that has initrd.img?
Could you elaborate how to use initrd.img?
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Tue Nov 19, 2024 7:17 pm
by rockedge
dcung wrote:Could you elaborate how to use initrd.img?
I think you can just modify the boot stanza's in the grub.cfg
or menu.lst
like shown in the example:
Open the one that is relevant to you and in the boot stanza's on the initrd
line
Change:
Code: Select all
initrd /my_frugal_install_dir/initrd.gz
To:
Code: Select all
initrd /my_frugal_install_dir/initrd.img
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Tue Nov 19, 2024 8:00 pm
by dcung
rockedge wrote: ↑Tue Nov 19, 2024 7:17 pm
I think you can just modify the boot stanza's in the grub.cfg
or menu.lst
like shown in the example:
Change:
Code: Select all
initrd /my_frugal_install_dir/initrd.gz
To:
Code: Select all
initrd /my_frugal_install_dir/initrd.img
Got it. Thanks.
I tried it, but in my (this) case, it didn't finish booting.
Drop to initramfs
prompt.
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Tue Nov 19, 2024 8:58 pm
by fredx181
@dcung
For example this (grub4dos):
Code: Select all
title DebianDog live-boot-3x (sda1)
root=(hd0,0)
kernel /live/vmlinuz1 boot=live config swapon quickreboot noeject
initrd /live/initrd.img
Or if live is in e.g. folder "debdog"
Code: Select all
title DebianDog live-boot-3x in /debdog/ (sda1)
root=(hd0,0)
kernel /debdog/live/vmlinuz1 boot=live live-media-path=/debdog/live/ config swapon quickreboot noeject
initrd /debdog/live/initrd.img
For saving changes, add persistence
, but if you haven't set it up, it won't work (rather inconvenient to setup and restricted to: a whole partition or a save file (not folder))
EDIT: Here's a ready made persistence file http://www.smokey01.com/saintless//1Gb- ... ive-rw.zip , extract and copy to the root of a partition (so e.g. /mnt/sda1/persistence) and it should be found (and add persistence to the kernel command line)
(sometime ago that I used live-boot, so not sure if all works)
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Tue Nov 19, 2024 9:34 pm
by dcung
@fredx181
I modified my boot stanza accordingly - per your example.
The Dell PE2950 can now boot of its HDD - both initrd1.xz and initrd.img work.
Noticed that initrd.img load more stuff than initrd1.xz.
Thanks for the tip.
Re: How to add boot support for megaraid controller (PERC 4e/Di)?
Posted: Wed Nov 20, 2024 2:03 am
by dcung
I thought to continue this thread rather than create a new one - let me know if new one is preferred.
I also have old Dell PE2850.
Same issue, I use USB stick to boot DebianDog - works fine.
Also prefer to boot of its HDD - if possible.
It has a PERC 4e/Di controller.
With this PE2850, you can choose to use it as RAID card, normal SCSI, or disable it completely. I have used/tried all in the past.
Nowadays, I prefer to use it as normal SCSI - easier to swap my SCSI disks archive/collection.
My reading of various postings, indicated that I need to add either mpt3sas, sym53cxxx (chipset 53c1030), megaraid/megaraid2 or who knows - depend on configured as RAID or SCSI too I guess.
When used as SCSI, during boot - it displays
LSI Logic 1020/1030 MPT Boot Rom
When used as RAID, during boot - it displays
PERC 4e/Di LSI Logic BIOS bla bla bla..
@fredx181
How do I get the correct driver module/name needed for mkinitrd?
Can I get it of lspci or something?
Note - PE2850 use SCSI drives, PE2950 use SAS/SATA drives.
Code: Select all
copy_including_deps /$LMK/kernel/drivers/scsi/mpt3sas/mpt3sas.* # PE2850
copy_including_deps /$LMK/kernel/drivers/scsi/megaraid/megaraid.* # PE2850
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport.* # PE2850
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Wed Nov 20, 2024 7:53 am
by fredx181
@dcung
Yes, with lspci, I guess.
lspci | grep -i LSI
or perhaps lspci | grep -i SCSI
Note the number at front, say it's 00:02.0 , then get verbose output:
lspci -s 00:02.0 -v
And it should show the kernel module / driver.
EDIT:
Code: Select all
...
...
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport.* # PE2850
If you want all "start_with...." e.g. scsi_transport make it scsi_transport*.*
(not scsi_transport.*)
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Wed Nov 20, 2024 8:09 am
by dcung
@fredx181
Code: Select all
#lspci | grep -i LSI
02:05.0 SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 08)
02:05.1 SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 08)
02:05.0 SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 08)
#lspci -s 02:05.0 -v
Subsystem: Dell 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
Flags: bus master, 66MHz, medium devsel, latency 72, IRQ 18
I/O ports at ec00 [size=256]
Memory at fe9f0000 (64-bit, non-prefetchable) [size=64K]
Memory at fe9e0000 (64-bit, non-prefetchable) [size=64K]
Expansion ROM at fea00000 [disabled] [size=1M]
Capabilities: [50] Power Management version 2
Capabilities: [58] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [68] PCI-X non-bridge device
Kernel driver in use: mptspi
Kernel modules: mptspi
So, this would do in mkinitrd?
Code: Select all
copy_including_deps /$LMK/kernel/drivers/scsi/mpt3sas/mptspi.* # PE2850
Any
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_XXX ?
Edit 2:
Code: Select all
copy_including_deps /$LMK/kernel/drivers/scsi/mptspi/mptspi.* # PE2850
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport*.* # PE2850
Edit 3:
But I looked at
Code: Select all
https://github.com/torvalds/linux/tree/master/drivers/scsi
No mptspi ?
Re: How to add boot support for megaraid controller (PERC 5i)? <SOLVED>
Posted: Wed Nov 20, 2024 8:29 am
by fredx181
So, this would do in mkinitrd?
Code: Select all
copy_including_deps /$LMK/kernel/drivers/scsi/mpt3sas/mptspi.* # PE2850
Don't think so, look in the "full" kernel/drivers/scsi/mpt3sas/ in /lib/modules and mptspi doesn't exist there, it's in kernel/drivers/message/fusion/, so:
copy_including_deps /$LMK/kernel/drivers/message/fusion/mptspi.*
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_XXX ?
I'd say not needed all, just add copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_spi.*
And add to modlist too. (and mptspi of course)
Re: How to add boot support for megaraid controller (PERC 4e/Di) ? <SOLVED>
Posted: Wed Nov 20, 2024 8:49 am
by dcung
@fredx181
Yes, that works.
It boots of HDD now.
No way that I would have found it without your assistance.
I was looking only in .../scsi subdiriectory...
Thank you.
Re: How to add boot support for megaraid controller (PERC 4e/Di) ? <SOLVED>
Posted: Wed Nov 20, 2024 2:00 pm
by fredx181
dcung wrote: ↑Wed Nov 20, 2024 8:49 am
@fredx181
Yes, that works.
It boots of HDD now.
No way that I would have found it without your assistance.
I was looking only in .../scsi subdiriectory...
Thank you.
Great ! Miracles exist !
Thanks to you too ! I will probably make those changes later in mklive setup and upgrade-kernel package.
(perhaps in the meantime you'll test some other weird computers )
Re: How to add boot support for megaraid controller (PERC 4e/Di) ? <SOLVED>
Posted: Wed Nov 20, 2024 10:30 pm
by dcung
fredx181 wrote: ↑Wed Nov 20, 2024 2:00 pm
(perhaps in the meantime you'll test some other weird computers )
As you wish
For the sake of completeness - and for my future reference.
I setup the PE2850 in RAID configuration too.
Code: Select all
#lspci | grep -i RAID
02:0e.0 RAID bus controller: Dell PowerEdge Expandable RAID controller 4 (rev 06)
#lspci -s 02:0e.0 -v
02:0e.0 RAID bus controller: Dell PowerEdge Expandable RAID controller 4 (rev 06)
Subsystem: Dell PowerEdge Expandable RAID Controller 4e/Di
Flags: bus master, stepping, 66MHz, medium devsel, latency 64, IRQ 18
Memory at f80f0000 (32-bit, prefetchable) [size=64K]
Memory at fe9c0000 (32-bit, non-prefetchable) [size=256K]
Expansion ROM at fea00000 [disabled] [size=128K]
Capabilities: [c0] Power Management version 2
Capabilities: [d0] MSI: Enable- Count=1/2 Maskable- 64bit+
Capabilities: [e0] PCI-X non-bridge device
Kernel driver in use: megaraid
Kernel modules: megaraid_mbox
So, now I can boot PE2950 and PE2850 of their HDD in RAID and non-RAID mode.
Code: Select all
copy_including_deps /$LMK/kernel/drivers/scsi/megaraid/megaraid_sas.* # PE2950 PERC5i
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_sas.* # PE2950 PERC5i
copy_including_deps /$LMK/kernel/drivers/scsi/megaraid/megaraid_mbox.* # PE2850 PERC4e
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_srp.* # PE2850 PERC4e
copy_including_deps /$LMK/kernel/drivers/message/fusion/mptspi.* # PE2850 LSI 53c1030
copy_including_deps /$LMK/kernel/drivers/scsi/scsi_transport_spi.* # PE2850 LSI 53c1030
<modlist>
megaraid_sas scsi_transport_sas megaraid_mbox mptspi scsi_transport_spi scsi_transport_srp
In RAID config, PE2850 is (noticeably) faster as it then utilized the (onboard DIMM) cache of the controller.
The cache is not used in non-RAID (SCSI) mode.
But I use non-RAID config, to use my collection of SCSI drives easier, .
Someday when I'm not too lazy - these dinosaurs will go to recycling bin or the rubbish tip.