[Risolto] kernel senza ausilio di initramfs

Tutte le discussioni direttamente correlabili all'informatica e/o a GNU/*nix.

Moderator: ago

Post Reply
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

[Risolto] kernel senza ausilio di initramfs

Post by ciro64 »

Ciao; la mia domanda per molti è sicuramente "banale" ; attualmente sto usando Gentoo senza initramfs sfruttando come base un kernel-config di un mio conoscente.
Purtroppo però, non riesco a capire dove diavolo mettere le cose come "built in" se per esempio dovessi compilare Gentoo su altro computer quindi con caratteristiche hardware diverse.
Poco fa ho messo tutto il possibile riguardo SCSI drivers come built-in ma ... kernel panic ovvero non partiva.
Chiedo umilmente se potete darmi "ragguagli" su come "operare" in modo "metodico".

Grazie ^^
Last edited by ciro64 on Fri Apr 06, 2018 6:00 pm, edited 1 time in total.
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
User avatar
fedeliallalinea
Administrator
Administrator
Posts: 31976
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:

Post by fedeliallalinea »

Solitamente senza initramfs devi aggiungere built i vari controller e soprattutto il driver per il file system che usi.
Posta l'errore che ti da e anche l'output di lspci -v
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

Post by ciro64 »

Code: Select all

ci74771ht ~ # lspci -v
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. 4th Gen Core Processor DRAM Controller
        Flags: bus master, fast devsel, latency 0
        Capabilities: [e0] Vendor Specific Information: Len=0c <?>
        Kernel driver in use: hsw_uncore

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 24
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 0000e000-0000efff [size=4K]
        Memory behind bridge: de000000-df0fffff [size=17M]
        Prefetchable memory behind bridge: 00000000d0000000-00000000d9ffffff [size=160M]
        Capabilities: [88] Subsystem: ASUSTeK Computer Inc. Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller
        Capabilities: [80] Power Management version 3
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [a0] Express Root Port (Slot+), MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [140] Root Complex Link
        Capabilities: [d94] #19
        Kernel driver in use: pcieport

00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller (prog-if 30 [XHCI])
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB xHCI Controller
        Flags: bus master, medium devsel, latency 0, IRQ 28
        Memory at df320000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [70] Power Management version 2
        Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci

00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family ME Interface
        Flags: bus master, fast devsel, latency 0, IRQ 25
        Memory at df33a000 (64-bit, non-prefetchable) [size=16]
        Capabilities: [50] Power Management version 3
        Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Kernel driver in use: mei_me

00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
        Subsystem: ASUSTeK Computer Inc. Ethernet Connection (2) I218-V
        Flags: bus master, fast devsel, latency 0, IRQ 27
        Memory at df300000 (32-bit, non-prefetchable) [size=128K]
        Memory at df338000 (32-bit, non-prefetchable) [size=4K]
        I/O ports at f040 [size=32]
        Capabilities: [c8] Power Management version 2
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [e0] PCI Advanced Features
        Kernel driver in use: e1000e

00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 (prog-if 20 [EHCI])
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB EHCI Controller
        Flags: bus master, medium devsel, latency 0, IRQ 16
        Memory at df337000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [50] Power Management version 2
        Capabilities: [58] Debug port: BAR=1 offset=00a0
        Capabilities: [98] PCI Advanced Features
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci

00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family HD Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 29
        Memory at df330000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
        I/O behind bridge: None
        Memory behind bridge: None
        Prefetchable memory behind bridge: None
        Capabilities: [40] Express Root Port (Slot-), MSI 00
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [90] Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family PCI Express Root Port 1
        Capabilities: [a0] Power Management version 3
        Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d0) (prog-if 01 [Subtractive decode])
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Bus: primary=00, secondary=03, subordinate=04, sec-latency=0
        I/O behind bridge: None
        Memory behind bridge: df200000-df2fffff [size=1M]
        Prefetchable memory behind bridge: None
        Capabilities: [40] Express Root Port (Slot+), MSI 00
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [90] Subsystem: ASUSTeK Computer Inc. 82801 PCI Bridge
        Capabilities: [a0] Power Management version 3

00:1c.7 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 8 (rev d0) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
        I/O behind bridge: None
        Memory behind bridge: df100000-df1fffff [size=1M]
        Prefetchable memory behind bridge: None
        Capabilities: [40] Express Root Port (Slot+), MSI 00
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [90] Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family PCI Express Root Port 8
        Capabilities: [a0] Power Management version 3
        Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 (prog-if 20 [EHCI])
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB EHCI Controller
        Flags: bus master, medium devsel, latency 0, IRQ 23
        Memory at df336000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [50] Power Management version 2
        Capabilities: [58] Debug port: BAR=1 offset=00a0
        Capabilities: [98] PCI Advanced Features
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci

00:1f.0 ISA bridge: Intel Corporation 9 Series Chipset Family Z97 LPC Controller
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family Z97 LPC Controller
        Flags: bus master, medium devsel, latency 0
        Capabilities: [e0] Vendor Specific Information: Len=0c <?>

00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] (prog-if 01 [AHCI 1.0])
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family SATA Controller [AHCI Mode]
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 26
        I/O ports at f090 [size=8]
        I/O ports at f080 [size=4]
        I/O ports at f070 [size=8]
        I/O ports at f060 [size=4]
        I/O ports at f020 [size=32]
        Memory at df335000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [70] Power Management version 3
        Capabilities: [a8] SATA HBA v1.0
        Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family SMBus Controller
        Flags: medium devsel, IRQ 18
        Memory at df334000 (64-bit, non-prefetchable) [size=256]
        I/O ports at f000 [size=32]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801

01:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Micro-Star International Co., Ltd. [MSI] GK106 [GeForce GTX 660]
        Flags: bus master, fast devsel, latency 0, IRQ 30
        Memory at de000000 (32-bit, non-prefetchable) [size=16M]
        Memory at d0000000 (64-bit, prefetchable) [size=128M]
        Memory at d8000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] #19
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia

01:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] GK106 HDMI Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at df080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04) (prog-if 01 [Subtractive decode])
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Bus: primary=03, secondary=04, subordinate=04, sec-latency=32
        I/O behind bridge: None
        Memory behind bridge: df200000-df2fffff [size=1M]
        Prefetchable memory behind bridge: None
        Capabilities: [c0] Subsystem: ASUSTeK Computer Inc. ASM1083/1085 PCIe to PCI Bridge

04:01.0 Multimedia controller: Philips Semiconductors SAA7131/SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
        Subsystem: Avermedia Technologies Inc DVB-T Super 007
        Flags: bus master, medium devsel, latency 32, IRQ 16
        Memory at df200000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: [40] Power Management version 2
        Kernel driver in use: saa7134
        Kernel modules: saa7134

05:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
        Subsystem: Qualcomm Atheros AR9485 Wireless Network Adapter
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Memory at df100000 (64-bit, non-prefetchable) [size=512K]
        Expansion ROM at df180000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
        Kernel driver in use: ath9k
        Kernel modules: ath9k
Usando un differente .config da me creato:
All'avvio kernel panic dovuto appunto a "qualcosa" che non è "built-in" e che mi sfugge.

Attualmente sto usando un kernel config che funziona senza initramfs .... appunto "elaborato su una base che mi è stata data da un Gentooista che provai e funziona.
Però il mio è stato un "copiare" senza "consapevolezza" riguardo il perchè funziona.
Se tento io ... tentando di costruire ex-novo un config-file per kernel, qualcosa mi sfugge ed ottengo errore. Purtroppo non riesco da solo a capire cosa.
Scusa la mia ignoranza :|
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

Post by ciro64 »

Scusa doppio post .....

Forse ho capito :

Code: Select all

ci74771ht ~ # zgrep -i ahci /proc/config.gz 
CONFIG_SATA_AHCI=y
CONFIG_SATA_AHCI_PLATFORM=y
# CONFIG_AHCI_CEVA is not set
# CONFIG_AHCI_QORIQ is not set
# CONFIG_SATA_ACARD_AHCI is not set
E' quello che funziona;

Code: Select all

ci74771ht ~ # grep -i ahci /home/cst_config 
CONFIG_SATA_AHCI=m
# CONFIG_SATA_AHCI_PLATFORM is not set
CONFIG_SATA_ACARD_AHCI=m
ci74771ht ~ # 
Questo quello che non funziona.

Può davvero essere colpa di questa imp'ostazione il risultato dei miei fallimenti ? :roll: :oops:
Last edited by ciro64 on Tue Apr 03, 2018 6:29 pm, edited 1 time in total.
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
User avatar
fedeliallalinea
Administrator
Administrator
Posts: 31976
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:

Post by fedeliallalinea »

ciro64 wrote:Può davvero essere colpa di questa imp'ostazione il risultato dei miei fallimenti ? :roll: :oops:
Piu' che possibile se hai un controller sata.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

Post by ciro64 »

No ... non è solo quello :(

Purtroppo non riesco a risolvere l'arzigogolo :(
fare un diff fra configurazioni differenti è un "macello".

Attualmente son con questo kernel:

Code: Select all

$ uname -a
Linux ci74771ht 4.9.76-gentoo-r1 #1 SMP PREEMPT Tue Apr 3 23:21:40 CEST 2018 x86_64 Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz GenuineIntel GNU/Linux
Che funziona bene (e senza initramfs).

Ora scarico le vanilla-sources-4.15.15, quindi con il ".config" di default (che non riesce a partire da solo senza l'ausilio di initramfs).

Non tocco nulla; cosa dovrei fare/guardare/controllare/modificare per far si che esso non debba aver necessità di initramfs ?

Scusate se sono una "seccatuira" :(
Last edited by ciro64 on Tue Apr 03, 2018 10:46 pm, edited 1 time in total.
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

Post by ciro64 »

Mi correggo ... ho già cominciato ad inserire qualcosa come "built-in" ... ma il risultato è sempre un "panic":

immagine2

kernel-config (vanilla 4.15.15)

Se c'è un aiuto Grazie infinite.
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
User avatar
fedeliallalinea
Administrator
Administrator
Posts: 31976
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:

Post by fedeliallalinea »

Puoi anche postare la configurazione delle tue partizioni (il tuo /etc/fstab)?
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

Post by ciro64 »

Certamente

Code: Select all

/dev/sdb1               /boot           ext4            noatime         1 2
/dev/sdb2               none            swap            sw              0 0
/dev/sdb3               /               ext4            noatime         0 1
/dev/sdb5               /home           ext4            noatime         1 2
/dev/sdb6               /mnt/Volume     ntfs-3g         defaults        0 0
#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0
shm                     /dev/shm        tmpfs           defaults        0 0
tmpfs                   /var/tmp/portage        tmpfs   gid=portage,uid=portage,mode=755      0 0
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
ciro64
Guru
Guru
Posts: 424
Joined: Sat Jun 20, 2009 2:23 pm

Post by ciro64 »

Ok ... la "manna" mi è arrivata dal "cielo" ^^
Ho provato sia partendo dalla mia distro in chroot che partendo dal livecd "gentoo minimal" ... e funziona ^^^^^^^^^^^^^^^^^ :D

Code: Select all

# make localyesconfig
è stato risolutivo ^^

PS: davvero gran bella utility ^^
Gentoo: il sistema più eclettico e geniale che abbia mai provato :)
Post Reply