LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reformatting and Partitioning (https://www.linuxquestions.org/questions/linux-newbie-8/reformatting-and-partitioning-197443/)

Humanguin 06-24-2004 11:13 PM

Reformatting and Partitioning
 
Hi all,

I am having a bit of difficulty with Mandrake 10.0. I upgrade from 9.2, and I have not liked the results. Many things seem to be messed up with my installation, and I think it would be easier to do a reinstallation of the whole thing. The only thing is that I have about 30 GB (out of 60 total) that I want to keep. These are just music files, video files, documents, etc. Is there any way to create a separate "safe" partition to hold these items, reformat the operating system and everything else, and merge everything back? The Mandrake operating system is the only one installed.

I am very new to linux, so excuse me if the question seems stupid. I am sure the solution is very simple, and that I just missed it. I was thinking maybe I could create a random partition like /safe and move everything there. I am afraid of formatting it while doing the install, though.........

Thanks for your help.

lrt2003 06-25-2004 12:12 AM

yes, that is the way to do it.

fdisk or cfdisk - could be risky if you haven't used them before.

fdisk /dev/hda -- then m to list commands is one way - there are heaps of tutorials on these out there

if you have a burner or usb-storage device, use it for the most important stuff - work documents, etc

also, don't overwrite or format the partition when re-installing the operating system. I've done it before. it's very easy to do.

dalek 06-25-2004 01:56 AM

I have been known to just delete the partitions and starting over from scratch. I did it once with Gentoo.

If you make a 'copy', make sure you are not copying a running OS. Some files will be locked and it will not copy them. I say that from experience. It don't always work that way.

I hate to say this but upgrading Mandrake is about the same as upgrading windoze. It is a crap shoot. Sometimes it works, sometimes not.

Cfdisk is easier but you can use the ?druiddisk? that Mandrake uses. It is easy to use and it works well from my experience.

Hope you get it going soon.

:D :D :D :D :D

Humanguin 06-25-2004 12:11 PM

Thanks for the help. I am still a bit unsure of what to do, though. If I create a folder ~/safe, is it possible to reformat the entire root partition and the home partition with this one exception? If so, should I do this manually or with the help of a program? I have heard fdisk and others thrown around. Mandrake has some kind of ?Drakedisk (I forget what). Is that possible to use? If I do create this /~safe, I assume that I should create a partition. Is that correct? Thanks again for the help.

motub 06-25-2004 12:16 PM

What you'll want to do is create a partition and a folder (~/safe). You would then mount the partion to ~/safe (~/safe is the mount point for partition /dev/hd*). Move/copy all the files you want into ~/safe, then unmount it (or not).

In any case, you can now reformat anything you like except /dev/hd* (the new partition that you copied everything to). When you have your system stabilized/reinstalled/whatever, you can then create a mount point for /dev/hd*, mount it, and recopy any of the files to wherever you want them, or you can just leave them and use the mount point normally.

Hope this helps explain things (but if not, just say, and I'll go on at unbearable length ;) )

Humanguin 06-25-2004 05:22 PM

I think I understand what you mean. If you could be a bit more detailed, I am sure it wouldn't hurt. First, I copy everything over conventionally, as if copying any ordinary file for any ordinary purpose. Then, I mount the folder, reformat everything else, and reinstall everything. Is that correct? Thanks for all of your help.

motub 06-25-2004 09:58 PM

Nope, it's backwards. Do you have free (unallocated) space to make this new partition before formatting anything?

I am assuming so, but if not, just don't bother reading further.

What you would do is make a new partition using cfdisk. For the sake of this example, we are going to call it hdb7, and we're going to pretend that it's a FAT32 partition. So now, hdb7 exists, all empty, but is inaccessible to your file manager.

To make it accessible, you need a mount point for it. So you then create a folder, ~/safe (or, a folder named "safe" in your home directory). You would then use the mount command as follows: mount -t vfat /dev/hdb7 /home/username/safe.

The (non-existant) contents of hdb7 are now available via a file manager in ~/safe. If you then copy whatever files to this folder, you are copying them to the new partition. Once you have done that, you can unmount the partiton (depending on how you're reformatting; if you're reinstalling, you have to reboot anyway, which will unmount the partition; if you're using cfdisk from inside a running installation, then it's wisest to umount /home/username/safe to make sure that hdb7 is again inaccessible).

At this point, you can reformat all partitions except hdb7 (which contains the files you just backed up). When you have regoranized the system to your satisfaction, you can then make a new mount point for hdb7, mount hdb7 to that mount point, and then copy the files it contains to whatever location you choose.

Does that make it clearer (keeping in mind that "hdb7" is not necessarily the correct designation for whatever partition you will create, as I don't know what drive it's on, or how many other partitions already exist)?

Electro 06-26-2004 02:19 AM

To be on the safe side, I suggest buying a USB to IDE device. Then buy a 120 GB hard drive. Make a partition then format it. Next copy the files. You have to wait for a few hours to copy the files but its better than losing years of data. Using programs like fdisk, cfdisk, parted, etc can really screw up your hard drive and you probably lose your data.


All times are GMT -5. The time now is 07:37 AM.