Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/busybox sh
- ##Initramfs init
- rescue_shell() {
- echo "Something went wrong. Dropping to a shell."
- exec sh
- }
- # Mount the /proc and /sys filesystems.
- mount -t proc none /proc || rescue_shell
- mount -t sysfs none /sys || rescue_shell
- mount -t devtmpfs none /dev || rescue_shell
- # Mount the root filesystem. Опции монтирования из fstab. Найти и подставить UUID соответствующих разделов (blkid /dev/nvme0n1pXXX)
- mount -t btrfs -o ssd,compress=lzo,relatime $(findfs UUID=9bf6b693-08dc-4d1f-aa88-bae548d9ae28) /mnt/root || rescue_shell
- mount -t vfat $(findfs UUID=E7BC-EE34) /mnt/root/boot/efi || rescue_shell
- # Boot the real thing.
- exec switch_root /mnt/root /sbin/init
- # Clean up.
- umount /proc || rescue_shell
- umount /sys || rescue_shell
- umount /dev || rescue_shell
Advertisement
Add Comment
Please, Sign In to add comment