LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-03-2005, 10:30 AM   #1
Moist
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Rep: Reputation: 0
Change file system, no dataloss?


Is there a way for me to change the file system of my linux partition without data loss? I want to change my file system from reiserfs to fat32 and I really don't feel like re-installing. If not i guess i'll just copy all my necessary files to my window partition and re-install with fat32 in the first place.
 
Old 03-03-2005, 10:50 AM   #2
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Ubuntu ("karmic", "oneiric")
Posts: 214

Rep: Reputation: 24
Opinion

I hope someone else comes along and tells you a way to do this without data loss. I don't think you can. When you touch the file system in such a major way, I think you'll lose everything.

The rest of my ramblings are really just to convey that if you want to mess with file systems a lot, make a lot of partitions so you only mess up one at a time!! Low level file system stuff is the trickiest, because you simply can't hold onto your data if you're going to trash the file system. However you
can do anything you want to one partition without messing up another. One thing you may be able to do is to repartition your drive right now (cfdisk) and make the partition you already installed Linux on (reiser) smaller while protecting the Linux install. Then you can make the rest of the drive (shudder) FAT32.
OK ... read on.

FAT32 is a terrible file system for reliability. I'm not just bashing Microsoft. NTFS is much better than FAT32. Why don't you at least change to NTFS, since it sounds like you need Windows to see your drive. I'd also recommend a few partitions just for Linux. At the very least, your 5 GBytes of Linux boot partition and /home could be reiser or ext2. It will do Windows no good
to look at your Linux system files anyway. (Ext2 and Ext3 -- journaling file systems, are much more protected against unexpected shut-downs and power outages.) On the assumption that you have a nice large hard drive, I'd reserve out 20-40 GBytes or so in an extra partition "for later". You don't need to format it now, or if you do, you can change your mind about the file system on it later (so long as you can lose what you wrote!). As your Linux skills improve, you'll be able to install one, or even multiple different distros in that reserved partition, and Windows won't get hosed when you do it. ALSO, Linux is more than happy to mount a Windows drive, so you can have your NTFS partition for Windows and then you can mount it onto your LinuxFS and poke around in it, even though all your other partitions are reiser or some such.
 
Old 03-03-2005, 11:07 AM   #3
Moist
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Original Poster
Rep: Reputation: 0
I'm not really concerned about windows being able to read my linux partition, but the thing is, when i installed linux I didn't give it much space, only around 3 gb thinking that i would never really do much with big files, needless to say, i was wrong.

So i unallocated about 5gb from my windows partition using partition magic, and i was planning on adding it to my main Linux partition so i could actually add more of the packages that came with suse The problem being that partition magic doesn't appear to be capable of modifying a reiserfs partition (This is why i wanted to change my file system, probably a bad reason) and i don't know how to add my unallocated space to the linux partition, which i suppose would be the best solution.

I'd really rather not have another drive to use as my "file" drive, that's just a concept that's always bothered me.

Edit:: I was going to go with fat32 because i've heard bad things about linux compatability with ntfs, but if it's fine that would be my choice.

Last edited by Moist; 03-03-2005 at 11:27 AM.
 
Old 03-03-2005, 02:54 PM   #4
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Ubuntu ("karmic", "oneiric")
Posts: 214

Rep: Reputation: 24
WIN NTFS Support

You've done your homework, sir. I poked around after your reply and your concerns about NTFS are worthy (I'd forgotten about that). I just cfdisked my brand new Gentoo system and cfdisk definitely supports NTFS ... however I found a disturbing post from 2003 as follows:

" ntfs write is not supported yet. if you can read it then you can copy it. you should check your linux permissions."

I think this has been fixed, but I wouldn't bet YOUR system on it. I generally do all Linux or all Windows machines, and when I did a dual boot machine about 18 months ago, I used WinME and FAT32 for reasons similar to yours.

As far as your problems w/ partition magic, you need a Linux boot CD (Gentoo live disk, Knoppix Live disk, Debian ... most distros have them). Once you have booted from CD, you can
use Linux CFDisk and change your partitions (I can't imagine it would conflict w/ system commander, because you are rewriting the MBR so system C. should be completely gone once you do
Linux cfdisk). In this way, you can change your 5 GBytes to Reiser.

I assume this isn't your first Linux system, but if it is and you are dual booting just to get a feel for Linux, you might try Knopppix. It's a live CD that's loaded up w/ all the goodies (open office, image editing, browsers some games). You can
run Knoppix all you want w/o touching your Windows drive or
getting involved w/ partitioning at all. (Of course, Knoppix does run kind of slow because of all
that CD accessing, so you will get impatient and want a hard
drive install at some point.)
 
Old 03-03-2005, 06:19 PM   #5
Moist
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Well, I figured out that i can change the size of a current partition from Yast, however, it's probably not a good idea to change the size of a currently mounted partition, So if i can find a way to run YAST while not having my main partition mounted my problem would be simple to fix, however i'm not sure if this is possible.

