Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. mount -v -n -t proc -onodev,noexec,nosuid proc /proc
  4. mount -v -n -t sysfs -onodev,noexec,nosuid sysfs /sys
  5.  
  6. mount -v -t ext4 /dev/sdb1 /mnt/root
  7.  
  8. mount --move /dev /mnt/root/dev/
  9. mount --move /proc /mnt/root/proc/
  10. mount --move /sys /mnt/root/sys/
  11.  
  12. echo "Switching root filesystem..."
  13. cd /mnt/root
  14. pivot_root . mnt/tmp/
  15.  
  16. exec chroot . /sbin/init
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement