Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using usr/gen_initramfs.sh to create initramfs_list?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
bulletbill22
n00b
n00b


Joined: 15 Oct 2022
Posts: 34

PostPosted: Thu Jul 11, 2024 6:07 pm    Post subject: Using usr/gen_initramfs.sh to create initramfs_list? Reply with quote

I am trying to follow along and understand this tutorial: https://wiki.gentoo.org/wiki/Custom_Initramfs#External_file_list

It suggests
Code:
usr/gen_initramfs.sh /usr/src/initramfs | tee ../initramfs.list
as an apparant means of generating an initramfs_list file, then using
Code:
usr/gen_init_cpio ../initramfs.list > ../initramfs.cpio
to create the actual cpio file.

However, invoking usr/gen_initramfs.sh does not create an initramfs_list file, it creates a cpio file. I can see no option to generate an initramfs_list file.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5093
Location: Bavaria

PostPosted: Thu Jul 11, 2024 8:48 pm    Post subject: Re: Using usr/gen_initramfs.sh to create initramfs_list? Reply with quote

bulletbill22 wrote:
However, invoking usr/gen_initramfs.sh does not create an initramfs_list file, it creates a cpio file. I can see no option to generate an initramfs_list file.

There is no option to create an initramfs-List file ... you always have to write it yourself. Maybe this article might help to understand it better:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview
(chapter 3 shows all 4 ways to create an initramfs manually)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Thu Jul 11, 2024 9:51 pm    Post subject: Re: Using usr/gen_initramfs.sh to create initramfs_list? Reply with quote

bulletbill22 wrote:
However, invoking usr/gen_initramfs.sh does not create an initramfs_list file, it creates a cpio file. I can see no option to generate an initramfs_list file.
I think the confusion comes from a poor choice of wording...
Quote:
Instead of creating the list manually, the cpio list and archive can be generated by two tools that are provided by the kernel source files.
"the cpio list and" does seem to imply that it will create the list. What I _think_ is meant, is that it automatically creates it's own "internal" list, not a list for use by users.

When I follow the given instructions, the created archive file contains what could have been put in a list created by the user. For this to work, the files need to be manually copied to the destination directory, or /usr/src/initramfs/<appropriate subdirectories> per the used example.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
bulletbill22
n00b
n00b


Joined: 15 Oct 2022
Posts: 34

PostPosted: Fri Jul 12, 2024 6:57 am    Post subject: Reply with quote

Quote:
root #usr/gen_initramfs.sh /usr/src/initramfs | tee ../initramfs.list


#####################
# /usr/src/initramfs
# Last modified: 1544312413.9519881540

dir /bin 755 0 0
file /bin/busybox /usr/src/initramfs/bin/busybox 755 0 0
dir /dev 755 0 0
nod /dev/console 600 0 0 c 5 1
nod /dev/null 666 0 0 c 1 3
nod /dev/sda1 660 0 6 b 8 1
nod /dev/tty 666 0 5 c 5 0
dir /etc 755 0 0
file /init /usr/src/initramfs/init 744 0 0
dir /lib64 755 0 0
dir /lib 755 0 0
dir /mnt 755 0 0
dir /mnt/root 755 0 0
dir /proc 755 0 0
dir /root 700 0 0
dir /sbin 755 0 0
dir /sys 755 0 0


This implies to me that the output of the command
Code:
usr/gen_initramfs.sh /usr/src/initramfs | tee ../initramfs.list
is
Code:
#####################
# /usr/src/initramfs
# Last modified: 1544312413.9519881540

dir /bin 755 0 0
file /bin/busybox /usr/src/initramfs/bin/busybox 755 0 0
dir /dev 755 0 0
nod /dev/console 600 0 0 c 5 1
nod /dev/null 666 0 0 c 1 3
nod /dev/sda1 660 0 6 b 8 1
nod /dev/tty 666 0 5 c 5 0
dir /etc 755 0 0
file /init /usr/src/initramfs/init 744 0 0
dir /lib64 755 0 0
dir /lib 755 0 0
dir /mnt 755 0 0
dir /mnt/root 755 0 0
dir /proc 755 0 0
dir /root 700 0 0
dir /sbin 755 0 0
dir /sys 755 0 0
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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