Monday, December 22, 2014

bootup ubuntu-server-14.10 from pxe

step 1.
download netboot
wget -r --no-parent http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-i386/current/images/netboot/

step 2,
move netbook to /tftpboot/

step 3,
update /etc/dhcp/dhcpd.conf

subnet 192.168.32.0 netmask 255.255.255.0 {
  range 192.168.32.2 192.168.32.254;
  option routers 192.168.32.1;
  option domain-name-servers 192.168.32.1;
  filename "/netboot/pxelinux.0";
}

step 4.
power on the PC and choose boot from pxe option.

that's almost all.

bootup kali fro pxe

Bootup kali from pxe is almost like the way in bt5r3.

The difference lists below,

/tftpboot/pxelinux.cfg/default

TIMEOUT 100
DEFAULT kali
PROMPT 1
DISPLAY /isolinux.msg

LABEL kali
  KERNEL kali/install/vmlinuz
  APPEND initrd=kali/install/initrd.gz BOOT=install boot=install nopersistent rw quiet vga=0x317 netboot=nfs nfsroot=192.168.32.1:/tftpboot/kali

By the way, this time my experiment is working on vmware fusion to test this function, during the experiment, the vmware fusion is looking for ldlinux.c32 instead pxelinux.0, so my workaround is to copy a ldlinux.c32 to /tftpboot.
( In kali, ldlinux.c32 is in /usr/lib/syslinux/. )

Troubleshoot,
If the monitor compliant resolution out of range, try to change the vga option, for example vga=0x314.

Reference
http://linuxandfriends.com/vga-modes-used-linux/

Wednesday, December 17, 2014

28232 and 64511

28232 is a magic number.
it is different between 32768 and 61000.
32768 and 61000 is usually the definition of /proc/sys/net/ipv4/ip_local_port_range

so the whole story is that when i wrote a tcp client, i found that the maximum connection the tcp client created is always 28232, so i searched this number in google and found the reason.

The work around is
check the current definition first,
> cat /proc/sys/net/ipv4/ip_local_port_range

Change the definition
> echo "net.ipv4.ip_local_port_range = 1024 65535" >> /etc/sysctl.conf
> sysctl -p

After this setting, the maximum connection created by a tcp client will be 64511 - another magic number.

Reference:
http://www.cnblogs.com/yoleung/articles/1288568.html

Friday, November 07, 2014

Travel in Japan Day 7

2014/01/23 第 7 天

今天的行程是, 先搬行李到道頓堀飯店, 再到 outlet 逛

Toyoko Inn
IMG_20140123_082221

今天的早餐
IMG_20140123_082907

IMG_20140123_082919

從 toyoko inn check out 啦
_MG_7769

開始推行李啦
_MG_7770

再推
_MG_7772

_MG_7774

_MG_7777

終於到了
_MG_7780

checkin
_MG_7786

準備去臨空城 outlet 啦
_MG_7798

Outlet 到啦
_MG_7812

_MG_7829

摩天輪
_MG_7818

在這家買了 2 支 OP
DSCN2169

_MG_7841

在這家買了 1組3隻刀具+1支剪刀

_MG_7843

_MG_8549

準備回難波

偶遇鐵人頭

_MG_7849

_MG_7846

下午逛街去

今天的甜點
IMG_20140123_201936

_MG_7855

_MG_7856

_MG_7857

今天的戰利品
_MG_7858

_MG_7859


Travel in Japan Day 6

2014/01/22 第6天

今天的行程是去大阪環球影城 Universal City
1. 裡面沒啥東西吃
2. 排隊
3. 買紀念品

門票,  先在台灣旅行社買
_MG_7589

_MG_7590

環球影城門口
_MG_7598

_MG_7599

_MG_7602

看完 Spiderman
DSCN2047

合影
_MG_7615

看完時光飛車
DSCN2054

中餐 - 火雞腿肉
_MG_7642

_MG_7644

_MG_7649

看完大白鯊
DSCN2090

準備吃下午茶啦
_MG_7693

_MG_7695

wonderland
_MG_7697

Hello Kitty
_MG_7701

跟 Elmo 合影
_MG_7710

跟 Spiderman 合影
DSCN2119

合影
DSCN2147

DSCN2150

夜晚的環球影城
_MG_7743

紀念品 (最後送光了)
_MG_8589

天黑了
_MG_7745

_MG_7747

今天的晚餐
IMG_20140122_191141

IMG_20140122_191147

IMG_20140122_191439

今天的飯後甜點
_MG_7754