quarta-feira, julho 29, 2009

Como Mudar a Sequencia de Boot no Vista/XP Dualboot

Note: In case you want to dual boot your system with Windows XP and Windows Vista, install Windows XP first.

The primary tool to edit Windows Vista boot configuration is BCDEdit.exe, a tool which is included in Windows Vista distribution in the C:\windows\system32 folder (C: being the windows vista system drive). BCDEdit.exe allows you to change and configure boot application data (files) in the BCD (Boot Configuration Data) stores which replace the settings in the boot.ini file in earlier versions of Windows.

BCDEdit basically replaces the BootCfg.exe tool that was used with earlier versions of Windows. BCDEdit provides much better and wider command line options and can do much more tasks than BCDCfg.

Here’s how you can use BCDedit to change the boot sequence and display order in the boot menu.

1. Start > Cmd > Right Click cmd> Run as Administrator

2. At the command prompt :

a. C:\> cd windows/system32

b. C:\windows\system32> bcdedit /?

c. C:\windows\system32> bcdedit /enum all

d. The output displays the boot configuration data of all the operating systems on the computer:

Windows Boot Loader

-------------------

identifier {current}

device partition=C:

path \Windows\system32\winload.exe

description Microsoft Windows Vista

locale en-US

inherit {bootloadersettings}

recoverysequence {572bcd56-ffa7-11d9-aae0-007e994107d}

recoveryenabled Yes

osdevice partition=C:

systemroot \Windows

resumeobject {89b97029-9609-11db-bbfe-cfc7153012f0}

nx OptIn

e. Note the 128-bit GUID of the Windows XP system. You will have a similar entry for that.

f. C:\Windows\system32> bcdedit /default

E.g bcdedit /default {cbd971bf-b7b8-4885-951a-fa03044f5d71}

Where {cbd971bf-b7b8-4885-951a-fa03044f5d71} is the GUID of the Windows XP system.

In case you wish to delete the Windows XP entry from the boot menu:

g. c:\windows\system32> bcdedit /delete

You can also change the description of an entry using the following command:

h. bcdedit /set ID description "The new description"


For example:

bcdedit /set {802d5e32-0784-11da-bd33-000476eba25f} description "My Favorite OS"

You can change the display order of the boot options using the following command:


i. bcdedit /displayorder ID1 [ID2] [ID3] [...]


For example :

bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f}

{cbd971bf-b7b8-4885-951a-fa03044f5d71}

This will change the diplay order of the entries the next time the system is turned on only.

In order to make permanant changes to the boot order you can use the following command:

j. bcdedit /bootsequence ID1 [ID2] [ID3] ...


For example:

bcdedit /bootsequence {802d5e32-0784-11da-bd33-000476eba25f}

{cbd971bf-b7b8-4885-951a-fa03044f5d71}

The following command sets the boot manager’s timeout to 30 seconds:

k. Bcdedit /timeout 30

Refrences: You can download a complete guide on BCD edit at:

http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/BCDedit_reff.docx

sexta-feira, julho 17, 2009

Como Usar Boot Manager do Windows Vista para Carregar o Linux

The Web is full of explanations on how to dual boot Windows and Linux using a Linux boot manager like GRUB or LILO. If you want to dual boot Windows Vista and Linux using Windows Vista’s Boot Manager, please read on. I will assume that you already have installed Linux on your machine using GRUB as your boot loader.


Step 1 – Install GRUB on the Linux partition (outside of MBR)


As Windows Vista will replace the Master Boot Record (MBR) with its own, we need to relocate GRUB elsewhere by running grub-install with the Linux partition as a parameter.

• On Linux, launch a Terminal with root privileges

• Find the name of the partition Linux is installed on by running fdisk –l (the partition you’re looking for is the one whose system is Linux, can be something like /dev/sda1 or /dev/hda1. For the rest of this post, I’ll use /dev/sda1)

• Install GRUB on the Linux partition by running : grub-install /dev/sda1


Step 2 – Get a copy of Linux boot sector


We will need to instruct Windows Boot Manager how to boot correctly Linux using Linux boot sector, which we will extract using dd.

• On Linux, launch a Terminal with root privileges

• Take a copy of Linux boot sector : dd if=/dev/sda1 of=/tmp/linux.bin bs=512 count=1

• Copy linux.bin on a FAT formatted USB key or any storage accessible from Windows Vista


Step 3 – Install Windows Vista


Step 4 – Configure dual booting in Windows Vista


We will create an entry for GRUB in Windows Vista boot configuration data store using bcdedit.

• On Windows Vista, launch a command prompt with administrative privileges (by right clicking on cmd and choosing Run as Administrator)

• Copy Linux boot sector on the root of the Windows boot (active) partition, namely the one containing bootmgr. If you don’t know for sure you can use diskpart or diskmgmt.msc to find out which one it is.

• Create an entry for GRUB :

o bcdedit /create /d “GRUB” /application BOOTSECTOR

