Shrink root partition. Save?? + Get back GRUB after Win Install!

first: i don’t know if this the right sub forum for this, so feel free to move it :wink:

to my questions:

1. is shrinking the root partition save? or will it brick my linux install
i want to install a windows xp home to a 15 gb parition to install the following programs:
ArcSoft TotalMedia Theatre 3 & 5 to watch my Blu-Ray’s that I have purchased.
the player has also Hardware Acceleration for ATI Graphic Cards, SO YEAH!! lol! only 3% CPU Usage while watching BDs!

2. how to get back GRUB after win install?
i heard about that windows overrides the GRUB boot loader :’( (F*** Microsoft!)
how to get it back, if have a openSUSE LiveUSB!

EDIT: how to add windows to GRUB after successfully install ??

Restore grub

1 boot with opensuse live-cd in live-desktop
2 Open terminal/konsole.
3 run these commands one by one

su
grub
find /boot/grub/stage1

the 3rd command give you the partition number where the grub is installed. it’s somethink like (hdx,y) let’s say it is (hd0,5) (put your partition here) then

root (hd0,5)
setup (hd0)
quit

Then reboot your pc. you should see the grub.

you can add windows to grub from yast -> System -> Boot Loader

What do you mean by “save” ?
If you mean is it “100% safe” to shrink a ext4 partition, the answer is no.
If you mean that you should save your root partition before doing that, the answer is yes.

OK, i have done the following

GParted:
i shrinked the root partition (ext4) by 20GB, with no problems, linux still boot fine
than i created a NTFS partition (20GB)

Windows XP Installer Disk:
i installed windows xp, the installer marked the linux partition inactive :frowning:
all went fine

GParted:
i set the boot flag to the linux partition, GRUB came back :slight_smile:
but after i booted windows, grub is gone…

LiveUSB:
restore grub
with
find, root, setup

now grub doesn’t load at stage2
it loads at stage1.5

all went fine
my linux+windows dual-boot system is finished and ready to use
i can watch blu-rays again :slight_smile:

last question:
what’s the difference between stage2 and stage1.5 ???

stage 1.5 is only present if you install Grub in MBR (you did it by restoring grub). It is located on the first track in a various number of sectors (depending on Grub version). stage2 is located on the partition where you installed Grub in the directory /boot/grub. When you install Grub in a partition bootsector, there is no room from stage1.5 (you’ll get a non fatal error from Grub shell while installing) and Grub will loads stage2 directly. When you install Grub in MBR, it loads stage1.5. Also the active partition doesn’t matter in this case.

thanks :slight_smile: