Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problema Grub
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Tue Oct 15, 2024 9:51 am    Post subject: Problema Grub Reply with quote

Buongiorno,
terminata l'installazione di Gentoo, al riavvio ricevo questo errore:

Code:
Minimal BASH-like line editing is supported. For the first word, TAB
   lists possible command completions. Anywhere else TAB lists possible
   device or file completions. To enable less(1)-like paging, "set pager=1".


ho provato a cercare in rete ma ho trovato una vecchia guida del wiki di Ubuntu, ma non ho risolto comunque nulla, sapreste dirmi come dovrei fare?
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Thu Oct 31, 2024 5:32 pm    Post subject: Reply with quote

Da chroot, ho provato a installare nuovamente grub quando do il comando:

Quote:
grub-nkconfig -o /boot/grub/grub.cfg


Ricevo questo:

Code:
 Generating grub configuration file ...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
/us/lib/os-probes/50mounted-tests: riga 88: btrfs: comando non trovato
 /us/lib/os-probes/50mounted-tests: riga 89: btrfs: comando non trovato
/us/lib/os-probes/50mounted-tests: riga 90: btrfs: comando non trovato
Adding boot menu entry for UEFI Firmware Settings ...
done


Il mio non è un sistema UEFI, è BIOS la /home e’ formattata in BTRFS, potrebbe essere questo il problema?
Il Kernel l’ho compilato con genkernel
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Thu Oct 31, 2024 8:04 pm    Post subject: Reply with quote

Di default grub è impostato per sistemi UEFI

Se hai solo BIOS boot nel make.conf :
Code:
# Setup GRUB platforms
GRUB_PLATFORMS="pc"



Code:
# emerge -DN @world --ask

o
Code:
# emerge -DN sys-boot/grub --ask


Code:
# grub-mkconfig -o /boot/grub/grub.cfg

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Thu Oct 31, 2024 10:25 pm    Post subject: Reply with quote

Avevo dimenticato di scriverlo, sul male.conf ho scritto grub_platforms=“pc”
Comunque ho dato il comando:

Code:
packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 32.71


* sys- boot/grub
Wouldyou tike  parents testertes? [Yes/No1 yes
>>> Recording sys-boot/grub in “world” favorites file…


Ho poi ridato il comando per creare il file grub (stessi messaggi postati prima)
Al riavvio continua a darmi l’errore di inizio topic
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 489

PostPosted: Fri Nov 01, 2024 9:30 am    Post subject: Reply with quote

La versione di Grub installata all'inizio del discho e nel sistema operativo devono essere uguali. Quindi con privilegi elevati
Code:
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Fri Nov 01, 2024 8:06 pm    Post subject: Reply with quote

Code:
(chroot)
ubuntu / #
mount /dev/sda1 / boot
(chroot )
ubuntu
nano -w / etc/portage/make.conf
(chroot)
ubuntu / # env-update && source /etc/profile && export PS1="(chroot) ${PS1}"
>›› Regenerating /etc/ld.so.cache...
(chroot) ubuntu / # emerge -DN sys-boot/grub - - ask
I
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 30.78 s (backtrack: 0/20) •
* sys-boot/grub
Would you like to add these packages to your world favorites? [Yes/No] yes
>>> Recording sys-boot/grub in "world" favorites file... (chroot) ubuntu / # emerge --ask --newuse sys-boot/os-prober
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 7.45 s (backtrack: 0/20) -
(chroot) / # grub-install /dev/sda
Installazione per la piattaforna 1386-pc.
Installazione completata, nessun errore segnalato.
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
/us/Lib/os-probes/50mounted-tests: riga 88: btrfs: comando non trovato /us/Lib/os-probes/50mounted-tests: riga 89: btrfs: comando non trovato /us/lib/os-probes/50mounted-tests: riga 90: btrfs: comando non trovato
Adding boot menu entry for UEFI Firmware Settings ...
Done


Al riavvio ho sempre la schermata postata a inizio topic, in / etc/default/grub e’ inserito:
Code:
GRUB_DISABLE_OS_PROBER="false"
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Fri Nov 01, 2024 10:30 pm    Post subject: Reply with quote

Quote:
/us/Lib/os-probes



c'è qualcosa che non va.... :roll:


Code:
equery b /usr/lib/os-probes/50mounted-tests
 * Searching for /usr/lib/os-probes/50mounted-tests ...
sys-boot/os-prober-1.82 (/usr/lib/os-probes/50mounted-tests)


prova a reinstallare os-prober , magari sistema questa avaria ....
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 8:29 am    Post subject: Reply with quote

Code:
(chroot) ubuntu / # emerge --ask os-prober

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 15.92 s (backtrack: 0/20).

[ebuild   R    ] sys-boot/os-prober-1.82

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-boot/os-prober-1.82::gentoo
 * os-prober_1.82.tar.xz BLAKE2B SHA512 size ;-) ...                     [ ok ]
