自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(72)
  • 收藏
  • 关注

原创 操作系统reboot之后ddr内容还在吗?

操作系统,bios, ddr

2022-06-26 11:06:54 1577 1

原创 玩转qemu之制作自定义镜像

制作自动定义镜像的方式很多种,这里介绍使用supermin的方式来完成,下面的实验在ubuntu 18.04 上进, 具体步骤可以参考man supermin。 supermin镜像制作分成两个阶段,第一个阶段是prepare, 第二是build1. prepare:supermin --prepare bash mount coreutils -o supermin.d这里准备要安...

2019-04-21 19:46:48 3581

原创 玩转qemu之内核编译

通过之前的步骤,一个基本的虚机环境就建立起来了,接下来就可以编译linux内核:一种方式是直接从kernel.org上面拿最新的代码来编译,基本步骤如下:1. 获取配置,使用本机的配置文件  cp /boot/config-`uname -r` .config && make olddefconfig2. 编译   make -j $(nproc)3.安装mo...

2019-04-05 10:24:22 812

原创 玩转qemu之NAT

在基本环境搭建这一节中,设置了一个本地网络,虚机只能访问host,无法访问外网,如果需要访问外网需要设置SNATiptables -t nat -A POSTROUTING -s 192.168.120.0/24 ! -d 192.168.120.0/24 -j MASQUERADE这样虚机可以访问外网了在ubuntu系统上面碰到的问题:1.vnet0, virbr0 没有up,...

2019-04-04 08:16:00 2485

原创 玩转qemu之模拟scsi 硬盘

上次提到硬盘接口是virtio的,除了这个以外qemu还提供很多硬盘模拟方式,其中使用传统的scsi硬盘的设置是这样的:/usr/libexec/qemu-kvm -drive id=disk,file=/home/,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0具体参考:https://wik...

2019-04-04 08:10:42 3971

原创 玩转qemu之环境搭建

使用qemu进行开发是非常方便的,首先需要搭建相关的环境,相关的步骤总结如下:1. 下载qemu 并编译安装:./configure --target-list=x86_64-softmmu --disable-slirp && make && make install2. 准备虚机网络环境,这里使用tap组建本地虚机网络 2.1 创建虚...

2019-04-02 07:20:45 1812

转载 vim tips

vim highlight extrawhitespace::highlight ExtraWhitespace ctermbg=red guibg=red:match ExtraWhitespace /\s\+$/http://vim.wikia.com/wiki/Highlight_unwanted_spaces

2018-03-05 11:31:38 191

原创 挖矿入侵记II

上面说到整个事情的经过,下面从程序员的角度来看看这个挖矿程序为啥这么诡异:ps -ef | grep ld-linuxroot 2541 2531 99 10:01 ? 09:06:50 /lib/lib/stak/ld-linux-x86-64.so.2 --library-path /lib/lib/stak /lib/lib/stak/xmr-stak从形式上看ld...

2018-02-12 11:54:19 2861

转载 tcp sync floods

https://blog.dubbelboer.com/2012/04/09/syn-cookies.html

2018-01-13 16:14:52 319

转载 Build executable with ld

如何编译动态可执行文件1. 实例代码如下#include #include #include const char elf_interpreter[] __attribute__((section(".interp"))) = "/lib64/ld-linux-x86-64.so.2";const char *name = "hello world\n";int a;st

2018-01-12 08:35:09 636

转载 Creating container base image of CentOS

1. create rootfs tree:# Create a folder for our new root structure$ export centos_root='/centos_image/rootfs'$ mkdir -p $centos_root# initialize rpm database$ rpm --root $centos_root --initdb# do...

2018-01-06 08:07:51 312

原创 play with docker multi-host networking

http://docker-k8s-lab.readthedocs.io/en/latest/index.html

2017-12-29 09:52:01 297

转载 crash文件分析

参考https://www.dedoimedo.com/computers/crash-analyze.html

2017-12-28 07:00:10 412

转载 一站式学习wireshark

地址: https://community.emc.com/thread/194901?start=0&tstart=0

2017-12-23 17:08:09 199

原创 Attach a long running process to another terminal

步骤:1.启动一个process, 如top,按CTRL-Z 将target process 放入background task2. resume the process in background: bg 3. disown top4. open an session5. reptyr pidoftarget参考:https://blog.ne

2017-12-23 16:48:57 221

原创 Play with lkvm

1.lkvm 是轻量级的kvm虚拟化框架,通过简化系统尽可能去掉legacy设备, 尽可能使用虚拟化设备。在centos上直接下源码编译有问题,但是在ubuntu上可以直接安装安装命令: apt-get install kvmtoolkvmtool需要打开的kernel的virtio-9p相关的驱动:CONFIG_NET_9P=yCONFIG_NET_9P_VIRTIO=y

2017-12-18 21:58:10 447

原创 setup kvm nested virtualization guest

intel vt支持嵌套虚拟化,即在guest 里面继续使用虚拟化功能, xml配置文件如下 <domain type='kvm' id='205'> <name>centos7.3</name> <uuid>9e7ebbbf-8b9d-404a-a4dd-cda8152bd554</uuid> <memory...

2017-12-17 13:10:24 314

转载 rpm builder

源地址: http://ftp.rpm.org/max-rpm/index.html

2017-12-13 09:02:06 332

