LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trying to Partition Drive need help (https://www.linuxquestions.org/questions/linux-software-2/trying-to-partition-drive-need-help-55809/)

CodeWarrior 04-19-2003 11:42 AM

Trying to Partition Drive need help
 
I have a PC with a 80GB drive. All of it is NTFS and is being used by Windows XP. I want to dual boot between XP and Linux. I know that I will need to set up some free space for Linux. How do you think I should go about doing that? It looks like XP doesn't come with fdisk and Partition Magic is pretty expensive. Do you guys know of a software or method I can use to do this. Thanks

david_ross 04-19-2003 12:22 PM

Try using a linux boot disk and a program called parted.

slakmagik 04-19-2003 12:40 PM

I keep saying/asking this but I didn't think parted worked with NTFS? It works with most anything else and I love it - highly recommended - but I didn't think it did NTFS.

david_ross 04-19-2003 12:46 PM

Sorry - I missed the fact that it was NTFS - you are right digiot - there is a table listing the compatabilities:
http://www.gnu.org/software/parted/parted.html#features

david_ross 04-19-2003 12:50 PM

Feeling as bad as I do - I have had aquick look about and found a couple of other progs that should do the trick:
http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html

slakmagik 04-19-2003 01:10 PM

I know it's for CodeWarrior, but thanks for the link. I hope they do integrate with parted and hope it's as safe as they say. Given that almost every OEM is NTFS these days and that most people want to keep Windows for awhile, at least, as they switch to Linux - well, NTFS resizing and partitioning is important. As soon as I get another computer connected to the net, I'm going to be tangling with NTFS myself, though I think I have a way around it by blowing out a hidden 'recovery' partition.

Incidentally, CodeWarrior - make sure you don't have one of those. My XP *looks* like it's all NTFS on a single partition but it's not.

mjolnir 04-19-2003 01:21 PM

I just set up a dual boot xp/mdk 9.1 on a toshiba laptop using partion magic. Yes it is expensive but for a newbie like me well worth it! Buy it,create the rescue floppies, and then you can experiment with "free" programs with relative saftey. I also used it to convert ntfs to fat32 with no loss of data.

CodeWarrior 04-19-2003 07:46 PM

Well I am not sure what Microsoft is trying to pull, but the fdisk program that have been on all the Windows version is either hidden or gone from XP home edition. Previously I would just go to DOS and type Fdisk and your partition table and other options would come up.
Anyway after taking a look at my partitions through "Disk Management" in XP I found out that technically I have 2 partitions. I have a very small 31 MB partition FAT partition with no drive label called a "EISA Configuration"(what ever that means) and a large partition labeled C that takes up the rest of the 80GB and is a NTFS partition.
i know what I have to do to dual boot - blow away all partitions, recreate a new XP partition to a new smaller size and leave free space for Linux. Then Install linux and have it cut up the free space the way it wants. But how to go about doing this is the problem. If possible I would like to save the cost of partition magic and use fdisk to recreate the new NTFS partition. I am not sure how good those free programs are. I need to have a reliable NTFS partition created. What do you guys say?

slakmagik 04-19-2003 08:10 PM

Yeah - MS changed, renamed, and hid fdisk as 'diskpart' - type that into the command prompt. I'm not sure of its capabilities because I haven't felt like playing around with this computer's disk like I do my other ones.

31 megs? Ouch. What a waste of a partition. I've got 4 of my 40 gigs hidden from me. What do I need with 10% of the hard drive I paid for? :rolleyes: But it may work to my advantage. :D

Is this OEM? If you were provided with 'recovery disks' rather than a proper OS, it's likely to reformat your hard drive entirely, rather than obeying partition limits you set for it. If that's the case, I'd probably give ntfsresize a try. If it fails, use the recovery disks and you're back where you started. If you do have proper disks, you might still try ntfsresize - if that fails, then use the disks and try to tell it to set up a partition table and install on one, then install Linux after it. Depends. Saving data would make it risky - being able to reinstall - unless things go *really* badly, the worst you should get it is where you where and at best, you'll have a cool new Linux box.

So if you don't need to save data, try to get diskpart to create itself a Win partition (which I'd format as FAT rather than NTFS - who cares if XP has an optimal filesystem if it makes things easier for Linux) and then use Linux fdisk to do the rest. If you do need the data, ntfsresize, and then Linux fdisk. Something like that.

Sorry about the repetitive post - I've had a long, frustrating day and not verbalizing too well at the moment. ;)

CodeWarrior 04-20-2003 10:48 AM

Hidden Partition? I never heard of that. How do you find out if you have any?

ANyways to you second point, Yes my OS is the OEM one they give you. You make a good point, I fI try to repartition my drive and put XP on, it might repartion the drive an put itself on the whole thing.