>>> Unpacking source...
>>> Unpacking os-prober_1.82.tar.xz to /var/tmp/portage/sys-boot/os-prober-1.82/work
>>> Source unpacked in /var/tmp/portage/sys-boot/os-prober-1.82/work
>>> Preparing source in /var/tmp/portage/sys-boot/os-prober-1.82/work/os-prober-1.82 ...
 * Applying os-prober-1.79-mdraid-detection.patch ...                    [ ok ]
 * Applying os-prober-1.79-btrfs-subvolume-detection.patch ...           [ ok ]
 * Applying os-prober-1.79-use-fstab-name.patch ...                      [ ok ]
 * Applying os-prober-1.79-mounted-boot-partition-fix.patch ...          [ ok ]
 * Applying os-prober-1.79-fix-busy-umount-message.patch ...             [ ok ]
 * Applying os-prober-1.79-efi-chroot-blkid-fallback.patch ...           [ ok ]
 * Applying os-prober-1.81-boot-detected-twice-v3.patch ...              [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-boot/os-prober-1.82/work/os-prober-1.82 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-boot/os-prober-1.82/work/os-prober-1.82 ...
make -j5 newns
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs  newns.c   -o newns
>>> Source compiled.
>>> Test phase [not enabled]: sys-boot/os-prober-1.82

>>> Install sys-boot/os-prober-1.82 into /var/tmp/portage/sys-boot/os-prober-1.82/image
>>> Completed installing sys-boot/os-prober-1.82 into /var/tmp/portage/sys-boot/os-prober-1.82/image

 * Final size of build directory: 260 KiB
 * Final size of installed tree:  184 KiB

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/lib/os-prober/newns

>>> Installing (1 of 1) sys-boot/os-prober-1.82::gentoo

>>> Completed (1 of 1) sys-boot/os-prober-1.82::gentoo

 * GNU info directory index is up-to-date.
(chroot) ubuntu / # equery b /usr/lib/os-probes/50mounted-tests
 * Searching for /usr/lib/os-probes/50mounted-tests ...
sys-boot/os-prober-1.82 (/usr/lib/os-probes/50mounted-tests)
(chroot) ubuntu / # emerge -DN sys-boot/grub --ask

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 30.11 s (backtrack: 0/20).



 * sys-boot/grub

Would you like to add these packages to your world favorites? [Yes/No] yes
>>> Recording sys-boot/grub in "world" favorites file...
(chroot) ubuntu / # grub-install /dev/sda
Installazione per la piattaforma i386-pc.
Installazione completata, nessun errore segnalato.
(chroot) ubuntu / # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
/usr/lib/os-probes/50mounted-tests: riga 88: btrfs: comando non trovato
/usr/lib/os-probes/50mounted-tests: riga 89: btrfs: comando non trovato
/usr/lib/os-probes/50mounted-tests: riga 90: btrfs: comando non trovato
Adding boot menu entry for UEFI Firmware Settings ...
done
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 489

PostPosted: Sat Nov 02, 2024 10:00 am    Post subject: Reply with quote

Per favore mostra /boot/grub/grub.cfg.

Hai bisogno di os-prober?
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 10:58 am    Post subject: Reply with quote

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
 fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod btrfs
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0>
else
  search --no-floppy --fs-uuid --set=root 758f9e20-0f76-47ea-9028-5bd71064bfdc
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
        menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware'>
                fwsetup
        }
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Sat Nov 02, 2024 11:02 am    Post subject: Reply with quote

l'applicazione nello script cerca il comando "btrfs" ,

sys-fs/btrfs-progs

è installato ?

ne hai bisogno ?
Code:
 equery h btrfs

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 12:31 pm    Post subject: Reply with quote

