LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Suse 10.0 and Windows XP partition resize (https://www.linuxquestions.org/questions/linux-newbie-8/suse-10-0-and-windows-xp-partition-resize-554211/)

AustinMarton 05-15-2007 09:08 PM

Suse 10.0 and Windows XP partition resize
 
Hi, long time reader, first time poster here...

I foolishly underestimated the amount of space I'd need for my Linux partition. I have like 5mb left on my Linux partition so it won't even boot in failsafe.
I am running Suse 10.0 and Windows XP home as a dual boot on my Toshiba Satellite A10.

Partitioning Arrangement:
NTFS - 32GB
Linux Swap - 500MB
Linux Extended - 2GB
(Apparently) Unpartitioned - 500MB

I can boot fine in Windows, have free space on my NTFS parition, and Partition Magic installed.
I thought that decreasing my NTFS and increasing the Linux partition would be simple in Partition Magic, but I am unable to! The "resize" option is greyed out when I select the Linux Extended partition, but available for the Swap and NTFS.

Any ideas? (I have an Ubuntu Live CD also if that could help)

Thanks,
Austin.

GrapefruiTgirl 05-15-2007 09:15 PM

Use the Ubuntu LiveCD, the application called Gparted, in the Admin menu.
It's the *ahem* best tool for the job.
A few points first though:
1 - it isn't widely recomended to move the START location of an existing partition.
2 - NTFS partition should be defragmented before resizing it.
3 - If your data is important, a backup first is recomended.
4 - depending on the layout of the partitions right now, you may be in a situation where you MUST move the start of a partition. If this is the case, hopefully it is a linux partition. If so, the easiest thing to do is backup everything on it (Gparted has a partition copier), then shrink the NTFS partition by moving the END of it down. Next, recreate the Linux partition following the NTFS one.
Finally, restore the backup of Linux, onto the new Linux partition.
I/we/someone can give you more accurate directions, if you post us the exact partition scheme of the drive (what is hda1, hda2, hda3, etc etc).
:)

NOTE - If the partition names/numbers change, you will need to edit your GRUB/LILO appropriately.

GrapefruiTgirl 05-15-2007 09:19 PM

On second glance at your post, I'd do this:

1 - shrink the NTFS
2 - Make a new Linux partition following the NTFS. Make it the same size as your existing Linux partition.
3 - Copy teh existing Linux partition, onto the NEW Linux partition.
4 - Fix GRUB/LILO so it all boots correctly.
5 - Delete the OLD Linux partition.
6 - Resize the New Linux partition, to occupy the space left by deleting the OLD Linux partition.

:) I think I covered everything.

AustinMarton 05-15-2007 09:24 PM

Thanks heaps for the quick reply!
I'll try it when I get home and post if I have any trouble :)

GrapefruiTgirl 05-15-2007 09:31 PM

No problem. It should be a pretty straight forward operation, save for a tad bit of messing with GRUB/LILO ;) but you will find Gparted is VERY easy to use comfortably, even for someone who has never used it. It really is good.
I'm outta here shortly, but if you do run into troubles, surely someone else will point you in the right direction before too long!
Best of luck :)

PS - Don't forget to format the new partition before copying to it if you don't use the 'Gparted copy partition' command. For example, I use Ext2 for Linux, so after making a new partition, I do a 'mke2fs' on it, and then copy stuff to it. This should be unnecessary if you copy the whole partition using Gparted, but worth mentioning all the same.

AustinMarton 05-16-2007 10:34 PM

Okay, I shrunk my windows partition, then used GParted to copy my Linux partition into the free space, and created a fat16 partition for them to share.
It all looked like it went according to plan, my new situation is:

Partition FileSystem Size Flags
-------------------------------------
/dev/hda1 ntfs 30.58GB boot
/dev/hda2 linux-swap 494.19MB
/dev/hda4 reiserfs 3.71GB
/dev/hda3 fat16 2.49GB

When I restart grub isn't happy:
"GRUB Loading... stage1.5 GRUB Loading please wait... Error 17"

I have Suse 10.0 installed on hda4, so I assume I need to somehow tell GRUB where to find that?

I do not have a rescue disk or the Suse install cd.
The only thing I can boot from is the Ubuntu live cd.

In Ubuntu I can mount my windows and linux partitions.
Will changing the grub configuration file fix this?
Can anyone tell me where to find the configuration file needed to change?
Or is the problem that the MBR isn't pointing grub to the right place?

Any comments would be much appreciated!

AustinMarton 05-17-2007 03:55 AM

Just for anyone who reads this, I resolved my problem eventually, reinstalling GRUB.
I found this extremely useful little tool... http://supergrub.forjamari.linex.org/?section=download
Just download and burn to a cd and boot!

saikee 05-17-2007 04:53 AM

Yes it sounds like magic, isn't it but it is only because you didn't know

your Suse's "/" partition is in hda4 known to Grub as (hd0,3). You could restore Grub by booting any Linux Live CD and issue the following root terminal command
Code:

grub
root (hd0,3)
setup (hd0)
quit
reboot

In other word you can use any Grub shell from a Live CD to restore Grub. The above instruction tells Grub that the root of Suse is in 4th partition of the 1st disk or(hd0,3) and asks Grub to set itself up in whole of disk (hd0), which is the MBR. Grub counts everything from zero.

You can use Suse own installation CD to restore Grub too.

You can also use any Live CD, mount the Suse partition, change root to it and use the "grub-install" to restore Grub.

I don't have a problem with Linux users using SuperGrub but it is just a shame that the standard Linux facilities were ignored in favour of the similar procedure repackaged under a different name.

I recommend Linux users using a Live CD to rescue any unbootable Linux because that is the universal tool that works for both Lilo and Grub.


All times are GMT -5. The time now is 06:54 AM.