Guest User

Untitled

a guest
Sep 20th, 2018
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #!/bin/busybox sh
  2.  
  3. ##Initramfs init
  4.  
  5. rescue_shell() {
  6. echo "Something went wrong. Dropping to a shell."
  7. exec sh
  8. }
  9.  
  10. # Mount the /proc and /sys filesystems.
  11. mount -t proc none /proc || rescue_shell
  12. mount -t sysfs none /sys || rescue_shell
  13. mount -t devtmpfs none /dev || rescue_shell
  14.  
  15. # Mount the root filesystem. Опции монтирования из fstab. Найти и подставить UUID соответствующих разделов (blkid /dev/nvme0n1pXXX)
  16. mount -t btrfs -o ssd,compress=lzo,relatime $(findfs UUID=9bf6b693-08dc-4d1f-aa88-bae548d9ae28) /mnt/root || rescue_shell
  17. mount -t vfat $(findfs UUID=E7BC-EE34) /mnt/root/boot/efi || rescue_shell
  18.  
  19. # Boot the real thing.
  20. exec switch_root /mnt/root /sbin/init
  21.  
  22. # Clean up.
  23. umount /proc || rescue_shell
  24. umount /sys || rescue_shell
  25. umount /dev || rescue_shell
Advertisement
Add Comment
Please, Sign In to add comment