Ho installato nuovamente sys-fs/btrfs-progs, installato grub e ridato il comando per la creazione del file ma, all’avvio sempre lo stesso errore

Code:
(chroot) ubuntu / # equery h btrfs
 * Searching for USE flag btrfs ...
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 489

PostPosted: Sat Nov 02, 2024 1:42 pm    Post subject: Reply with quote

Hai installato un kernel? Non vedo nessun kernel nella grub.cfg.
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Sat Nov 02, 2024 4:52 pm    Post subject: Reply with quote

sMueggli wrote:
Hai installato un kernel? Non vedo nessun kernel nella grub.cfg.

effettivamente non ha nulla di installato.

Stai utilizzando un dual-boot con ubuntu ?

Se stai condividendo una eventuale partizione di /boot con ubuntu , c'è da rivedere qualcosa sulla gestione del boot.
Chi deve gestire cosa e come.

A questo punto credo serva qualche informazione in più anche sul partizionamento applicato
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 5:28 pm    Post subject: Reply with quote

Ora non sono a casa, in serata vi posto tutte le informazioni, non sono in dual-boot, l’ssd è diviso in 3 (/boot fat32, swap circa 8gb e la terza /home btrfs).
Ho impostato fstab
Code:

         /dev/sda1   /boot        vfat    defaults,noatime     0 2
         /dev/sda2   none         swap    sw                       0 0
         /dev/sda3   /               btrfs    noatime                0 1


Il kernel l’ho installato con genkernel, nel file /etc/genkernel.conf ho decommentato la voce: MICROCODE="all"
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Sat Nov 02, 2024 6:19 pm    Post subject: Reply with quote

Assicurati che quando viene installato il kernel , la /boot (di Gentoo) sia montata , anche quando sei in chroot.
Dovresti ricevere un warning comunque...

Prima di (re)installare :
Code:
# mount /boot

Code:
# genkernel blah blah

Code:
# grub-mkconfig -o /boot/grub/grub.cfg


Inoltre ti suggerisco di utilizzare gli UUID per le relative paritizioni nell'fstab

Li trovi con
Code:
# blkid


/etc/fstab
Code:
UUID=XXXXX-XXXXXX  /boot vfat ....
UUID=XXXXX-XXXXX   none swap sw 0 0.....
UUID=XXXXX-XXXXX   / btrfs  ....


PS :
Quote:
e la terza /home btrfs
???? /home ???
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 6:28 pm    Post subject: Reply with quote

PS :
Quote:
e la terza /home btrfs
???? /home ???[/quote]

Code:
 /dev/sda3   /               btrfs    noatime                0 1
sarebbe questa.

Seguendo l'Handbook, subito dopo aver effettuato il chroot monto la partizione di boot con:
Code:
mount /dev/sda1 /boot
(e lo faccio ben prima di compilare il kernel), comunque appena posso ripeterò i passaggi per la compilazione del kernel e vediamo un pò...
era mia intenzione impostare UUID una volta completata l'installazione
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Sat Nov 02, 2024 8:04 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Genkernel#Starting_off

Probabilmente la mancanza di kernel nella /boot potrebbe essere dovuta a questa mancanza :
Quote:
Replacing --no-install with the --install option allows genkernel to automatically install the new kernel in the /boot directory, and will create symlinks if --symlink is specified. Using the --mountboot option allows genkernel to mount the /boot partition automatically, if necessary.


un bel contenuto di
Code:
# ls -lh /boot


potrebbe aiutare a capire cosa c'è dentro quella directory
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 8:23 pm    Post subject: Reply with quote

ho dato il comando:

Code:
genkernel --install all --microcode initramfs
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 9:32 pm    Post subject: Reply with quote

Code:
(chroot) ubuntu / # ls -lh /boot
totale 25M
drwxr-xr-x 6 root root 512  2 nov 12.25 grub
-rwxr-xr-x 1 root root 13M 31 ott 08.08 initramfs-6.6.52-gentoo-x86_64.img
-rwxr-xr-x 1 root root 12M 30 ott 20.11 initramfs-6.6.52-gentoo-x86_64.img.old
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 170

PostPosted: Sat Nov 02, 2024 10:24 pm    Post subject: Reply with quote

Code:
(chroot) ubuntu / # emerge --ask sys-kernel/gentoo-sources