原创 screen lock 无密码登录

 screen 是一款多窗口模拟软件,可以设置lock功能将session锁住,但是这个可以绕过密码检查机制,直接实现无密码登录, 具体过程记录如下:1. 首先根据screen lock过程中的提示,找到这个提示的地址, 提示如下,要求输入密码。Screen used by root <root>.Password:这个字符在rodata端可以通过如下命令,把所有的字符都...

2017-12-03 17:36:24 757

原创 systemtap 追踪vfs

1. systemtap 提供在脚本中嵌入C代码的功能, 下面给出一个demo, 在vfs_read函数返回的时候打印访问文件的inode,以及path信息。%{#include #include #include #include %}function task_file_handle_d_path:string (task:long, file:long) %{

2017-11-26 09:04:35 859

原创 ssh agent forward

See more details: http://unixwiz.net/techtips/ssh-agent-forwarding.htmlHow to enable ssh agent:on server A: enable it on /etc/ssh/sshd_configAllowAgentForwarding yesssh to server A with option

2016-07-08 10:37:03 818

转载 make autodeps

http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/

2016-03-28 15:28:06 487

原创 git hook之prepare-commit-msg

git内置了九个hook,详细请man hooks其中prepare-commit-msg这个hook是在git commit准备好默认的log信息之后, 在启用editor之前调用的,使用这个信息我们可以对commit信息可以进行编辑,通常的需求是commit的信息需要合乎一定的规范,但是这个规范的动作每次都要自己填写会很麻烦,这就情况下就可以使用这个hook对消息进行编辑。这里假定有这么一

2016-01-27 17:47:05 7323

转载 linux Futex

http://blog.csdn.net/jianchaolv/article/details/7544316#comments引子在编译2.6内核的时候,你会在编译选项中看到[*] Enable futex support这一项,上网查,有的资料会告诉你"不选这个内核不一定能正确的运行使用glibc的程序",那futex是什么?和glibc又有什么关系呢?1. 什么是Fu

2016-01-22 15:21:07 492

转载 DAEMON REPARENTED / INIT --USER

from: https://www.osso.nl/blog/daemon-reparented-init-user/While I was battling an obscure Ubuntu shutdown issue — more about that later — I noticed that daemonized jobs started from my X se

2016-01-20 16:24:40 632

原创 avahi-daemon service

From wiki:avahi is a free zero-configuration networking (zeroconf) implementation, including a system formulticast DNS/DNS-SDservice discovery.Avahi is a system which enables programs

2015-09-30 16:22:55 2243

转载 Persistent block device naming

https://wiki.archlinux.org/index.php/Persistent_block_device_naming

2015-09-12 20:38:17 701

转载 rewinding-git-commit-amend

http://blog.pivotal.io/labs/labs/rewinding-git-commit-amendIt may come to pass that you will amend HEAD with changes that were meant to go on a commit earlier than HEAD viagit commit --amend

2015-09-11 09:58:24 596

原创 createrepo and smart channel

1. createrepo is python script to setup rpm repositories.

2015-09-01 21:12:53 637

转载 部署自己的私有 Docker Registry

From:  http://lishaofengstar.blog.163.com/blog/static/131972852201411585441354/这篇博客讨论了如何部署一个带 SSL 加密、HTTP 验证并有防火墙防护的私有 Docker Registry 。Docker Registry是一个存储和分享 Docker 镜像的服务。本文中我们使用的操作系统是 Ubuntu,

2015-08-24 21:50:27 1094

原创 network namespace tips

linux network namespace offer an intra net in our network. A network namespace includes ethernet interfaces and ip routes.linux network namespace offer mechanism to separate different networks , whi

2015-08-06 22:14:02 563

原创 git rev tips

1. git checkout to previous branchgit checkout -like cd -,  - is an abbreviation of @{-1}, @{-n} denotes the nth previous branch.2. @{n}, ref@{n} the nth rev of ref/current branch git show @{1

2015-08-04 13:37:32 346

转载 usb otg

https://developer.ridgerun.com/wiki/index.php/How_to_use_USB_device_networking

2015-07-17 17:37:21 629

转载 xterm config

xterm config

2015-07-03 15:04:40 1086

原创 GNS3

GNS3 is networking simulator IDE. It's implemented by python and have a nice gui interface.ubuntu repo has a old version(0.8), it's too old. It's latest version is 1.3.7, we want to install the late

2015-06-26 18:32:12 550

原创 xterm run command

create a new xterm window and run some command, after the command executed, keep the window.xterm -hold -e "cmd"

2015-06-26 16:30:08 471

原创 ser2net,socat,netcat

http://techtinkering.com/2013/04/02/connecting-to-a-remote-serial-port-over-tcpip/

2015-06-05 10:04:34 1437

原创 OLDPWD

bash has a environment variable OLDPWD to keep track you last pwd when you cd directoryeg. when you cd a dir and want to copy a file from your place before cdcp $OLDPWD/your_file ./when you fini

2015-06-03 22:58:34 1871

原创 screen

Please ref to this page: http://www.ibm.com/developerworks/cn/linux/l-cn-screen/screen basic usage:1. screen can exit if even you log out or ssh session terminated. That feature is very usefull

2015-06-02 22:34:53 517

原创 telnet

telnet has default open port 23, which will remote login. But it has much more functions and can almost any network service.it'll help you learn network protocols and debug new developed ones.1.

2015-05-31 09:25:42 600

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除