o Note: bcdedit will return an ID for this entry that we will call {LinuxID} below. You will need to replace {LinuxID} by the returned identifier in this step. An example of {LinuxID} is {81ed7925-47ee-11db-bd26-cbb4e160eb27}

• Specify which device hosts a copy of the Linux boot sector

o bcdedit /set {LinuxID} device boot

• Specify the path to a copy of the Linux boot sector

o bcdedit /set {LinuxID} PATH \linux.bin

• Add Linux entry to the displayed menu at boot time

o bcdedit /displayorder {LinuxID} /addlast

• Let the menu be displayed 10 seconds to allow for OS selection

o bcdedit /timeout 10

quarta-feira, abril 22, 2009

Adicionando funções no carregamento da página HTML

Para adicionar uma funções javascript no carregamento da página HTML (load) use a função abaixo:

function addLoadEvent(func) {
var oldonload = window.onload;

if (typeof window.addEventListener != "undefined" ) {
window.addEventListener("load", func, false);
}
else if (typeof window.attachEvent != "undefined" ) {
window.attachEvent("onload", func);
}
else if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}

E depois chame a função como no exemplo abaixo:


function marcaObrigatorios() {

}

addLoadEvent(marcaObrigatorios);

sexta-feira, setembro 19, 2008

Failed to allocate page for guest RAM error in Linux VMware Workstation

I've been spending increasingly more time running Ubuntu on one of my desktops. It has replaced the Windows Vista I had and so far I quite like the experiment. Out of the box, all of the hardware was properly supported and even the NTFS partitions left from Vsita install are easily available.One of the first things I've decided to install was the trial version of the latest VMware Workstation: 6.0.3 build-80004. And although it installed without a problem, when I tried to run one of the previously created virtual machines, I got the following error:

VMware Workstation unrecoverable error: (vcpu-0)
Failed to allocate page for guest RAM!

As it turned out after a quick investigation, that was a result of running a VM from a NTFS partition, because its default mounting settings don't have the exec option.

Since you shouldn't be running anything critical through an NTFS driver anyway, I simply moved the VM onto one of the ext3 partitions and, sure enough, it fixed the guest RAM allocation error.

Update: if your scenario prevents you from moving a VM to a native partition, use the following option:

mainmem.UseNamedFile = "FALSE"

You should add it to the vmx file of your VM. Thanks for the tip, benito!

quarta-feira, julho 30, 2008

Definindo XP como Padrão em um Dual-Boot com Vista

When you install Windows Vista as a dual-boot with your regular Windows XP partition, Vista is always set as the default OS. If you want to set XP as the default OS instead, there's a quick command you can run to change it back.

First you'll have to open an administrator command prompt. Type cmd into the search box, and then hit Ctrl+Shift + Enter to open it in administrator mode. You should be prompted for the UAC dialog.

Enter in the following command:

bcdedit /default {ntldr}

Example:

C:\Windows\system32>bcdedit /default {ntldr}
The operation completed successfully.

Now when you reboot, it will set XP as the default.

quinta-feira, julho 24, 2008

Acessando VMware Virtual Machine(NAT) Por Um Outro Computador

Se você está executando uma máquina virtual no seu computador, você pode querer acessar esta máquina virtual através de um outro computador. Por exemplo: Digamos que você tenha uma máquina virtual Ubuntu com Apache executando na porta 80, e você quer mostrar para outra pessoa em sua rede o acesso para o website que você está hospedando.

Nós estamos assumindo que a máquina virtual está usando NAT, e tem sido associado um endereço IP de 192.168.23.128.

Primeiro abra o Manage Virtual Networks pelo item do menu iniciar:

Clique na aba NAT, e então clique em Edit. Você verá o diálogo NAT Settings:

Clique no botão Port Forwarding, e você irá ver o diálogo:

Agora estamos finalmente na tela que podemos usar. Nós queremos usar a porta 8080 na máquina host. Entramos o endereço ip da máquina virtual ubuntu, e porta 80. Estas portas poderão ser qualquer uma.

Nós poderemos testar ela indo em http://localhost:8080 no computador hospedeiro. Também podemos trocar a url da máquina hospedeira pelo endereço IP da mesma.

quinta-feira, setembro 21, 2006

Delphi Update for Delphi 2006

1. There is a new DbCommonTypes unit, hosting some of the internal data structures that in the past were duplicated in multiple units. Their direct usage is not very common, so you'll seldom have to add this unit to your uses statements.

2. The ClientDataSet component has a new Boolean property, Ranged, indicating whether a range is active or not.

3. The TDataSet class has a new CopyFields method that takes another dataset as parameter and clones its field definition structure.

4. The data type had been changed from TButtonSet to TNavButtonSet

quinta-feira, setembro 30, 2004

My presentation

Hello I am Leandro, knowed by Java-lee man. This is my first text. So I starting by publishing my photo below.



Do you like?

I live in Brazil, on city of Brasília-DF. I have 30 old age. I working with computation, and have more than 10 year of experience.