LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I get HD space back from Linux (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-get-hd-space-back-from-linux-23571/)

justiceisblind 06-16-2002 06:05 PM

How do I get HD space back from Linux
 
I have acquired another computer and I would like to restore the HD on my current computer to one Windows fat32 partition like it originally was. How can I delete the linux partition and get one partition back? Is it possible? I already backed up all my linux info and I don't want to switch HD's between the two computers, but I want to get rid of Linux on this machine so I can install it on the other machine that I have. Any help is greatly appreciated, and thanks in advance!!

nincompoop 06-16-2002 07:08 PM

part 1
Make sure you have a startup disk with Windows\MSDOS version of fdisk.exe and format.com that has support for FAT32 (A windows 98 startup disk is best). Also, if your going to install Windows from CD and the CD isn't bootable, you want to make sure your startup disk has DOS cdrom drivers (usually a win98 startup disk works) so you can reinstall later.

Part 2
boot into linux and delete all of the partitions on the drive, using linux fdisk. To find out what partitions you have, at a prompt type 'fdisk -l" (lowercase L). It should list out partitions, something like /dev/hda"X" or /dev/sda"X" (if your drive is a SCSI), with 'X' being the number of the partition. Make a note of the letter before the number 'X'. In most cases with 1 hard drive, this will be 'a' like above.

then run 'fdisk /dev/hda' (or fdisk /dev/hd_ where _ is the letter you made a note of in step 2).

part 3 (at the fdisk prompt):
type d <enter> (to delete a partition)
type 1 <enter> (to pick partition 1)
type p <enter> (to print out the partition table)

repeat "part 3" (changing the number for each successive partition in the "type 1 <enter>" step) until the partition table doesn't have any entries

part 4
once there aren't any entries in the partition table:
type w <enter> (to write the partition table back out to disk)

part 5

boot with your startup disk from part 1
type fdisk /mbr <enter> at the prompt (this will nuke any boot loader like LILO out of the master boot record)
type fdisk <enter> at the MSDOS prompt
It should ask you if you want to enable large disk support - say yes
Create a primary partition, make it use the entire space and make it active
reboot with the startup disk, at the MSDOS prompt
type format c: /q

you should be good to go

justiceisblind 06-16-2002 08:40 PM

well, I guess I should have said non-destructively...is that possible? But thank you for helping, if that's the only way I'll go ahead and do that.

nincompoop 06-16-2002 09:00 PM

My question now would be, non-destructive to what? Your linux installation/data (you said it was backed up) or your old Windows installation?

If you want your "original" Windows fat32 partition back its probably a little late, unless you have that backed up.

What I mean is if you installed linux already and originally had a ***single*** fat32 partition with Windows on the drive, then you probably don't have it anymore and what I suggested will bring you to that point (with NO operating system, windows OR linux).

If you used something like partition magic or some other re-partitioning software to resize your existing windows fat32 partition before installing linux, that's different...

justiceisblind 06-16-2002 10:32 PM

ok, ok, I should have specified more information, once again, and i'm sorry about that. I have 2 partitions, a (roughly) 3 gig Windows98 fat32 partition, and a (again, roughly) 1.5 gig Ext3 partition for Linux. What I want is to get Linux off this HD, and make all the HD back into one partition for Linux. I used fips to partion, and I wouldn't have much of a problem backing up my Win98 data, but I want to do this in the easiest way possible. Thank you again! I appreciate your help, as I have no knowledge on this subject.

nincompoop 06-17-2002 12:39 AM

>>What I want is to get Linux off this HD, and make all the HD back into one partition for Linux.

Are you sure thats what you want?

What do you want to keep from your "fat32" partition? I suppose you can keep it, but I don't know what your end goal is...

sakeeb 06-17-2002 01:14 AM

you can use you linux partion as d: on you windows installation. login as root and run fdisk
fdisk /dev/hda
delete linux partions using d (use m for help) and create a new extended partition and a logical partions within extended partion. change the type of partions to fat32 (use t and change to b ). now you will get a d: from windows . format it from windows and you can use it

justiceisblind 06-19-2002 10:55 PM

I want to get rid of the linux partition, and expand the FAT32 partition that runs Win98 (dual boot) so I can install Linux on the other computer I have. If there' ANY POSSIBLE WAY that I can delete the linux partiton and preserve the data on the windows partition. I want to have all the space available as one partiton, and the last solution offered seemed like the closest I could find so far.... when I have that F:\ drive can I make it all into one partiton, or one like 90% of the drive partion and one small 10% of the drive, using fips or something???

nincompoop 06-20-2002 11:42 PM

Absolutely! there are ways, but it may cost you the purchase price of a commercial product such as partition magic. There may be a freeware program that will dynamically resize your windows partition after you have deleted your linux partition(s) using linux fdisk. I have not experimented with any software of this nature, so I can't help much but.....

I searched www.winfiles.com for "resize partition" and got the following link (paste it all in, it's split at the question mark)

http://download.com.com/3120-20-0.ht...ion&tg=dl-2001

nincompoop 06-20-2002 11:52 PM

Looks like the link is actually clickable in my above reply. Use at your own risk, but it may be what you want.

justiceisblind 06-21-2002 12:28 PM

ok, so what it looks like I'll have to do is delete the linux partitiin using linux fdisk. Then, with some kind of resizing program for dos or windows I could resize the current fat32 drive to fill up the free space that I gained from zapping linux from the hd. Then I need to somehow run a dos based version of fdisk to resorre the mbr to a single boot win98 machine. It doesn't sound too hard, I'll have to give 'er a try. Thanks for your patience! I'll let everyone know what I used and how I used it for future reference.

fool_inteligent 06-21-2002 03:45 PM

friend download the worlds best partitioning tool called ranish partition manager 100 times better than partition magic.
very little of some KB
copy it on floppy or or make a bootable floppy of ranish.
boot from its floppy or any bootable cd. then open this and delete all linux partitions and make new ones of fat 32.
you can get rid of linux partitions easilt but can not get rid of lilo
in a simple way. make your MBR standrd IPL through it and then install windows.
hhtp://come.to/ranish

justiceisblind 06-21-2002 11:51 PM

I got linux off the HD by using Linux fdisk. I have the mbr removed using dos fdisk /mbr. Using ranish partition manager, I am able to resize the partition to utilize the entire disk. BUT, when I do this, I find that windows doesn't recgonize the size change. I run dos fdisk, it sees the size increase. I do a dir on c:\ while in dos. it doesn't see the size increase either. I'll run fips, it says that the partition is 8417997, not 5719077 like specified. So, I change it back to 5719077 and it's all good again. I try to extend the dos partition using fips, but all that will let me do is split the existing partition into 2. I can't figure out why windoze won't recgonize the change... I saved the partition table to disk, but for some reason windows doesn't see the change. Currently my HD is split the exact same way it was before, just the ext3 partition is empty/free space and I can't reclaim the free space. HELP!!

justiceisblind 06-23-2002 09:15 AM

The problem I have with ranish is when I extend my windows partution to the end of the drive it doesn't see it. I can't figure any other way to extend my partition to the end of the drive either...


All times are GMT -5. The time now is 12:58 PM.