Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\0cmd-mintty]
@="Open Mintty Window Here"
[HKEY_CLASSES_ROOT\Directory\shell\0cmd-mintty\command]
@="C:\\cygwin\\bin\\mintty.exe -e /usr/bin/bash --login -c \"cd \\\"`cygpath -u '%1'`\\\"; exec bash\""
Tuesday, October 18, 2011
Cygwin: Windows Context Menu
Friday, February 05, 2010
Solaris10 (sparc) jumpstart from Linux
Install a minimal RHEL 5.4
Add dhcpd and tftp-server packages, if necessary
Configure dhcpd
Here is my config file. My server's ip is 192.168.1.1.
ddns-update-style interim;
ignore client-updates;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
next-server 192.168.1.1;
# Jumpstart Support
option space SUNW;
option SUNW.root-mount-options code 1 = text;
option SUNW.root-server-ip-address code 2 = ip-address;
option SUNW.root-server-hostname code 3 = text;
option SUNW.root-path-name code 4 = text;
option SUNW.swap-server-ip-address code 5 = ip-address;
option SUNW.swap-file-path code 6 = text;
option SUNW.boot-file-path code 7 = text;
option SUNW.posix-timezone-string code 8 = text;
option SUNW.boot-read-size code 9 = unsigned integer 16;
option SUNW.install-server-ip-address code 10 = ip-address;
option SUNW.install-server-hostname code 11 = text;
option SUNW.install-path code 12 = text;
option SUNW.sysid-config-file-server code 13 = text;
option SUNW.JumpStart-server code 14 = text;
option SUNW.terminal-name code 15 = text;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
option broadcast-address 192.168.1.255;
#option routers 192.168.1.1;
option host-name "solaris10-jumper1";
vendor-option-space SUNW;
option SUNW.sysid-config-file-server "jumpstartserver:/home/jumpstart/config";
option SUNW.JumpStart-server "jumpstartserver:/home/jumpstart/config";
option SUNW.install-server-hostname "jumpstartserver";
option SUNW.install-server-ip-address 192.168.1.1;
option SUNW.install-path "/home/jumpstart/install";
option SUNW.root-server-hostname "jumpstartserver";
option SUNW.root-server-ip-address 192.168.1.1;
option SUNW.root-path-name "/home/jumpstart/install/Solaris_10/Tools/Boot";
}
Configure NFS
For some reason, you have to disable NFSv4 on the server. See this page:
http://www.jroller.com/jasonf/entry/solaris_10_nfs_client_connectingPay special attention to the comment left by Lars Rohrbach.
My /etc/exports file looks like this:
/home/jumpstart/install 192.168.1.0/255.255.255.0(ro,sync,no_root_squash)
/home/jumpstart/config 192.168.1.0/255.255.255.0(ro,sync,no_root_squash)
TFTP
Enable tftp by editing the /etc/xinet.d/tftp file.
Tftp files (at least with RHEL5) are served by default from /tftpboot. The Solaris sparc bootloader(?) needs to be copied to this directory. In my situation, I copied /install/Solaris_10/Tools/Boot/platform/sun4v/inetboot from the Solaris10 install dvd and renamed it SUNW.Sun-Fire-T1000. If you're not installing a T1000, you will rename it to something different. Also, the folder that inetboot was in, sun4v, may change too. I deduced the filename, SUNW.Sun-Fire-T1000, by looking at tcpdump output and I figured out the architecture(?), sun4v, by googling.
DVD Contents
For simplicity, I mounted (instead of copying) the Solaris 10 sparc dvd at /home/jumpstart/install.
Configuration
/home/jumpstart/config/any_machine:
install_type initial_install
system_type server
partitioning explicit
filesys rootdisk.s0 10000 /
filesys rootdisk.s1 1000 swap
filesys rootdisk.s4 10000 /home
filesys rootdisk.s5 free /var
cluster SUNWCreq
/home/jumpstart/config/sysidcfg:
system_locale=en_US
timezone=US/Pacific
terminal=vt100
timeserver=localhost
network_interface=e1000g0 {hostname=client1
netmask=255.255.255.0
protocol_ipv6=no
default_route=192.168.1.1}
name_service=NONE
security_policy=NONE
nfs4_domain=dynamic
/home/jumpstart/config/rules:
#
# The following rule matches any system:
any - - any_machine -
/home/jumpstart/config/rules.ok:
any - - any_machine -
# version=2 checksum=num
Start the Install
From the Solaris ">" prompt, issue a "boot net:dhcp - install"
That's it!
Wednesday, December 09, 2009
Extract files from an ISO in Linux (or Windows) without root
7z x -oOutputDir LargeLinuxIso.iso
Friday, November 20, 2009
Custom RHEL / OEL 5.4 CD (iso) with kickstart
$ createrepo -u "media://`head -1 ../.discinfo`" -g repodata/comps-rhel5-server-core.xml .
mkisofs -r -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat -x "lost+found" -o ../oel5Custom.iso .
Friday, November 06, 2009
Ozone mobile web browser
Tuesday, October 06, 2009
How to (easily) mount a CDROM in Solaris
for device in `ls /dev/dsk`; do mount -F hsfs -o ro /dev/dsk/$device /mnt/cdrom; done
Thursday, September 24, 2009
Convert p4 cygwin commands to p4 win commands
Here’s a simple little script which allows me to use p4.exe from cygwin. Perforce actually releases a p4.exe for cygwin, but I wanted my p4win and p4.exe to be able to use the same client spec. This isn’t possible when one requires a root starting with “C:\” and the other requires “/cygdrive/c/”.
This script works by expanding and window-izing all arguments after the p4 command.
Here is a series which shows the transformation.
- p4 edit README
- p4 edit /home/gwarner/foo/README (where foo is a symbolic link)
- p4 edit /cygdrive/c/perforceRoot/blah/blah/blah/README
- p4 edit C:\perforceRoot\blah\blah\blah\README
Ta da!
1. #!/usr/bin/python
2. import sys
3. from subprocess import *
4.
5. def win32Path(path): path = path.replace('/cygdrive/c/','C:\\')
6. path = path.replace('/','\\')
7. return '"%s"' % path.strip()
8. if __name__ == '__main__':
9. p4command = sys.argv[1]
10. fullFiles = []
11.
12. for file in sys.argv[2:]:
13. fullPath = Popen(['readlink.exe -f ' + file], stdout=PIPE, shell=True).communicate()[0]
14. fullFiles.append(win32Path(fullPath))
15.
16. newCommand = 'p4 %s %s' % (p4command, ' '.join(fullFiles))
17.
18. print newCommand
19. check_call(newCommand, shell=True)
20. print 'done.'