[root@h101 nc]# mkdir /mnt/testboot
[root@h101 nc]# mount -o loop /tmp/nc/h102.boot.backup /mnt/testboot/
[root@h101 nc]# cd /mnt/testboot/
[root@h101 testboot]# ls
config-2.6.32-504.el6.x86_64 initramfs-2.6.32-504.el6.x86_64.img symvers-2.6.32-504.el6.x86_64.gz
efi initrd-2.6.32-504.el6.x86_64kdump.img System.map-2.6.32-504.el6.x86_64
grub lost+found vmlinuz-2.6.32-504.el6.x86_64
[root@h101 testboot]# cd grub/
[root@h101 grub]# ls
device.map fat_stage1_5 grub.conf jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 vstafs_stage1_5
e2fs_stage1_5 ffs_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 stage1 ufs2_stage1_5 xfs_stage1_5
[root@h101 grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_temp-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-504.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/vg_temp-lv_root rd_LVM_LV=vg_temp/lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_temp/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.el6.x86_64.img
[root@h101 grub]#
[root@h101 grub]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_temp-lv_root
50G 7.9G 39G 17% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 477M 34M 419M 8% /boot
/dev/mapper/vg_temp-lv_home
5.4G 12M 5.1G 1% /home
/tmp/nc/h102.boot.backup
477M 34M 419M 8% /mnt/testboot
[root@h101 grub]#
[root@h102 nc]# mkfifo /tmp/cmd_fifo
[root@h102 nc]# ll /tmp/cmd_fifo
prw-r--r-- 1 root root 0 Nov 17 22:29 /tmp/cmd_fifo
[root@h102 nc]# cat /tmp/cmd_fifo | /bin/bash -i 2>&1 | nc -l 6789 > /tmp/cmd_fifo
----------
[root@h101 grub]# nc h102 6789
[root@h102 nc]#
[root@h102 nc]# ls
ls
abc
file.txt
tmp
xx
[root@h102 nc]# ls -l
ls -l
total 44
-rw-r--r-- 1 root root 662 Nov 17 19:35 abc
-rw-r--r-- 1 root root 10 Nov 17 21:53 file.txt
drwxr-xr-x 3 root root 4096 Nov 17 19:40 tmp
-rw-r--r-- 1 root root 30720 Nov 17 19:40 xx
[root@h102 nc]# echo "NB"
echo "NB"
NB
[root@h102 nc]# hostname
hostname
h102.temp
[root@h102 nc]# ip a
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b6:a8:f8 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.80/24 brd 192.168.2.255 scope global eth3
inet6 fe80::20c:29ff:feb6:a8f8/64 scope link
valid_lft forever preferred_lft forever
3: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b6:a8:02 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.102/24 brd 192.168.100.255 scope global eth2
inet6 fe80::20c:29ff:feb6:a802/64 scope link
valid_lft forever preferred_lft forever
[root@h102 nc]#
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有