These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 8.07 s (backtrack: 0/20).

[ebuild   R    ] sys-kernel/gentoo-sources-6.6.52

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-kernel/gentoo-sources-6.6.52::gentoo
 * linux-6.6.tar.xz BLAKE2B SHA512 size ;-) ...                      [ ok ]
 * genpatches-6.6-59.base.tar.xz BLAKE2B SHA512 size ;-) ...         [ ok ]
 * genpatches-6.6-59.extras.tar.xz BLAKE2B SHA512 size ;-) ...       [ ok ]
 * >>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-6.6.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work
>>> Unpacking genpatches-6.6-59.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work/patches
>>> Unpacking genpatches-6.6-59.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work/patches
 * Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc.patch ...                                                                   [ ok ]
 * Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch ...                                                               [ ok ]
 * Excluding Patch #5011_enable-cpu-optimizations-for-gcc8.patch ... [ ok ]
 * Excluding Patch #5012_enable-cpu-optimizations-for-gcc91.patch .. [ ok ]
 * Excluding Patch #5013_enable-cpu-optimizations-for-gcc10.patch .. [ ok ]
 * Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc.patch ...                                                                   [ ok ]
 * Excluding Patch #5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch ...                                                               [ ok ]
 * Excluding Patch #5011_enable-cpu-optimizations-for-gcc8.patch ... [ ok ]
 * Excluding Patch #5012_enable-cpu-optimizations-for-gcc91.patch .. [ ok ]
 * Excluding Patch #5013_enable-cpu-optimizations-for-gcc10.patch .. [ ok ]
 * Applying 1000_linux-6.6.1.patch (-p1) ...                         [ ok ]
 * Applying 1001_linux-6.6.2.patch (-p1) ...                         [ ok ]
 * Applying 1002_linux-6.6.3.patch (-p1) ...                         [ ok ]
 * Applying 1003_linux-6.6.4.patch (-p1) ...                         [ ok ]
 * Applying 1004_linux-6.6.5.patch (-p1) ...                         [ ok ]
 * Applying 1005_linux-6.6.6.patch (-p1) ...                         [ ok ]
 * Applying 1006_linux-6.6.7.patch (-p1) ...                         [ ok ]
 * Applying 1007_linux-6.6.8.patch (-p1) ...                         [ ok ]
 * Applying 1008_linux-6.6.9.patch (-p1) ...                         [ ok ]
 * Applying 1009_linux-6.6.10.patch (-p1) ...                        [ ok ]
 * Applying 1010_linux-6.6.11.patch (-p1) ...                        [ ok ]
 * Applying 1011_linux-6.6.12.patch (-p1) ...                        [ ok ]
 * Applying 1012_linux-6.6.13.patch (-p1) ...                        [ ok ]
 * Applying 1013_linux-6.6.14.patch (-p1) ...                        [ ok ]
 * Applying 1014_linux-6.6.15.patch (-p1) ...                        [ ok ]
 * Applying 1015_linux-6.6.16.patch (-p1) ...                        [ ok ]
 * Applying 1016_linux-6.6.17.patch (-p1) ...                        [ ok ]
 * Applying 1017_linux-6.6.18.patch (-p1) ...                        [ ok ]
 * Applying 1018_linux-6.6.19.patch (-p1) ...                        [ ok ]
 * Applying 1019_linux-6.6.20.patch (-p1) ...                        [ ok ]
 * Applying 1020_linux-6.6.21.patch (-p1) ...                        [ ok ]
 * Applying 1021_linux-6.6.22.patch (-p1) ...                        [ ok ]
 * Applying 1022_linux-6.6.23.patch (-p1) ...                        [ ok ]
 * Applying 1023_linux-6.6.24.patch (-p1) ...                        [ ok ]
 * Applying 1024_linux-6.6.25.patch (-p1) ...                        [ ok ]
 * Applying 1025_linux-6.6.26.patch (-p1) ...                        [ ok ]
 * Applying 1026_linux-6.6.27.patch (-p1) ...                        [ ok ]
 * Applying 1027_linux-6.6.28.patch (-p1) ...                        [ ok ]
 * Applying 1028_linux-6.6.29.patch (-p1) ...                        [ ok ]
 * Applying 1029_linux-6.6.30.patch (-p1) ...                        [ ok ]
 * Applying 1030_linux-6.6.31.patch (-p1) ...                        [ ok ]
 * Applying 1031_linux-6.6.32.patch (-p1) ...                        [ ok ]
 * Applying 1032_linux-6.6.33.patch (-p1) ...                        [ ok ]
 * Applying 1033_linux-6.6.34.patch (-p1) ...                        [ ok ]
 * Applying 1034_linux-6.6.35.patch (-p1) ...                        [ ok ]
 * Applying 1035_linux-6.6.36.patch (-p1) ...                        [ ok ]
 * Applying 1036_linux-6.6.37.patch (-p1) ...                        [ ok ]
 * Applying 1037_linux-6.6.38.patch (-p1) ...                        [ ok ]
 * Applying 1038_linux-6.6.39.patch (-p1) ...                        [ ok ]
 * Applying 1039_linux-6.6.40.patch (-p1) ...                        [ ok ]
 * Applying 1040_linux-6.6.41.patch (-p1) ...                        [ ok ]
 * Applying 1041_linux-6.6.42.patch (-p1) ...                        [ ok ]
 * Applying 1042_linux-6.6.43.patch (-p1) ...                        [ ok ]
 * Applying 1043_linux-6.6.44.patch (-p1) ...                        [ ok ]
 * Applying 1044_linux-6.6.45.patch (-p1) ...                        [ ok ]
 * Applying 1045_linux-6.6.46.patch (-p1) ...                        [ ok ]
 * Applying 1046_linux-6.6.47.patch (-p1) ...                        [ ok ]
 * Applying 1047_linux-6.6.48.patch (-p1) ...                        [ ok ]
 * Applying 1048_linux-6.6.49.patch (-p1) ...                        [ ok ]
 * Applying 1049_linux-6.6.50.patch (-p1) ...                        [ ok ]
 * Applying 1050_linux-6.6.51.patch (-p1) ...                        [ ok ]
 * Applying 1051_linux-6.6.52.patch (-p1) ...                        [ ok ]
 * Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ...                                                                 [ ok ]
 * Applying 1700_sparc-address-warray-bound-warnings.patch (-p1) ... [ ok ]
 * Applying 1730_parisc-Disable-prctl.patch (-p1) ...                [ ok ]
 * Applying 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch (-p1) ...                                                        [ ok ]
 * Applying 2010_netfilter-nf-tables-bail-if-stateful-expr-provides-no-clone.patch (-p1) ...                                                     [ ok ]
 * Applying 2011_netfilter-nf-tables-allow-clone-callbacks-to-sleep.patch (-p1) ...                                                              [ ok ]
 * Applying 2700_ASoC_max98388_correct_includes.patch (-p1) ...      [ ok ]
 * Applying 2800_amdgpu-Adj-kmalloc-array-calls-for-new-Walloc-size.patch (-p1) ...                                                              [ ok ]
 * Applying 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch (-p1) ...                                                                  [ ok ]
 * Applying 2910_bfp-mark-get-entry-ip-as--maybe-unused.patch (-p1)  [ ok ]
 * Applying 2920_sign-file-patch-for-libressl.patch (-p1) ...        [ ok ]
 * Applying 2931_gcc14-drm-i915-Adapt-to-Walloc-size.patch (-p1) ... [ ok ]
 * Applying 2932_gcc14-objtool-Fix-calloc-call-for-new-Walloc-size.patch (-p1) ...                                                               [ ok ]
 * Applying 2990_libbpf-v2-workaround-Wmaybe-uninitialized-false-pos.patch (-p1) ...                                                             [ ok ]
 * Applying 3000_Support-printing-firmware-info.patch (-p1) ...      [ ok ]
 * Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ...               [ ok ]
