2014년 11월 7일 금요일

grub windows 7 and 8 dual boot.

http://askubuntu.com/questions/135272/how-to-boot-into-windows-7-when-grub-is-installed-in-the-windows-partition

A possible work-around to boot Windows 7

Below is a suggestion for editing your GRUB boot commands which may allow you to boot Windows 7. I am not sure this will work, but it seems worth trying.
Currently your grub.cfg uses the GRUB boot commands below to boot Windows 7.
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 1EA0019AA0017A13
    chainloader +1
}
I am suggesting you try changing this and use these commands instead.
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 1EA0019AA0017A13
    ntldr ($root)/bootmgr
}
Here are the steps to do this.
  1. Boot your system to the GRUB menu.
  2. Select (highlight) the GRUB boot menu entry Windows 7 (loader) (on /dev/sda1).
  3. Press e to edit the GRUB boot commands for Windows 7.
  4. Make two changes to this list of commands as illustrated in the menuentry above.
    • Add the command insmod ntldr
    • Change the command
      chainloader +1
      to
      ntldr ($root)/bootmgr
  5. Press either Ctrl+X or F10 to boot using these edited commands.
Note 1:
If the above work-around succeeds in loading the Windows 7 boot menu, then you could make it semi-persistent by
  1. Using sudo to edit the file /etc/grub.d/40_custom and add the second, modified menuentry shown above. (If you do this, I'd also suggest you change the title of this "custom" entry.)
  2. Run the command sudo update-grub to update /boot/grub/grub.cfg to include your customized entry. (It will be on the bottom of the GRUB menu when you boot.)
I would view the suggestion above as only a partly-baked solution. A better solutions is to restore the Windows VBR to the Windows partition without also destroying the ability of GRUB to boot.
I think ... but am not 100% sure ... that the Windows recovery command bootsect can be used to do this. If you want to risk it, one possible way to do this is outlined below.
  • When booting Windows, press F8 to bring up the Advanced Boot Options menu.
  • Select the Repair Your Computer entry.
  • Walk through the next windows until you reach System Recovery Options.
  • Select Command Prompt
  • Run the command bootsect /nt60 C:
But you might also want to wait a bit and see what other answers you get to your question before you take the risk of trying the above.
Note 2:
While searching for other things, I ran across two other questions on AskUbuntu which are related to your problem.
  1. Windows 7 won't boot after installing Ubuntu 11
  2. Windows 7 doesn't boot after Ubuntu install
I'm not sure how much help these questions provide. The answer to the second question was to use the command bootrec /fixboot to restore the VBR for the Windows partition. My understanding from that question was that using the bootrec /fixboot command solved the problem.
But the second question insists that bootrec /fixboot did not solve the problem.
(Beats the heck out of me as to what might be going on there.)

2014년 9월 20일 토요일

extend trial period of windows 8.1 enterprise

Re: 'Windows is in notification mode' message

Hi, Actually I have found another solution : just go to cmd.exe, open as admistrator and then type in : "slmgr -rearm" and restart computer.

It give another delay, and it is repeatable to inifnity.

I'll try your way too, thought. Thanks!

2014년 8월 28일 목요일

How to freeze date/time in VMWARE

https://forums.virtualbox.org/viewtopic.php?t=11234


How to freeze date/time in VirtualBox?




this can be achived by editing the *.vmx file and adding:

time.synchronize.continue = "FALSE"
time.synchronize.restore = "FALSE"
time.synchronize.resume.disk = "FALSE"
time.synchronize.shrink = "FALSE"
rtc.startTime = 1199206860
time.synchronize.tools.startup = FALSE


UTC seconds calculator


http://www.mbari.org/staff/rich/utccalc.htm

2014년 8월 9일 토요일

Keep video full screen with multiple monitors (Firefox)

2012-11-24: Browser tip: Keep video full screen with multiple monitors (Firefox)

Posted at 2012-11-24 22:46:28 by SHD
If you have multiple monitors and use Firefox to view a HTML5 video (using the tag, such as in the YouTube HTML5 player) or perhaps have a WebGL game that runs full-screen, you will find that the moment you click away to another window on the other monitor, Firefox leaves full-screen mode. This makes it completely useless for watching video while doing something else. There is a fix for it.
Keep video full screen on a secondary monitor.
In Firefox, go to about:config, find a property called full-screen-api.exit-on-deactivate and set it to false (which you can do by doubleclicking on it). No need to restart the browser. It'll keep your full-screen content full-screen. Quite why this isn't the default is beyond me. Of course, to get out of full-screen mode, just press Esc.
Source: Bugzilla Bug #724554.

Comments

Thank you!
Posted at 2013-01-22 15:29:46 by Brad
Thanks a lot for this, way easier than lifehacker's modified dll (that can always prove to be a virus). Actually on my setup the property either was not visible or wasn't there at all, so I right clicked, created it as a boolean and set it to false... and it did the trick.

Nice find and huge thanks.
Cheers.

2014년 4월 15일 화요일

Ubuntu 12.04 - select version of java

http://askubuntu.com/questions/84491/cannot-execute-java-program-unsupportedclassversionerror


 
It looks like you've compiled the Java source with a newer version of Java (7) which cannot be executed by the older Java runtime (6). If you don't need/want Java 7, uninstall the openjdk-7-jdk package and install openjdk-6-jdk instead:
sudo apt-get remove openjdk-7-jdk
sudo apt-get install openjdk-6-jdk
The alternative is using the direct paths to the specific versions of the compiler or runtime:

Running the Java 7 runtime

It's possible that Java 6 is still the default (compatibility with older programs?). To force the use of the Java 7 runtime, use the direct path to it:
/usr/lib/jvm/java-7-openjdk-amd64/bin/java tes
(replace amd64 by i386 for the 32-bit version of Java)

Running the Java compiler version 6

If you want to have code compiled for Java version 6, use the full path to the Java 6 compiler:
/usr/lib/jvm/java-6-openjdk/bin/javac tes.java

Alternatives

Like I've said before, if you don't like version 7 or 6, uninstall it (openjdk-7-jdk and openjdk-7-jre for version 7, openjdk-6-jdk and openjdk-6-jre for version 6). It's possible to have both versions installed. Use the alternatives system to configure the default one. Run the below commands to configure the runtime and compiler. It'll provide you a choice for the default.
sudo update-alternatives --config java
sudo update-alternatives --config javac

2014년 3월 21일 금요일

pigz, tar - nautilus setting for multithreading

Use all cores for encoding and decoding file!

alias for .bashrc
alias tar='tar --use-compress-program="pigz --fast --recursive | pv"'


i.e)
Compress
tar --use-compress-program="pigz --best --recursive | pv" -cf archive.tar.gz YourData

