logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

linux.sh (1091B)


  1. #!/bin/bash
  2. #
  3. # SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
  4. #
  5. # SPDX-License-Identifier: GPL-3.0-or-later
  6. . /steps/bootstrap.cfg
  7. set -e
  8. # Perform the actual kexec
  9. if [ "${KERNEL_BOOTSTRAP}" = True ]; then
  10. mv "/High Level Prototypes" "/High_Level_Prototypes"
  11. sync
  12. # We don't use the gen_initramfs_list.sh script because it is so *SLOW*
  13. # This emulates the same thing it does
  14. find / -xdev -type d -printf "dir %p %m %U %G\n" >> /initramfs.list
  15. find / -xdev -type f -printf "file %p %p %m %U %G\n" >> /initramfs.list
  16. find / -xdev -type l -printf "slink %p %l %m %U %G\n" >> /initramfs.list
  17. kexec-linux "/dev/ram1" "/boot/vmlinuz" "!gen_init_cpio /initramfs.list | bzip2 -c"
  18. else
  19. mkdir /etc
  20. # kexec time
  21. if [ "${BARE_METAL}" = True ]; then
  22. kexec -l "/boot/vmlinuz" \
  23. --append="root=/dev/sda1 rootfstype=ext3 init=/init rw rootwait"
  24. else
  25. kexec -l "/boot/vmlinuz" --console-serial \
  26. --append="console=ttyS0 root=/dev/sda1 rootfstype=ext3 init=/init rw rootwait"
  27. fi
  28. kexec -e
  29. fi