>>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work
>>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work/linux-6.6.52-gentoo ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work/linux-6.6.52-gentoo ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/work/linux-6.6.52-gentoo ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/gentoo-sources-6.6.52

>>> Install sys-kernel/gentoo-sources-6.6.52 into /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/image
 * >>> Copying sources ...
>>> Completed installing sys-kernel/gentoo-sources-6.6.52 into /var/tmp/portage/sys-kernel/gentoo-sources-6.6.52/image

 * Final size of build directory: 1513320 KiB (1.4 GiB)
 * Final size of installed tree:  1513332 KiB (1.4 GiB)

>>> Completed (1 of 1) sys-kernel/gentoo-sources-6.6.52::gentoo

 * Messages for package sys-kernel/gentoo-sources-6.6.52:

 * Note: Even though you have successfully unmerged
 * your kernel package, directories in kernel source location:
 * /usr/src/linux-6.6.52-gentoo
 * with modified files will remain behind. By design, package managers
 * will not remove these modified files and the directories they reside in.
 * For more detailed kernel removal instructions, please see:
 * https://wiki.gentoo.org/wiki/Kernel/Removal

 * Messages for package sys-kernel/gentoo-sources-6.6.52:

 * If you are upgrading from a previous kernel, you may be interested
 * in the following document:
 *   - General upgrade guide: https://wiki.gentoo.org/wiki/Kernel/Upgrade
 * Install additional packages for optional runtime features:
 *   sys-kernel/installkernel for versioned kernel image installation and optionally automating tasks such as generating an initramfs or unified kernel image

 * GNU info directory index is up-to-date.
