Wednesday, December 4, 2013

Extending a ext4 partition without losing data

umount /boot
parted /dev/sdb
(parted) print
Model: ATA Patriot Torqx 2 (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 12.9GB 12.9GB primary type=83
2 12.9GB 13.0GB 107MB primary ext4 type=83
(parted) rm 2
(parted) mkpart
Partition type? primary/extended? primary
File system type? [ext2]?
Start? 12.9GB
End? 13.4GB
(parted) quit
resize2fs /dev/sdb2
resize2fs 1.42.6 (21-Sep-2012)
Filesystem at /dev/sdb2 is mounted on /boot; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/sdb2 is now 498688 blocks long

Sunday, July 14, 2013

IEEE 802.3 vs EthernetII

IPv4/6 uses Ethernet II frame format almost exclusively. In 802.3 there must be a LLC/SNAP header to indicate which upper layer protocol to use. The first 20 bytes of both framing format are the same. The differences is

  • 802.3 : uses a 2 bytes length field
  • EthernetII: uses a 2 bytes type field. 


To differentiate between them 802.3 values < 0x0600 (1536), Ethernet II >= 0x0600

802.2 LLC header:

DSAP address SSAP address Control field Information field
8 bits 8 bits 8 or 16 bits N * 8 bits

802.2 SNAP haeder:
LLC SNAP
AA AA 03 00 00 00 08 00
3 octet OUI 2 octet TYPE-field

Wednesday, May 8, 2013

Windows 2008/7 Network Discovery

To allow your computer and shared resources to be visble in network list.
  • Start "Function Discovery Resource Publication"
  • Set Firewall to allow Network Discovery
When you use Network and Sharing Centre-> Change advanced sharing settings
  • To turn on network discovery , Function Discovery  started, SSDP Discovery  started, UPnP device hoststarted

Wednesday, April 10, 2013

Hyper-v management

http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/01/17/allowing-non-administrators-to-control-hyper-v.aspx

Runnning a program as a priviledged user

  1. Using impersonation code:
  2. Uisng App manifest in a .net project :
    • create a new App.Manifest item in project and add
  3. using powershell command to spawn a new process:
    • $password = ConvertTo_SecurityString "password"
    • $cred = New-Object System.Management.Automation.PSCredential("username", $password)
    • start-process process-name -verb RunAs $cred