I found the diskpaarted thing, and they don't make it easy to use like fdisk was! :mad: The only way I will know for sure is that I will just erase all my partions with diskparted and then tell it to create a partion for XP and I will leave space for Linux. Then I will install XP from the OEM disk and see if it takes all the spcae. If it does take everything, I am back to being in the same place. It doesn't then I will have saved myself $70 from having to buy partion magic. Don't get me wrong, partition magic is a great product, I used it before to make a dual boot 95/linux PC, but it costs $70 dollars. If I can save the cost I would like to.

I guess what I don't understand is this...
Lets say I have 1 partion all WIndows and I have partition magic(or disparted) on it. If I tell the software to delete this partion then tell it to create a new partion, won't it have deleted itself when it deleted the partion? Now how can it go about createing a new one? or do the changes only take effect when you exit the program?

david_ross 04-20-2003 10:57 AM

If you have a good backup of your data and are willing to reinstall anyway you may be as well to try resizing the XP partition first.

CodeWarrior 04-20-2003 12:09 PM

David,
Thats tru I can try it what the hell. But i want to claim as much as 20 to 30GB for my Linux partition, will I be able to move it that much? You posted the link for NTFS resize, but doe sit work on windows?

david_ross 04-20-2003 01:14 PM

You should be able to resze the partition as much as you want. So long as in theis case you aren't using more than 10GB for XP.

To be honest I have had a need to resize an NTFS partition as my windows box is totaly seperate from linux (I would hate linux to catch anything ;))

I this program won't run on windows but looking at page I linked to before:
http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
your best bet will be to put it on a floppy.

What distro are you intending to install? From what the page says Mandrake 9.1 has the utility built in with a graphical interface. If you are going to use RedHat you can probably just put the program onto a floppy and boot ino rescue mode and run it from the floppy. Other distros may not have such facilities in which case you may need to use a distro that will fit on a floppy to run ntfsresize before the install.

slakmagik 04-20-2003 02:19 PM

Finding hidden partitions...

Well, you can do diskpart, select your volume, list - and it'll list partitions. Or, um...

start
settings
control panel
system
hardware
device manager
disk drives
click on plus to expand it
right-click on the drive
properties
populate

and there they are! Wasn't that obvious?

Or start>settings>control panel>administrative tools>computer management>disk management, which is a little easier. There are other places where, if you add or subtract gigs or notice your boot partition is 2, it'll give it away but those are the only places I know that show you directly. My recovery partition is also subtitled (EISA Configuration) so you probably found yours and that's all you've got.

As far as rewriting the tables when the program is on the disk, it's loaded into RAM so it's in a volatile state and it's writing to the boot sector or FAT or whatever, which doesn't get deleted, and it's just deleting the stored copy of itself on the hard drive. And it doesn't actually delete any data, anyway. I deleted a DOS partition with Linux fdisk, restored it with a different size, and my data was still there and that partition still booted. Because it just changes the slices of disk and everything on the slice stays right where it is, even if the dimensions of the slice change. Kind of like having a notebook under a box. If you throw away the big box and put down a smaller box, the data is still there, as long as it still fits in the box. But if someone doesn't know to look under the new box, the data might not be findable, even if it's still there. Um. Anyway - so you delete a partition with a fixed disk tool and then reinstall the tool with the rest of the OS.

But David_Ross has some good stuff - might as well use a floppy and I've heard Mandrake does have a lot of this stuff built in, too. As far as size, I think the base XP is something like 4 gigs, though OEM guys bloat it with a bunch of lame software, and then there may be your data - but with an 80 gig hard drive, as long as you don't have gigs and gigs of data, a 40/40 split at least should be easy and you only need a very few gigs for Linux (at most) if you do a separate /home partition that Windows and Linux can share where you keep all your personal data.

And keep in mind, all my playing around so far has been with various FATs and ext2 and ext3 - if you were trying to mess with NTFS or Reiser your mileage would almost certainly vary.

J.W. 04-24-2003 12:48 PM

The best tool for partitioning that I've come across is called BootIT NG, from TeraByte Unlimited. It pretty much handles anything, and it was invaluable when I was trying to setup my dual boot between XP and Linux.

In the 2 cents department, I'd make the following suggestions: First, I'd highly recommend defragging the drive prior to repartitioning, as this will maximize the amount of contiguous space you could then allocate to Linux. Secondly, I'd recommend making the repartitioning work a separate task to be completed before you begin the Linux installation. This will allow you to focus on the installation itself without the distraction of dealing with the partitioning issue. Personally, I found that having the partitions already set up greatly streamlined the installation. Good luck with it -- J.W.


All times are GMT -5. The time now is 10:13 PM.