Jump to content
boatman9

odd partitioning, how to make space for Mandriva?

Recommended Posts

I noticed two strange features in the partition table of my new Acer netbook.

 

Firstly, the partitions don't all start and end on cylinder boundaries, so I can't use cfdisk to modify the partition table. Of course I can still use ntfsresize to shrink the NTFS file system. fdisk would allow me to modify the partition table but I've read that it's buggy.

 

Secondly, there is a gap between the end of /dev/sda1 and the beginning of /dev/sda2. The data there is not all zeros. Is that gap important or did the manufacturer just get sloppy?

 

This is the output from 'fdisk -ul /dev/sda'

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x9a92f804

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    20980889    10490413+  12  Compaq diagnostics
/dev/sda2   *    20981760   312578047   145798144    7  HPFS/NTFS

 

What's the best way to free space for a Mandriva install?

Share this post


Link to post
Share on other sites

I've never had any problems with fdisk whatsoever. Never heard of it being buggy in the slightest. Any problems generally come from misuse and user error when repartitioning.

 

Normally, the partitions should follow on from each other, so I guess it's just not been partitioned to well when it was set up but I couldn't explain why, or if the manufacturer was sloppy or not.

 

The Mandriva installer can free the space for you, but check the disk for errors in Windows first, and defrag it and then go for the install with Mandriva.

Share this post


Link to post
Share on other sites

I used to use fdisk and never had any problem with it. I switched to cfdisk after reading the following warning found in the fdisk man page:

fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can.

Share this post


Link to post
Share on other sites

Interesting, I just read it myself now in the man page :)

 

I've never been a fan of cfdisk (personal preference), although I've seen some distros use it by choice for partitioning the disk during installation. Even though I see that stated in the man page, I'll continue to use fdisk. As you are generally using it when creating partitions, you don't actually have any data on the disk at this point. Therefore, once I've created partitions, I check them to see if they look how they should be, and then continue as normal with whatever else I'm doing. At this point in time, even if it does something wrong it's not going to be a major problem because either you'll have a partition how it should be or not. If not, then another tool can be used, to ensure it's done correctly this time, and it's dealt with in a matter of seconds or minutes.

 

If I'm resizing partitions, which I've done in the past and from the CLI as well, using the tools to resize the filesystem, and then fdisk after that, it's also worked good for me. Of course, when doing this kind of thing, you should have a back up in case something goes wrong when you resize the filesystem and also when you resize the partition in whichever partitioning tool you use. Of course, with something like this, if something goes wrong, then you are looking at a much longer recovery time to restore the disk to it's previous state, but then this could happen for various reasons, for example a problem with the file system, or the partition when resized (had this before a long time ago but user error not fdisk error :D ).

 

If of course I ever come across a situation where fdisk does something bad I'll stop using it, as it's been 100% reliable and accurate for me so far :)

 

In a nutshell, messing around with partitions is risky no matter what tools you are using. There's always a chance something can go wrong. But the warning on fdisk is well worth pointing out to everyone, as chances are not everybody knew about the possibilities that it is buggy.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...