faisalmemon

Bash

May 1st, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.79 KB | None | 0 0
  1. To run a command as administrator (user "root"), use "sudo <command>".
  2. See "man sudo_root" for details.
  3.  
  4. ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
  5. ubuntu@ubuntu:~$ mount --rbind /proc /mnt/proc
  6. mount: only root can use "--rbind" option
  7. ubuntu@ubuntu:~$ sudo mount --rbind /proc /mnt/proc
  8. ubuntu@ubuntu:~$ sudo mount --rbind /sys /mnt/sys
  9. ubuntu@ubuntu:~$ sudo mount --rbind /dev /mnt/dev
  10. ubuntu@ubuntu:~$ chroot /mnt
  11. chroot: cannot change root directory to '/mnt': Operation not permitted
  12. ubuntu@ubuntu:~$ sudo chroot /mnt
  13. root@ubuntu:/# mount -a
  14. root@ubuntu:/# cd /boot
  15. root@ubuntu:/boot# ls /lib/modules
  16. 4.4.0-57-generic  4.4.0-59-generic
  17. root@ubuntu:/boot# update-initramfs -c -k 4.4.0-57-generic
  18. update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
  19. root@ubuntu:/boot#
Add Comment
Please, Sign In to add comment