mackowiakp wrote:Of course I can use Gparted or similar to resize etc partitions. But I want to install WIN "clean" from the beginning, without losing any Linux content on any Linux partition.
Is it possible? How can I do this to have still possibility to choose Linux/WIN boot via GRUB. Can anybody share any experience? How rebuild GRUB after reinstalling WIN?
I can tell you what I'd do:
Though how one convinces windows to install to the 2nd drive is NOT something I know. And/or how to get it to not want/need to create a "D:" partition for it's recovery stuff. I'll presume that you know how to do that. If not, perhaps somebody else will explain that part.
But 1st, this depends on if your using grub legacy or grub2... If like my Mageia3 installations its using grub legacy (GNU GRUB version 0.97) then I'm more comfortable with the process...
If your using grub 2, Stop here...You plan to "resize etc partitions"... it sounds like you intend to eliminate the current windows partition on /dev/sda... Because your Linux root partition is evidently on a logical partition it's device name will likely remain as /dev/sda5. But I think grub legacy's name for it would change. Currently your /boot/grub/menu.lst file probably refers to it as "(hd0,1)" {First drive is "0" second partition is "1"} But if you remove the /dev/sda1 partition and resizing the extended partition {which contains the logical /dev/sda5} to the left, grub legacy will see sda5 as the first partition and your menu.lst will need to call it (hd0,0) instead of (hd0,1)... So you would need to edit your "M3" grub entry accordingly. Likewise, if you currently have an windows boot entry in your grub menu, you would also need to change it's grub partition name. Probably from "(hd0,0") to "(hd1,0)"
If you don't you could try something like this
- Code: Select all
title winDoze
root (hd1,0)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1
But Just as importantly, grub's stage 1 image in the MBR will no longer be able to find either stage 1.5 nor stage 2.The easiest way to fix this is with a rescue or live cd. I like to use Puppy linux for that.
But using Puppy or any live cd equipped with grub
legacy I would open a root shell and at the
# prompt type "grub"
Then at the "grub>" prompt type "find /boot/grub/menu.lst" Then using the output of that tell the grub shell to "root" to that partition. And finally to "setup" to the MBR. You want to be careful when you do this, but since the existing grub boot won't work...
- Code: Select all
# grub
Probing devices to guess BIOS drives. This may take a long time.
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/menu.lst
find /boot/grub/menu.lst
(hd0,0)
grub>
Note: If your results are NOT "(hd0,0)" then substitute your results in the example below.
Once the grub shell confirms it's name for the partition containing your menu.lst file, the next command is to "root" to it:
- Code: Select all
grub> root (hd0,0)
Then you can recreate the stage 1 image in the MBR with:
- Code: Select all
grub> setup (hd0)
Note: this time you didn't specify a partition...
Hope this helps.