This repo contains software to build linux from scratch and package it into rpm files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
3.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. # OVERVIEW:
  2. This build tracks linux from scratch version 9.1
  3. # REQUIREMENTS:
  4. 1. git installed on the host
  5. 2. wget on host system
  6. 3. Directory for build, mounted at /mnt/lfs
  7. There will need to be a partition mounted there.
  8. You will be responsible for that.
  9. This build system uses whatever filesystem that is present at ${LFS}
  10. 4. run version-check.sh and install required packages if needed
  11. # WARNING:
  12. This build system is designed in such a way to not be
  13. able to trash your host system. Mistakes can happen.
  14. I am not responsible for trashed host systems. You
  15. bear all responsibilities for any failures.
  16. # GENERAL NOTES:
  17. This system was designed and debugged on an AMD64 {x86_64} system
  18. and does not support i686.
  19. The build system installs/work directory:
  20. /mnt/lfs/usr/src/LFS-RPM
  21. This build has a mkinitramfs step (which requires cpio) this step
  22. creates an initrd so cpu updates and firmware is loaded.
  23. Your lfs kernel should be configured to use this.
  24. This build has linux-firmware to provide firmware for various
  25. hardware.
  26. See BLFS book for more information.
  27. I have installed rpm macro files in:
  28. /home/lfs/.rpmmacros
  29. This makes the rpm environment correct so it builds
  30. the base system correctly.
  31. # ADDITIONS:
  32. - rpm
  33. - the package manager
  34. - mkinitramfs
  35. - to create initramfs
  36. - cpio
  37. - needed for mkinitramfs
  38. - popt
  39. - needed for rpm
  40. - python2
  41. - needed for rpm
  42. - wget
  43. - needed to fetch packages
  44. - linux-firmware
  45. - needed to boot under certain hardware
  46. # BUILD PROCEDURE:
  47. login as root user
  48. fdisk /dev/sdx partition drive, you need to do this
  49. mkfs.ext4 /dev/sdxx create ext4 filesystem
  50. install -vdm 755 /mnt/lfs create lfs directory
  51. mount /dev/sdxx /mnt/lfs mount partition to work directory
  52. install -vdm 755 /mnt/lfs/usr/src create build directory
  53. cd /mnt/lfs/usr/src goto build directory
  54. Now fetch the build system it will go into /mnt/lfs/usr/src/LFS-RPM by default
  55. git clone https://git.cromer.cl/cromer/LFS-RPM.git
  56. cd LFS-RPM Lets do this
  57. ./setup.sh setup environment and fetches source tarballs
  58. ./lfs.sh build it
  59. ./cleanup.sh cleanup host
  60. Build at this point is complete.
  61. All that is needed is to install grub and/or add a menu item in the
  62. the grub configuration file /boot/grub.cfg
  63. This completes the build.
  64. # GRUB EXAMPLES:
  65. GPT partitioned drive
  66. menuentry 'Linux From Scratch (9.1) (on /dev/sdxx)' {
  67. insmod part_gpt
  68. insmod ext2
  69. set root='hdx,gptx'
  70. linux /boot/vmlinuz-5.5.3 root=/dev/sdxx
  71. initrd /boot/initrd.img-5.5.3
  72. }
  73. MSDOS/BIOS partitioned drive
  74. menuentry 'Linux From Scratch (9.1) (on /dev/sdxx)' {
  75. insmod part_msdos
  76. insmod ext2
  77. set root='hdx,msdosx'
  78. linux /boot/vmlinuz-5.5.3 root=/dev/sdxx
  79. initrd /boot/initrd.img-5.5.3
  80. }
  81. Change the x's to the proper drives and partition
  82. # INSTALLER SCRIPT:
  83. The installer.sh script will take the binary rpms (chapter 6) and
  84. install them into a partition that YOU mounted on /mnt. If you want
  85. to install else where then change ROOTPATH="/mnt" to the installation
  86. partition mounted by YOU.
  87. # SCRIPTS:
  88. - base.sh
  89. - builds chapter 6
  90. - cleanup.sh
  91. - cleanup host system after build
  92. - installer.sh
  93. - install rpm binaries to mounted partition
  94. - lfs.sh
  95. - builds the whole thing
  96. - setup.sh
  97. - configure for build
  98. - tools.sh
  99. - builds chapter 5
  100. - version-check.sh
  101. - checks host system for requirements