[Sussex] partitions and the like ??

Rupert Swarbrick rupert.swarbrick at lineone.net
Tue Dec 28 21:45:00 UTC 2004


That's cool, but if I'm not too late, you might want to have a look at
QParted. It's truly impressive and, speaking as someone who can cope
with fdisk et al, it's absolutely wonderful.
Looks very similar to PartitionMagic and seems to work well.

As a different aside, you have to jump through a couple of extra hoops
for windows filesystems as they have a different permissions model. In
the options line in /etc/fstab, you'll want to add user (so that your
non-root user can read it) and uid=1000, fmask=0644 (or something,
depending on who you want the owner to be).
More info from: '$ man mount', under the filesystem specific flags.

On Tue, 2004-12-28 at 19:37 +0000, Steve Dobson wrote:
> John
> 
> On Tue, Dec 28, 2004 at 07:03:11PM +0000, John D. wrote:
> > On Mon, 2004-12-27 at 21:12 +0000, John Crowhurst wrote:
> > 
> > > So to reduce a partition by 30G, you would:
> > > 
> > > ~# df /home
> > > ~# umount /home
> > > ~# resize_reiserfs -s -30G /dev/hda6
> > > ~# mount /dev/hda6
> > > ~# df /home
> > > 
> > > You should then see the partition shrink by 30GB. Once you have shrunk the
> > > partition, you can delete it with fdisk and recreate it 30GB smaller (be
> > > careful not to make the partition smaller than the size you have reduced
> > > the filesystem by) and then make the /vfat partition.
> > 
> > Well, I managed to get as far as shrinking the partition, it now looks
> > like this
> > 
> > bash-2.05b# df
> > Filesystem           1K-blocks      Used Available Use% Mounted on
> > /dev/hda5             20482184   5340172  15142012  27% /
> > /dev/hda6             42111064   1522312  40588752   4% /home
> > none                    387416         0    387416   0% /dev/shm
> > bash-2.05b#
> > 
> > :-)
> > 
> > but I now I've hit a snag, as I've never used fdisk I'll have to go and
> > look up how I can actually make the /dev/hda7 partition and the
> > necessary (I think?) mount point(s) before I can modify the fstab and
> > format the new partition. I did have a quick look at what things look
> > like with Partition Magic, but obviously nothings actually changed as
> > far as that's concerned (yet!).
> >
> > > Once you have done that, you will need to edit your fstab to include the
> > > /vfat partition, and you need to mkfs.msdos (or mkfs.vfat - its the same
> > > program really, explicitly declaring you want FAT32, or it will give you
> > > FAT16):
> > > 
> > > ~# mkfs.msdos -F 32 /dev/hda7
> > 
> > Do you know of any easy to follow (idiot proof ?) links/docs on how to
> > drive fdisk so I can finish this task ? (just getting ready for work -
> > again :-( )
> > 
> > Thanks for the instruction John, thus far it's worked like magic.
> 
> 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 .
> 
> 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).
> 
> 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.
> 
> 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.
> 
> Steve
> 
> _______________________________________________
> Sussex mailing list
> Sussex at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/sussex





More information about the Sussex mailing list