Re: Why shrink but not move?



Shmuel (Seymour J.) Metz wrote:

I am installing openSUSE 10.2 and the root "partition"[1] I had
reserved for it was too small. I wanted to shrink the partition prior
to and then shift and expand the root partition. However, the Yast
partitioner seems to only support "shrink"[2]. Why? Is there really
much point to being able to resize a partition if you can't move it to
consolidate free space?

I've got a copy of Partition Magic 4.0, but it's burned me in the past
and I don't trust it. Any recommendations?

[1] Really a logical drive in an extended logical partition.

[2] It can also expand.


It can't expand the partition if something else is already there, to do that
it would have to move all the other volumes, because it has to expand to
contigious sectors. Even if the new Gparted can do that (I don't know if it
can), if there is no where at the end of the drive to shift those volumes
into then nothing can move, it can't guess as to which volume to shrink in
order to make room for your expanding volume. You could have expanded if
you had used LVM (assuming space is available on the devices), but LVM
doesn't seem popular these days for some reason.

PM4 can no doubt do that sort of thing, move all the volumes I mean, but in
this case it isn't necessary anyway.

The one you are after moving is the 'root' not the 'boot' (I'm saying that
because my first read of your post I got to the end assuming the wrong one,
my fault not yours). So you can move your 'root' in exactly the same way as
you move other partitions or directories, it is nothing more than a home
directory for 'root', I don't suppose many actually make use of it for any
sort of storage or utilities, if you do you are best having a soft link to
a /home/root location to make sure you don't miss this data in a data only
backup. But really I can't think of a decent reason for keeping data in
/root other than a few little helpers for if you ever have to enter in
rescue mode.

Rename root to oldroot.
Create directory root on the volume you want it on, just as long as you keep
it at '/'.
Copy oldroot/* to root/
Edit fstab to stop the old root trying to mount, it would fail anyway, but
might pause a while at boot up (just comment it out for now)

I hated that partition magic from the first time I tried it, so for when you
do need partition utilities outside of your installed system, keep a good
Live linux handy, they is nearly always at least one on the Linux magazine
DVDs, pick the one you like best and keep it handy.

Anyway, there is more.

As I said above it can be handy to have some resue helpers in 'root', in my
case I keep a copy of fstab and mtab to remind me what is mounted where,
and a couple of text files with help notes. For that is is still best if
your root is on it's own volume, just in case the reason you are in rescue
mode is that another of the volumes can not be mounted. Your partitioner
can shrink volumes so you can seperate out some space for root, then use
fdisk to create your partition into your freed up space, format it, give it
the mount point of /root (remember to rename the other root), copy
everything into it. Then there you are.

So really what I have said is two ways to solve your problem, but I still
only require one payment, hows that for a good deal. Please pop the cheque
in the post.




.



Relevant Pages

  • SUMMARY: Moving /usr From Under Root "/" To Its Own Partition
    ... One of the reasons for doing this is to end up with a smaller root ... Install the boot block and boot off the new drive. ... " In order for the root partition to be fscked and remounted ... D> temporarily on the existing disk. ...
    (SunManagers)
  • Re: Grub Manual
    ... I have digested what you all have said and applied it to the small file I wrote on the Grub Manual. ... Please no more about what is root. ... Many people keep the entire Linux in one partition and in that case both of the root point to the same partition. ... Your computer often wants to use the name of the kernel. ...
    (Fedora)
  • Re: user failures
    ... I had my boot drives partition table zeroed out last night by something ... to the filter screen, but when I click the apply button, anything I've ... I've nuked /root/kmailrc, and then restarted kmail as root, with no ...
    (Fedora)
  • Re: Live vv installed Linuxes?
    ... which partition is the root filesystem, ... filesystem for errors, this is then mounted. ... perhaps by changing partition sizes, but also how it might accomodate ... simply install its bootloader inside its own root partition and you're ...
    (comp.os.linux.misc)
  • Re: partitons
    ... done with win in step-by-step or in ubuntu) ... use qparted and partgui to shrink one or more partitions, then expand ... shrink the fs to a size under what you need but larger ... change partition sized, ...
    (Ubuntu)