(chroot) ubuntu / # eselect kernel list
Available kernel symlink targets:
  [1]   linux-6.6.52-gentoo *
(chroot) ubuntu / # eselect kernel set 1
(chroot) ubuntu / # emerge --ask sys-kernel/genkernel

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 8.27 s (backtrack: 0/20).

[ebuild   R    ] sys-kernel/genkernel-4.3.10

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-kernel/genkernel-4.3.10::gentoo
 * genkernel-4.3.10.tar.xz BLAKE2B SHA512 size ;-) ...               [ ok ]
 * bcache-tools-1.0.8_p20141204.tar.gz BLAKE2B SHA512 size ;-) ...   [ ok ]
 * boost_1_79_0.tar.bz2 BLAKE2B SHA512 size ;-) ...                  [ ok ]
 * btrfs-progs-v6.3.2.tar.xz BLAKE2B SHA512 size ;-) ...             [ ok ]
 * busybox-1.36.1.tar.bz2 BLAKE2B SHA512 size ;-) ...                [ ok ]
 * coreutils-9.3.tar.xz BLAKE2B SHA512 size ;-) ...                  [ ok ]
 * cryptsetup-2.6.1.tar.xz BLAKE2B SHA512 size ;-) ...               [ ok ]
 * dmraid-1.0.0.rc16-3.tar.bz2 BLAKE2B SHA512 size ;-) ...           [ ok ]
 * dropbear-2022.83.tar.bz2 BLAKE2B SHA512 size ;-) ...              [ ok ]
 * eudev-3.2.10.tar.gz BLAKE2B SHA512 size ;-) ...                   [ ok ]
 * expat-2.5.0.tar.xz BLAKE2B SHA512 size ;-) ...                    [ ok ]
 * e2fsprogs-1.46.4.tar.xz BLAKE2B SHA512 size ;-) ...               [ ok ]
 * fuse-2.9.9.tar.gz BLAKE2B SHA512 size ;-) ...                     [ ok ]
 * gnupg-1.4.23.tar.bz2 BLAKE2B SHA512 size ;-) ...                  [ ok ]
 * hwids-20210613.tar.gz BLAKE2B SHA512 size ;-) ...                 [ ok ]
 * open-iscsi-2.1.8.tar.gz BLAKE2B SHA512 size ;-) ...               [ ok ]
 * json-c-0.13.1.tar.gz BLAKE2B SHA512 size ;-) ...                  [ ok ]
 * kmod-30.tar.xz BLAKE2B SHA512 size ;-) ...                        [ ok ]
 * libaio-0.3.113.tar.gz BLAKE2B SHA512 size ;-) ...                 [ ok ]
 * libgcrypt-1.9.4.tar.bz2 BLAKE2B SHA512 size ;-) ...               [ ok ]
 * libgpg-error-1.43.tar.bz2 BLAKE2B SHA512 size ;-) ...             [ ok ]
 * libxcrypt-4.4.36.tar.xz BLAKE2B SHA512 size ;-) ...               [ ok ]
 * LVM2.2.02.188.tgz BLAKE2B SHA512 size ;-) ...                     [ ok ]
 * lzo-2.10.tar.gz BLAKE2B SHA512 size ;-) ...                       [ ok ]
 * mdadm-4.1.tar.xz BLAKE2B SHA512 size ;-) ...                      [ ok ]
 * popt-1.18.tar.gz BLAKE2B SHA512 size ;-) ...                      [ ok ]
 * strace-6.4.tar.xz BLAKE2B SHA512 size ;-) ...                     [ ok ]
 * thin-provisioning-tools-0.9.0.tar.gz BLAKE2B SHA512 size ;-) ...  [ ok ]
 * unionfs-fuse-2.0.tar.gz BLAKE2B SHA512 size ;-) ...               [ ok ]
 * userspace-rcu-0.14.0.tar.bz2 BLAKE2B SHA512 size ;-) ...          [ ok ]
 * util-linux-2.38.1.tar.xz BLAKE2B SHA512 size ;-) ...              [ ok ]
 * xfsprogs-6.3.0.tar.xz BLAKE2B SHA512 size ;-) ...                 [ ok ]
 * xz-5.4.3.tar.gz BLAKE2B SHA512 size ;-) ...                       [ ok ]
 * zlib-1.2.13.tar.gz BLAKE2B SHA512 size ;-) ...                    [ ok ]
 * zstd-1.5.5.tar.gz BLAKE2B SHA512 size ;-) ...                     [ ok ]
 * keyutils-1.6.3.tar.gz BLAKE2B SHA512 size ;-) ...                 [ ok ]
 * Using python3.12 to build
