[Sussex] partitions and the like ??
John Crowhurst
fyremoon at fyremoon.net
Wed Dec 29 21:38:54 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) ?
The options cvfz do (c)reate, (v)isual, (f)ilename, g(z)ip. The visual bit
shows you the files being added to the tar.gz file, the filename bit stops
tar trying to write the files to /dev/tape.
> 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.
I'd guess that cfdisk would be installed along with fdisk.
> 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 would make sure this partition is not mounted before you run mkfs.
mkfs -t reiserfs /dev/hda6
This will create a new reiser filesystem on the partition. I know I'm
being pedantic, but spelling mistakes are costly, saves you going ga-ga at
your partition that won't format.
>> 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)?
Make sure you use tar xvfz, as you will be e(x)tracting files. If you use
c by accident, the file will be overwritten without warning.
It doesn't matter where you run the mkfs, as long as you don't have that
partition mounted when you run the command.
Also make sure that when you run mkfs that you use -F32, or mkfs will
create a nice fat16 partition instead of a fat32 one. So:
mkfs -t msdos -F 32 /dev/hda7
> 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! :-(
You aren't likely to screw it up unless you remove the wrong partition. If
you make a mistake in fdisk (and cfdisk) you can simply exit without
saving.
If you mkfs'd the wrong partition, you'll probably have to reinstall.
--
John
More information about the Sussex
mailing list