-   Linux - General (
-   -   Allocating free disk space - start of "/ " needs moving. (

ibex 04-16-2006 04:23 PM

Allocating free disk space - start of "/ " needs moving.
Hi geeks,

I am dual with XP/SUSE.
I have made some more space for my
growing LINUX SYSTEM but in order
to allocate this free space to a
linux partition ("/") I need to move
its start and this is not possible
with Gnu parted. Is it safe to do
that with Acronis? Last time I
resized some partitions I messed
up something (i guess the boot loader)
and nothing worked ... so I want to
do things IN THE SAFE WAY.

Any advice pls?


bernied 04-16-2006 05:09 PM


Hi geeks,
You say this with respect and admiration, right?

It's not very clear what you're trying to do, but I guess you want to resize a linux partition.
You would need to be not using that partition at the time - you would get in serious bother if you messed with a mounted partition, so use a live-cd, not your installed system (knoppix is good). qtparted is included in knoppix and it seems to work most of the time.

Also, have you considered not resizing your original partition, but instead creating a new partition and moving part of your filesystem there. If it's applications that are swelling your system, move /usr, if it's user files, move /home. This would have the advantages that you are not resizing partitions (so safer), and it can also make backup easier.

To do this:
create the new partition - cfdisk, fdisk, parted, qtparted, etc
format the partition with your favourite filesystem - mke2fs, mkfs.vfat, etc
mount the partition somewhere temporary

mount /dev/hdax -t ext3 /mnt/tmp
copy the files across, but check the options for the cp command first, because you'd want to preserve all permissions

cp -a /home /mnt/tmp
(at this point you could throw in a temporary bogus file as an indicator)

echo "this is on /dev/hdax" > temp_hdax
edit /etc/fstab so that /home is mounted on /dev/hdax
(have a look at man fstab and man mount for what to add, and remember /home needs to be mounted after /)
then reboot the system and check whether that file temp_hdax is in /home

(replace hdax with whatever your partition is, /home with whichever directory you are moving, ext3 with whatever filesystem you formatted it with, and /home with whichever directory you are moving)

if this worked, then you can free up the space on the original partition by deleting all the files in the original /home, but you'd probably want to do this using the live-cd as well, so you got the right files

ibex 04-17-2006 10:03 AM

Thanks for your advice.
I just wonder what will I have to do
afterwards with grub to boot normally again.
Using my suse CD I can boot and run commands.
Is grub-install what I have to run (only)?


bernied 04-17-2006 12:22 PM

If suse was installed on your hard-drive and you were already dual-booting, then adding a partition for /home or /usr in your /etc/fstab won't make any difference to the boot setup. These would be mounted after the kernel boots. There would be a difference if you moved / or /etc (/etc/fstab would be moved) or /boot (the kernel and other booting bits would be moved), then you would need to make changes in your /boot/grub/menu.lst and might need to do another grub-install.

If you have been running suse off a live-cd, and now you want to install it on your hard-drive, then that is a whole new kettle of fish, and I'd suggest you read the suse install documentation.

ibex 04-17-2006 09:46 PM

I took a deep breath and instead of creating a new partition
as you suggested I resized my Linux root/boot partition with Acronis cd,
then entered SUSE with cd and simply run grub-install as root.
It works !!!

All times are GMT -5. The time now is 05:24 AM.