>>> Unpacking source...
>>> Unpacking genkernel-4.3.10.tar.xz to /var/tmp/portage/sys-kernel/genkernel-4.3.10/work
>>> Source unpacked in /var/tmp/portage/sys-kernel/genkernel-4.3.10/work
>>> Preparing source in /var/tmp/portage/sys-kernel/genkernel-4.3.10/work/genkernel-4.3.10 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/genkernel-4.3.10/work/genkernel-4.3.10 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/genkernel-4.3.10/work/genkernel-4.3.10 ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/genkernel-4.3.10

>>> Install sys-kernel/genkernel-4.3.10 into /var/tmp/portage/sys-kernel/genkernel-4.3.10/image
 * Fixing shebang in /usr/share/genkernel/path_expander.py.
>>> Completed installing sys-kernel/genkernel-4.3.10 into /var/tmp/portage/sys-kernel/genkernel-4.3.10/image

 * Final size of build directory:   4412 KiB (  4.3 MiB)
 * Final size of installed tree:  188912 KiB (184.4 MiB)


>>> Installing (1 of 1) sys-kernel/genkernel-4.3.10::gentoo

>>> Completed (1 of 1) sys-kernel/genkernel-4.3.10::gentoo

 * GNU info directory index is up-to-date.


Qui invece la compilazione:

Code:
(chroot) ubuntu / # cd /usr/src/linux
(chroot) ubuntu /usr/src/linux # genkernel --install all --microcode initramfs
* Gentoo Linux Genkernel; Version 4.3.10
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --install all --microcode initramfs

* Working with Linux kernel 6.6.52-gentoo-x86_64 for x86_64
* Using kernel config file '/etc/kernels/kernel-config-6.6.52-gentoo-x86_64' ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending util-linux cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending auxiliary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending btrfs cpio data ...
*         >> Appending modprobed cpio data ...
*         >> Appending modules cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.xz) ...
*
* You will find the initramfs in '/boot/initramfs-6.6.52-gentoo-x86_64.img'.

* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1036

PostPosted: Sun Nov 03, 2024 7:44 am    Post subject: Reply with quote

Eseguendo questo comando crei solo l'initramfs ma non l'immagine del kernel con i relativi moduli
La sola initramfs non basta per avviare il sistema
Code:
genkernel --install all --microcode initramfs


Quote:
Code:
(chroot) ubuntu / # ls -lh /boot
totale 25M
drwxr-xr-x 6 root root 512  2 nov 12.25 grub
-rwxr-xr-x 1 root root 13M 31 ott 08.08 initramfs-6.6.52-gentoo-x86_64.img
-rwxr-xr-x 1 root root 12M 30 ott 20.11 initramfs-6.6.52-gentoo-x86_64.img.old


Di base io utilizzo il seguente comando :
Code:
# genekernel --install --save-config all


Dove va ad installare l'immagine del kernel e la relativa initramfs in /boot (opportunamente montata) , salva la configurazione del kernel in /etc/kernels la quale può essere richiamata o richiamare una versione di configurazione alternativa aggiungendo :

