[Sussex] partitions and the like ??

John D. big-john at dsl.pipex.com
Wed Dec 29 20:58:17 UTC 2004


On Tue, 2004-12-28 at 19:37 +0000, Steve Dobson wrote:
> John
<snip>
> Take a back up of /home now!!!!!
> 
> Next: burn that backup to CD - just to be sure.
> 
> When you use fdisk it *WILL NOT* reduce the size of a paration by the 
> *EXACT* amount you tell it to.  It is all tied up with disk geometry and
> is a complex matter way beyond my capabilities to explain in an textual
> e-mail - I'd want a whiteboard to draw pictures.  The quick answer is that
> it rounds the number you give for performance reasons.
> 
> Have you backed up?  No.  Do it now!!!!!
>                      Yes. Do it again. Take no chances!
> 
> A tar back-up in the / dir will do nicely as a second backup
> 
>     # cd /home
>     # tar cvfz /home-backup.tar.gz .

So, I need to backup before anything else :-P ?

Actually there's nothing that I can't afford to loose if I screw up,
just the inconvenience of re-applying the customisations etc, Ok that
certainly sounds like extremely sensible advice.

With that in mind, if I read correctly, I can be root and then do the 

# cd /home
# tar cvfz /home-backup.tar.gz

bits ? Plus as I don't follow all the stuff that is included in "man
tar" does the cvfz /home-backup.tar.gz actually make the backup and
place it in the root partition (presuming that I've read things
correctly) ?


> I would use cfdisk rather than fdisk (if you have it) it is a little more
> graphical and easier to use.  It is my prefered partitioning tool.
> Here is an example from one of my system.  Luckly on this system not
> all my partitions are mounted and contain data so I can show you want
> you'll see.
> 
> # cfdisk /dev/hda
> 
>   Name  Flags Part Type  FS Type    Size (MB)
>  --------------------------------------------
>   hda1  Boot  Primary   Linux ext3    501.75
>   hda5        Logical   Linux ext3  10001.95
>   hda6        Logical   Linux ext3  10001.95
>   hda7        Logical   Linux ext3  10001.95
>   hda8        Logical   Linux ext3    501.75
>   hda9        Logical   Linux ext3   3997.49
>   hda10       Logical   Linux swap   1003.49
>   hda11       Logical   Linux ext3   4499.23
>   hda12       Logical   Linux ext3  10001.95
>   hda13       Logical   Linux ext3  10001.95
>   hda14       Logical   Linux ext3  10001.95
> 
>   [Bootable]  [ Delete ]  [  Help  ]  [Maximize]  [ Print  ]
>   [  Quit  ]  [  Type  ]  [ Units  ]  [ Write  ]
> 
> The up & down arrow keys will selected the partition to work on
> and the left & right arrow keys will selected the menu option at
> the bottom (as will using first letter of the menu option).
> 
> You don't commit any changes until you "Write" it to the disk.
> 
> Select the partition you want to split (in my case hda14) and
> delete it.  You should then see somethink like this (with the
> free space selected):
> 
>   Name  Flags Part Type  FS Type    Size (MB)
>  --------------------------------------------
>   hda1  Boot  Primary   Linux ext3    501.75
>   hda5        Logical   Linux ext3  10001.95
>   hda6        Logical   Linux ext3  10001.95
>   hda7        Logical   Linux ext3  10001.95
>   hda8        Logical   Linux ext3    501.75
>   hda9        Logical   Linux ext3   3997.49
>   hda10       Logical   Linux swap   1003.49
>   hda11       Logical   Linux ext3   4499.23
>   hda12       Logical   Linux ext3  10001.95
>   hda13       Logical   Linux ext3  10001.95
>               Logical   Free Space  10001.95
> 
>      [  Help  ]  [  New   ]  [ Print  ]  [  Quit  ]  [ Units  ]
>      [ Write  ]
> 
> Then use new (only available while a FreeSpace partition is selected)
> to create your two new partitions.  When you are absolutly sure that
> you have the partitions correct write them (the short key is CAP W
> not just W as it is a no return step).

I'm not sure if I have cfdisk already installed (it maybe in there
somewhere) so I think it's probably best if I "emerge cfdisk", presuming
that there's an ebuild of cfdisk in the portage tree.

The rest of that, I think I understand!


> They run "mkfs -t riserfs" to re-create the /home partition because the
> resized partition could have been either truncated or does not quite 
> fill the new partition size.

Should this be in root, but "cd'd" to the home partition or should I
have actually logged into the /home partition ?

> You can then mount the newly size partition (after editing the /etc/fstab
> file) and restore from backup:
>   # vi /etc/fstab
>   # mount /home
>   # cd /home
>   # tar xvfz /home-backup.tar.gz .
>   
> You can then use "mkds -f msdos" to make your FAT32 partition and mount it
> in much the same way.

This part, presumably, would be done in root (as opposed to "as root")?
or doesn't it make any difference (cos I'm still not to sure what
differences are between "su" and "su-" apart from a differing # prompt)?

regards

John D.

p.s. perhaps I should ask Geoff for an Ubuntu disc, I don't think I'd
have the patience to completely re-install gentoo if I managed to screw
it up! :-(
-- 





More information about the Sussex mailing list