GlobalOS wiki
From NuclearCat's homepage
Contents |
Installing GlobalOS
(do not use this part, not finished yet)
- Download from http://www.globalos.info/globalos-install.bin
If you have Windows:
- Download http://m0n0.ch/wall/downloads/physdiskwrite-0.5.1.zip (software page: http://m0n0.ch/wall/physdiskwrite.php )
- Write image to USB stick or other media, physdiskwrite globalos-install.bin
If you have Linux:
- dd if=globalos-install of=/dev/yourmedia . Note, you need to specify device, not partition. For example /dev/sdc1 - WRONG, /dev/sdc - CORRECT.
Updating GlobalOS
Just run command
gs update
Network configuration
nano /config/network.cfg
Here is example of good network configuration:
#!/bin/sh #I want name of my host GlobalOSRouter hostname GlobalOSRouter # DNS echo "nameserver 2.2.2.10" >/etc/resolv.conf #Flush all network addresses from interface ip addr flush dev eth0 #Add ip 10.0.0.5 with netmask /24 (255.255.255.0) to interface eth0 ip addr add 10.0.0.5/24 dev eth0 #Bring interface up ip link set eth0 up #Add default route ip route add default via 10.0.0.1 #Sync time with time server (not ntp!) #rdate -s 2.2.2.10 #Save time to NVRAM #hwclock -w
Why i am using flush? Because it is nice, if you want to change ip address, you just edit address and run
sh /config/network.cfg
System will be unreachable for short period of time (less than second), but then it will appear online!
If something went wrong, you just can reboot system, and old config will be back
gs saveand tested configuration will be saved
If you just want to add temporary ip, do it by issuing commands by ssh, without altering network.cfg. For example:
ip addr add 10.0.1.1/24 dev eth1
Thats it. Sure when you reboot, all this changes will be lost.
Assigning CoS fields to packets
IFACE - some VLAN interface
vconfig set_egress_map ${IFACE} 3 3
vconfig set_egress_map ${IFACE} 2 2
tc filter add dev ${IFACE} parent 1: protocol ip u32 match ip protocol 1 0xff action skbedit priority 2
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 match ip src 1.2.3.4/32 action skbedit priority 3
tc filter add dev ${IFACE} protocol ip pref 100 parent 1: u32 match u32 0 0 action skbedit priority 0
hfsc usage example
DEV=eth0.2022
#DEV=eth0
ROOTRATE=118000
tc qdisc del dev ${DEV} root
tc qdisc add dev ${DEV} root handle 1: hfsc
## CLASS ##
## CLASS ## 1: ## 1:50 ##
tc class add dev ${DEV} parent 1: classid 1:50 est 1sec 8sec hfsc sc rate 95000kbit ul rate 95000kbit
tc class add dev ${DEV} parent 1:50 classid 1:51 est 1sec 8sec hfsc sc rate 30000kbit ul rate 95000kbit #newnet
tc class add dev ${DEV} parent 1:50 classid 1:52 est 1sec 8sec hfsc sc rate 27000kbit ul rate 95000kbit #worldnet
Other things same as htb
1:1 NAT by iproute2 (not working yet?)
tc filter add dev eth0 parent ffff: protocol ip prio 10 u32 match ip dst 1.2.3.4/32 flowid 1:1 action nat ingress 1.2.3.4 4.5.6.7
Serial console howto
Add to /config/rc.local
modprobe 8250_pnp echo "" >>/etc/inittab echo "tty4::respawn:/sbin/getty 9600 ttyS0" >>/etc/inittab killall -1 init