Is CFdisk capable of modifying the size of currently existing partitions? I booted using the suse rescue system, but it only had fdisk which, as far as i can tell, can't modify currently existing partitions. however, it is capable of creating new ones out of my unused space, which is not exactly what I want.

Also, This is actually my first Linux system, and i'm running it because, quite simply, it runs better then windows (I've already "Got a feel for it"), however i still prefer to run my windows applications in their native environment.
 
Old 03-03-2005, 06:47 PM   #6
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Ubuntu ("karmic", "oneiric")
Posts: 214

Rep: Reputation: 24
fdisk / cfdisk

Well you're doing really well for your first system!

cfdisk is just a different interface to fdisk, as I recall. Capabilities are identical. You are right that it can't "resize" existing partition, but what it can do
is delete it and create a new one that uses the original space + more. This action by itself will not erase your existing data. because rewriting the master
boot record does not affect any other data. Unfortunately that fact is mostly of academic interest, because, trying to format the new larger
space with reiser or ext2 or ext3 WILL erase your data.

So you are back to ... "resize w/o data loss?" ... and the answer is "no" ... except, I suppose, if you were going to do it all w/ partition magic ... but even then
you are changing from reiser to FAT32 ... that will for sure cost you access to all your data.

So there is one more hope.

I expect you haven't installed much that you care about. Delete what you don't care about and then use "df" to see how much data you actually have.
If it's only a few hundred megs or 1 GByte, you could create and format a temporary partition, copy all of your data to that, then go ahead and wipe
your current partition, grow it, format it, and then copy the old data back to it. (Sounds like a lot of work!) Or ... if you have gotten CD's or USB working you
can back up onto those media and then use ALL the remaining space for a new partition.
 
Old 03-03-2005, 07:37 PM   #7
Moist
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Well, I saw that it's possible to run Yast from the Suse install disks, so i attempted to increase the size from there. It didn't work. So I ended up with a corrupt partition, now i'm doing a fresh install and chalking it up to experience you're right that i didn't have much of importance on there, otherwise i'd be pretty upset about this whole situation. Thanks for the (attempted) help hopefully i won't run into this kind of trouble in the future, but judging from my way of dealing with computers, this is the first in a very long line of re-installs :P
 
Old 03-04-2005, 09:00 PM   #8
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Ubuntu ("karmic", "oneiric")
Posts: 214

Rep: Reputation: 24
You are welcome. It seems to me like you are really taking to Linux. I think you'll do very well.
I'm pretty busy right now, but I recreationally dip into LQ from time to time and I always learn
something myself.

A long line of reinstalls ... you bet, but if your drive is partitioned right and you reserve some
"play space" for yourself and keep your /home partition separate from /boot, you can reinstall to
your heart's content as you learn more w/o losing your /home data again..

If you ever rewrite your MBR accidentally, or even wipe out a partition w/ fdisk, so long as you
fix it in short order and do not recreate the filesystem after you do, your data will still be there.

One of the nice things about fdisk also is that you can mess with your partition table all you want
conceptually, but until you hit "Write changes to disk" your MBR is safe.
 
Old 03-07-2005, 01:21 PM   #9
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
Re: Change file system, no dataloss?

Quote:
Originally posted by Moist
Is there a way for me to change the file system of my linux partition without data loss? I want to change my file system from reiserfs to fat32 and I really don't feel like re-installing. If not i guess i'll just copy all my necessary files to my window partition and re-install with fat32 in the first place.
What do you consider to be "data loss"? Any Unix based file system will lose ownership and permission related attributes when stored to a windows file system. Some files will have to have their names modified to meet the rules of the new file system. For example, the file name "z:abc" is a file "z:abc" on Unix but a file "abc" on drive "z:" on windows.
 
Old 03-07-2005, 01:37 PM   #10
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
Skimming this thread, I have a few notes:

1. Do NOT convert your Linux partition to FAT32. Do NOT convert it to NTFS. Don't do it! It won't work! For Linux to run, it needs to be run on a file system capable of handling Unix style file permissions. Neither FAT32 nor NTFS support them.

2. Try using QTParted instead of Partition Magic to resize your partitions. Your real problem seems to be that you're wanting to resize your Linux partition.

Download a Knoppix style liveCD like Knoppix of Mepis. Those both include QTParted, which is an open source Partition Magic clone. With a liveCD, you can boot the entire OS straight from CD, so you don't need to mount any hard drive partitions. This gives you full freedom to manipulate the drive partitions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
An error Occurred during the file system check. Dropping you to shell; the system wil aneikei Linux - Newbie 3 02-11-2010 08:38 PM
figuring out 'file system' and 'swap file system' types TrulyTessa Linux - Newbie 3 09-26-2005 07:46 PM
read only file system change navaladi Linux - Newbie 2 02-18-2005 03:36 PM
A sob story about dataloss--any help appreciated chort Linux - Hardware 2 07-08-2003 01:58 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 08:23 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration