Quick cygwin+opendevkits reinstallation method
The following method should reduce resintallation time from 1 day to 30mn
(Skip this step if you have already a working cygwin configuration)
1) Install cygwin
-Install full cygwin correctly (to c:/cygwin and c:/cygwin_downloads)
-Install open development kits you need (ps2dev, pspdev, openxdk, etc...)
(Takes a full long day, belgium repository is good)
2) Create cygwin_setup1.reg and cygwin_setup2.reg by exporting two registry keys
- star->execute "regedit"
- Select "HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions", right click->export
- Select "HKEY_CURRENT_USER\Software\Cygnus Solutions", right click->export
2) Burn a DVD-R or DVD+R with Nero (UDF format)
Current full version of cygwin plus downloaded files plus opendevkits just fits in 4.5 Gb!
...later (when you need to reinstall cygwin+opendevkits on a new computer)...
3) Double click .reg files
- double click cygwin_setup1.reg
- double click cygwin_setup2.reg
4) Copy quickly cygwin directory to c:\cygwin
(Here I've got a BIG problem. With my old dvd-drive, it could have taken WEEKS
because motor starts & stops at each file copy. Not sure if it's a common behaviour...)
Workaround :
- Install Alcohol 120% (creates a new virtual drive)
- Create a 4.5Gb mdf DVD image on local hard disk (must be NTFS to allow files larger than 4Gb)
- Mount mdf image in virtual drive
- Copy cygwin to directory from virtual drive to c:\cygwin (now it's very fast!)
(I guess, next time, I won't burn downloaded files, and I will burn the mdf image and alcohol 120%)
5) Recover a valid account in cygwin
- start cygwin.bat
- "mkpasswd -l >/etc/passwd"
- "mkgroup -l >/etc/group"
- close cygwin console window
- restart cygwin.bat
6) Fix the odd ].exe filename (I wonder what this thing is for...)
- rename cygwin\bin\_.exe into cygwin\bin\].exe
...Now you will discover many symbolic links no longer work...
(I'm pretty sure an automatic program can be designed to fix all symbolic links)
7) Repair man
Symbolic links can be repaired with this command :
"ln -f (force overwrite) -s (symbolic link) -T <target> <linkfilename>"
(to know what is target, rename existing bad linkfile as linkfile.txt and read it)
- "ln -f -s -T /usr/bin/gzip.exe /usr/bin/gunzip"
8) Repair make (for openxdk open dev kit)
(you can copy command here, right click cygwin console window top and click modify->paste)
- "ln -f -s -T /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe /usr/bin/cc1" (couldn't find link to fix, so I added this one)
- "ln -f -s -T /usr/bin/ld /usr/i686-pc-cygwin/bin/ld.exe"
I didn't need any repair for ps2dev
Feel free to post comments in order to improve the method
Thanks