Món Zero

Llum i fractals

Fix Windows MBR with a *buntu livecd

Something happen to a windows Master Boot Record (MBR) that you’re responsible for? Want a very quick, very easy way to restore it with nothing but your craft, native intelligence and a liveCD?

Be cautious here – you’re working with your disks in a very direct manner. If you don’t have everything backed up or are unsure of anything, you may want to wait until you have a standard Windows CD/DVD.

Boot into your Ubuntu LiveCD on the offending machine. Once Ubuntu starts up, go to System -> Administration -> Software Sources and enable (by checking it off) the Universal repository.

Now, open a terminal session (Applications -> Accessories -> Terminal) and type the following:

sudo apt-get install ms-sys

ms-sys is a program used to write Microsoft compatible boot records.

Now you’ll need to figure out what partition is the one hosting your Windows operating system. Back in the command line, type:

sudo fdisk -l

That will list the available partitions. You’re looking for a partition that says something like

/dev/sda1 1 9327 74919096 83 NTFS

The two important bits are the ‘/dev/sda1‘ which is the partition itself and the ‘NTFS‘ which tells us it’s a Windows formatted partition. So your Windows partition exists on your drive sda and it’s partition 1. The MBR for drive sda (assuming you boot into windows using it’s native boot loader) is what you want to repair.

We want to fix the MBR on /dev/sda. To do so, type:

sudo ms-sys -m /dev/sda

You’ll want to change the ’sda’ bit if your results from ‘fdisk -l‘ are different. If for instance your windows install is on sdb or hda.

Once you do that, reboot the machine, removing the LiveCD from the drive and Windows should come back to you.

Sure, you could do this by inserting the correct Windows CD and booting into repair mode from it – but I find the Ubuntu way a bit faster and I’m more likely to have an Ubuntu LiveCD on me than a Windows CD.

Copiat ja de forma exagerada d’aquí (un lloc on m’ha dut google)

ha provocat 3 Somnis

  1. Creo que habría que recalcar que esto sirve para Windows XP, porque a partir de Vista el loader funciona de otra forma bastante más chunga (en cuanto a configuración) que anteriormente y que sólo se puede arreglar con la utilidad BCDEDIT.EXE que incluye el propio SO, desde la cual, por cierto, también puedes instalar Grub.

  2. santiago, 20090815@22:13, diu:

    posteja alguna cosa de la campus, va, conta quelcom.
    per cert, t’he dit que ja tinc el mitjà?
    au, me’n vaig a somiar, però en sentit literal. gora ní

  3. Excellent text Christian Dillstrom tipped me off with a bookmark to your web page – you must be doing a great job as mobile & social media marketing high priest is pointing towards you?


Pàgina somniada per l'aldraia.

Powered by WordPress

Ad-Free Blog

Aquest blog està subjecte a una Llicència de Creative Commons.