13/03/2020, 20:53
Codice:
[guest@localhost guest]$ su
[root@localhost guest]# mkdir -p /mnt
[root@localhost guest]# ls /mnt
[root@localhost guest]# mount /dev/sda4 /mnt
[root@localhost guest]# ls /mnt
bin/ dev/ home/ initrd/ lib/ lost+found/ mnt/ Module.symvers opt/ root/ sbin/ tmp/ var/
boot/ etc/ include/ Lenovo/ lib64/ media/ modules.order null proc/ run/ sys/ usr/
[root@localhost guest]# ls /mnt/boot
boot.backup.sda config-4.12.14-pclos1 gfxmenu grub2/ initrd.img@ System.map-4.12.14-pclos1 vmlinuz-4.12.14-pclos1
config@ EFI/ grub/ initrd-4.12.14-pclos1.img System.map@ vmlinuz@
[root@localhost guest]# ls /mnt/boot/EFI
[root@localhost guest]# mount /dev/sda1 /mnt/boot/EFI # assegna alla partizione di sistema EFI (/dev/sda1) il punto di mount /mnt/boot/EFI
[root@localhost guest]# mount -B /dev /mnt/dev # assegna alla partizione /dev il punto di mount /mnt/dev
[root@localhost guest]# mount -B /proc /mnt/proc # assegna alla partizione /proc il punto di mount /mnt/proc
[root@localhost guest]# mount -B /sys /mnt/sys # assegna alla partizione /sys il punto di mount /mnt/sys
[root@localhost guest]# chroot /mnt # fà in modo che la cartella /mnt venga vista dal sistema come la cartella radice
[root@localhost /]# /boot/grub2/install.sh # avvia lo script /boot/grub2/install.sh
Installing for x86_64-efi platform.
FATAL: Could not load /lib/modules/5.0.2-pclos1/modules.dep: No such file or directory
Installation finished. No error reported.
[root@localhost /]# umount /mnt/sys # smonta la partizione che ha punto di mount /mnt/sys
umount: /mnt/sys: no mount point specified.
[root@localhost /]# umount /mnt/sys
umount: /mnt/sys: no mount point specified.
[root@localhost /]# umount /mnt/proc
umount: /mnt/proc: no mount point specified.
[root@localhost /]# umount /mnt/dev
umount: /mnt/dev: no mount point specified.
[root@localhost /]# umount /mnt/boot/EFI
umount: /mnt/boot/EFI: no mount point specified.
[root@localhost /]# umount /mnt
umount: /mnt: not mounted.
[root@localhost /]#