Author Topic: Reinstalling windows in dual boot (SOLVED)  (Read 1957 times)

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 91
Reinstalling windows in dual boot (SOLVED)
« on: May 19, 2012, 05:07:18 AM »
Hi guys, how do I reinstall windows xp, without destroying Linux on other partition?  My Windows really needs to be restarted from scratch, but I am afraid I will destroy my Linux system on the other side.
« Last Edit: June 02, 2012, 06:09:47 AM by P38Lightning »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: Reinstalling windows in dual boot
« Reply #1 on: May 19, 2012, 05:53:51 AM »
Reinstall XP and ensure it boots properly a couple of times.

Then run  redo MBR from a LiveCD of PCLOS, to get back the Grub boot manager.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline rayman2

  • Full Member
  • ***
  • Posts: 71
Re: Reinstalling windows in dual boot
« Reply #2 on: May 19, 2012, 06:08:12 AM »
Remember not to select "Automatic partitioning" or similar, since this will wipe the entire hard disk.

Backup your data first!
Code: [Select]
dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c  > /path/to/backup.img(in which /dev/sda is your harddisk(not sda1, that's a partition) and /path/to/backup.img is the location where the image will be stored. Save this image an external drive, if you can). This command creates a so called bitcopy, an exact copy of your hard disk. You can use this to restore your computer, including partitions and mbr(grub/lilo) to the way it was at the time of creating the copy. This is useful to have anyways, whether everything goes right or not.
« Last Edit: May 19, 2012, 06:29:53 AM by rayman2 »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Reinstalling windows in dual boot
« Reply #3 on: May 19, 2012, 06:26:15 AM »
Using gparted(live cd), remove the "bootable" flag from your linux root partition(s). Resize/move your linux partitions if needed. Create a windows(ntfs) partition(don't underestimate the amount of space you'll be needing on windows, windows itself takes +-4 GB already). Remember the size of the freshly created ntfs partition. Install windows xp to that partition. The reason you need to remember the size of the ntfs partition, is because that's one of the only reliable means of identificating a partition in (almost) every operating system. Use the redo-mbr utility afterwards, or if you prefer, reinstall grub manually. Remember to install your bootloader to the root of the hard disk, not a partition(so /dev/sda instead of /dev/sda2, for example). Using a gparted(live cd), add the bootable flag again. I believe XP removes any partition with the boot flag.
Remember not to select "Automatic partitioning" or similar, since this will wipe the entire hard disk.


Backup your data first!
Code: [Select]
dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c  > /path/to/backup.img(in which /dev/sda is your harddisk(not sda1, that's a partition) and /path/to/backup.img is the location where the image will be stored. Save this image an external drive, if you can). This command creates a so called bitcopy, an exact copy of your hard disk. You can use this to restore your computer, including partitions and mbr(grub/lilo) to the way it was at the time of creating the copy. This is useful to have anyways, whether everything goes right or not.

If he already has a Windows installation and just wants to reinstall, none of the above applies. Are you trying to get him to mess up his hard drive?  ???
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline rayman2

  • Full Member
  • ***
  • Posts: 71
Re: Reinstalling windows in dual boot
« Reply #4 on: May 19, 2012, 06:29:30 AM »
I am sorry. I read your post too quickly. If reinstalling windows, there is ofcourse no need to create or remove any partitions. Please disregard my previous post. Do make a backup, however.

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 91
Re: Reinstalling windows in dual boot
« Reply #5 on: May 19, 2012, 07:31:18 PM »
Thanks guys, I'll let you know the results when I am done.

Offline T6

  • Super Villain
  • ******
  • Posts: 19051
  • xmas is comming!
Re: Reinstalling windows in dual boot
« Reply #6 on: May 19, 2012, 07:38:45 PM »
the steps are format if required the windows xp partition(backup first) then install xp on that partition without touching the linux partitions, swap, home and root, leave them unchanged

install all the programs and drivers, after you activate product and everything is ready, run a livecd and use redombr, system will go back to previous state
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline rayman2

  • Full Member
  • ***
  • Posts: 71
Re: Reinstalling windows in dual boot
« Reply #7 on: May 20, 2012, 03:05:08 AM »
Be carefull, especially if you're not installing from a windows install-cd/dvd, but from a "restoration partition" or something like that, since sometimes those tools just wipe the entire harddisk. My HP computer came with windows and a restoration utility, that reinstalls windows, but wipes the entire harddisk.

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 91
Re: Reinstalling windows in dual boot
« Reply #8 on: May 28, 2012, 02:54:45 PM »
Hey guys, I have installed windows, and my Linux is still here, but, I can't get the bootloader to install.  Right now I am running a live cd, and I tried the redombr program, it just brings up a blank file and does nothing.  Please help.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Reinstalling windows in dual boot
« Reply #9 on: May 28, 2012, 05:58:04 PM »
Hey guys, I have installed windows, and my Linux is still here, but, I can't get the bootloader to install.  Right now I am running a live cd, and I tried the redombr program, it just brings up a blank file and does nothing.  Please help.


Try this;

http://www.pclinuxos.com/forum/index.php/topic,62786.msg508062.html#msg508062

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 91
Re: Reinstalling windows in dual boot
« Reply #10 on: May 29, 2012, 07:37:52 PM »
Ok, followed the steps in that thread, and on step to I got a message that files was not found.

EDIT:  It seems that my live cd is not mounting my hdd.  How do I make it do that?
« Last Edit: May 29, 2012, 07:52:10 PM by P38Lightning »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Reinstalling windows in dual boot
« Reply #11 on: May 29, 2012, 08:02:13 PM »
Ok, followed the steps in that thread, and on step to I got a message that files was not found.

EDIT:  It seems that my live cd is not mounting my hdd.  How do I make it do that?

You are telling a story, and not posting results. Use copy/paste to show us exactly what you see.

The partitions do not need to be mounted to reinstall grub. If you want to mount a partition's filesystem you need to know which partition is the proper one. From the terminal, as root;

[root@localhost ~]# fdisk -l                      <Enter>

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 91
Re: Reinstalling windows in dual boot
« Reply #12 on: May 29, 2012, 08:08:08 PM »
below are the results I got from doing step 2:
Quote
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub> find /boot/grub/stage2

Error 15: File not found

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 91
Re: Reinstalling windows in dual boot
« Reply #13 on: May 29, 2012, 08:09:26 PM »
Results of typing fdisk -l:

Quote
[root@localhost ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f3e2e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   102398309    51199123+   7  HPFS/NTFS
/dev/sda2       102398310   312496379   105049035    5  Extended
/dev/sda5       102398373   134351594    15976611   83  Linux
/dev/sda6       134351658   142528679     4088511   82  Linux swap / Solaris
/dev/sda7       142528743   161646029     9558643+  83  Linux
/dev/sda8       161646093   312496379    75425143+  83  Linux

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Reinstalling windows in dual boot
« Reply #14 on: May 29, 2012, 08:40:09 PM »
below are the results I got from doing step 2:
Quote
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub> find /boot/grub/stage2

Error 15: File not found

You didn't run grub as root.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...