Code:
--kernel-config=/etc/kernels/<conf_alternativa>


Aggiorno il grub e/o utilizzo il comando
Code:
eclean-kernel <opzioni>
per tenere pulita la /boot quando i kernel installti ed i relativi moduli in /lib/modules cominciano ad essere numerosi e non più necessari
e mi aggiorna la configurazione di boot del grub.

Poi facendo un pò di pratica puoi giocare con genkernel modificando /etc/genkernel.conf

Code:
# genkernel --install --save-config --kernel-config=/etc/kernels/tiny.conf --makeopts=-j3 all
* Gentoo Linux Genkernel; Version 4.3.10
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --install --save-config --kernel-config=/etc/kernels/tiny.conf --makeopts=-j3 all

* Working with Linux kernel 6.6.58-gentoo-r1-x86_64 for x86_64
* Using kernel config file '/etc/kernels/tiny.conf' ...
*
* Note: The version above is subject to change (depends on config and status of kernel sources).

* kernel: >> Initializing ...
*         >> Previous config backed up to .config--2024-11-03--09-31-23.bak
*         >> Running 'make mrproper' ...
*         >> Running 'make oldconfig' ...
*         >> Re-running 'make oldconfig' due to changed kernel options ...
*         >> Compiling 6.6.58-gentoo-r1-x86_64 bzImage ...
*         >> Compiling 6.6.58-gentoo-r1-x86_64 modules ...
*         >> Installing 6.6.58-gentoo-r1-x86_64 modules (and stripping) ...
*         >> Generating module dependency data ...
*         >> Compiling out-of-tree module(s) ...
*         >> Saving config of successful build to '/etc/kernels/kernel-config-6.6.58-gentoo-r1-x86_64' ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending util-linux cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending auxiliary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending modprobed cpio data ...
*         >> Appending modules cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.xz) ...

* Kernel compiled successfully!
*
* --no-bootloader set; Skipping bootloader update ...
*
* Required kernel parameter:
*
*       root=/dev/$ROOT
*
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab

* If you require Genkernel's hardware detection features, you MUST
* tell your bootloader to use the provided initramfs file '/boot/initramfs-6.6.58-gentoo-r1-x86_64.img'.

* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.



Quote:

ls /boot -lh
.rw-r--r-- root root 76 KB Tue Oct 29 08:11:37 2024  amd-uc.img
.rw-r--r-- root root 261 KB Sun Oct 27 08:38:53 2024  config-6.6.57-gentoo-dist
.rw-r--r-- root root 261 KB Sun Nov 3 11:22:32 2024  config-6.6.58-gentoo-dist
drwxr-xr-x root root 512 B Thu Jan 1 01:00:00 1970  efi
drwxr-xr-x root root 4.0 KB Sun Nov 3 11:22:38 2024  grub
.rw-r--r-- root root 52 MB Sun Oct 27 08:38:53 2024  initramfs-6.6.57-gentoo-dist.img
.rw-r--r-- root root 52 MB Sun Nov 3 11:22:32 2024  initramfs-6.6.58-gentoo-dist.img
.rw-r--r-- root root 11 MB Sun Nov 3 11:30:22 2024  initramfs-6.6.58-gentoo-r1-x86_64.img
.rw-r--r-- root root 522 KB Wed Oct 30 14:57:44 2024  intel-uc.img
drwxr-xr-x root root 47 B Thu Mar 28 22:02:21 2024  memtest86plus
.rw-r--r-- root root 9.1 MB Sun Oct 27 08:38:53 2024  System.map-6.6.57-gentoo-dist
.rw-r--r-- root root 9.1 MB Sun Nov 3 11:22:32 2024  System.map-6.6.58-gentoo-dist
.rw-r--r-- root root 9.1 MB Sun Nov 3 09:50:38 2024  System.map-6.6.58-gentoo-r1-x86_64
.rw-r--r-- root root 17 MB Sun Oct 27 08:38:53 2024  vmlinuz-6.6.57-gentoo-dist
.rw-r--r-- root root 17 MB Sun Nov 3 11:22:32 2024  vmlinuz-6.6.58-gentoo-dist
.rw-r--r-- root root 17 MB Sun Nov 3 09:51:14 2024  vmlinuz-6.6.58-gentoo-r1-x86_64

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum