PacktPublishing / Mastering-Embedded-Linux-Programming-Third-Edition

Mastering Embedded Linux Programming Third Edition, published by Packt
MIT License
532 stars 151 forks source link

`gen_initramfs_list.sh` command line errors #71

Open Xylopyrographer opened 6 months ago

Xylopyrographer commented 6 months ago

Hi. Referencing MELP, 3rd ed, Chapter 5, Creating a boot initramfs, page 143.

The paragraph starting with "The task of creating an initramfs device table from scratch is made easier..." cites using the script located in linux-stable/usr and to change the UID and GID to 0 and 0. However the command line example is in error and should read (if I understand correctly):

$ bash linux-stable/usr/gen_initramfs_list.sh -u 0 -g 0 rootfs > initramfs-device-table

And in the paragraph after, starting with "Using this script's -o option ..." it is unclear if the example command line should use the -o option? If so, the example command line should be modified how?

Thanks.

fvasquez commented 5 months ago

The book text and command match what Chris had for the 2nd Edition although I agree that the 0 UID and GID don't appear to make sense here.

I think I added the information about the -o option. I should have provided an example of how to use it.

I will dig into the original script to confirm. It also looks like gen_initramfs_list.sh was renamed to gen_initramfs.sh back in 2020.