with alias
tar -cf archive.tar.gz YourData


Decompress
pigz -dc target.tar.gz | pv | tar xf -

=========================


Monitor progress in a terminal
*use 'pv ' for watch progress



ex) tar -c Music | pv | pigz -0 > ./backup.tar.gz

pigz -0 => compress level 0 (no compress), replace number with proper level. level 9 is max.

 another example)
//set value in ./bashrc



alias tar="tar --use-compress-program=pigz"

//reload bashrc
source ~/.bashrc


How to unzip pigz
http://serverfault.com/questions/270814/fastest-way-to-extract-tar-gz

pigz -dc target.tar.gz | tar xf -

Or

tar -xvf --use-compress-program=pigz filenamehere

2014년 3월 15일 토요일

Remove grub2 from window partition.

actual command followed by #

1. boot from windows boot media(disk, usb..)

2. select 'repair window'

3. select command line tool

4. # diskpart

5. # list volume

6. # select volume 0(replace 0 with the number  volume of current boot media)

7. # cd ../boot

8. # bootsect /nt60 c: /mbr

9.reboot!

2014년 1월 21일 화요일

Nautilus Actions 를 사용한 디렉토리별 7z 압축. 우분투


Nautilus Actions 를 사용한 디렉토리별 7z 압축. 우분투

노틸러스에서는, 디렉토리를 몇 개 클릭한 뒤 각 '디렉토리별'로 압축을 하는 것이 불가능하다. 디렉토리를 한꺼번에 압축하는 것만 가능하다. (가능/불가능을 떠나서, 기본적으로 그 기능만 제공된다.)
이것과 관련하여 이런 글을 쓴 적이 있다.

http://nemonein.egloos.com/4740461

저 글에서 사용한 방법은 노틸러스 스크립트인데, 단점은 모든 디렉토리를 압축한다는 것이다.
원하는 디렉토리만 선별하여 각각 디렉토리명으로 압축을 할 수는 없을까?

왜 없겠니..

지금부터 사용할 방법은 Nautilus Actions 를 이용한다.

먼저 Bash 스크립트를 작성해야 한다. ~/bin 등에 저장한다.

#!/bin/bash

for folder ## 선택한 디렉토리명을 Nautilus Actions 로부터 공백으로 구분하여 모두 전달받는다.
do
 
  7z a -mx0 -mmt "${folder%/}.7z" "$folder"
  # %/ 이므로, 문자열의 끝에 / 이 있으면 삭제하고, 없으면 그대로 반환한다. %/* 과는 다르다.
 
done

# mx0 은 묶기만, mx9 는 최대압축

notify-send "7z 압축 완료!"

주석으로 설명 대체.

다음, NA 에서 설정법이다.

이름은 적당히 주고, Action 탭에서 'Display item in selection context menu' 만 선택한다.
Command 탭은 다음과 같이.


%F 를 줘서, 선택한 디렉토리명을 공백으로 구분하여 실행할 스크립트에 모두 전송하도록 한다.
이것을 스크립트에서 받아, for 문을 돌리며 하나씩 수행하는 것이다.

여기까지만 해도 되지만, 오동작을 방지하기 위하여 mime 설정을 추가한다.


이렇게 하면, 노틸러스에서 디렉토리를 선택했을 경우에만 NA 메뉴에 위 Action 이 나타난다. (파일을 선택했을 땐 나타나지 않는다.)


.....................

사용법은 간단하다.
원하는 디렉토리를 임의로 선택한다. 연달아 선택하지 않아도 상관없다.
선택한 후, NA 메뉴에서, 위 액션을 선택하면 현재 디렉토리에 선택한 디렉토리명을 파일명으로 하는 7z 압축파일이 생긴다.

2014년 1월 16일 목요일

command to zip multiple directories into individual zip files

http://unix.stackexchange.com/questions/68489/command-to-zip-multiple-directories-into-individual-zip-files

for i in */; do zip -r "${i%/}.zip" "$i"; done

i is the name of the loop variable. */ means every subdirectory of the current directory, and will include a trailing slash in those names. Make sure you cd to the right place before executing this. "$i" simply names that directory, including trailing slash. The quotation marks ensure that whitespace in the directory name won't cause trouble. ${i%/} is like $i but with the trailing slash removed, so you can use that to construct the name of the zip file.

If you want to see how this works, include an echo before the zip and you will see the commands printed instead of executed.

sublime close without confirmation

  Close without confirm   Yes, you can just write a plugin to set the view as scratch and close it. Then create a keybinding for that c...