LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   change partition format without losing data (https://www.linuxquestions.org/questions/linux-general-1/change-partition-format-without-losing-data-762245/)

smeezekitty 10-15-2009 07:36 PM

i want to change the format of my root partition (/dev/hda1)
without losing data.
got any ideas?

BUMP?

GrapefruiTgirl 10-15-2009 10:45 PM

Quote:

Originally Posted by smeezekitty (Post 3721113)
BUMP?

Zero-reply threads are automatically "bumped" several times. You have only succeeded in taking your question off of the zero-reply list, so it will no longer get bumped automatically. Also, as you only posted the question yesterday, give people a chance to answer-- not everyone is online when you are, nor are at least half of our members even necessarily awake at any given time, as members are from all around the planet :) so time-zone differences apply.

You might find that, instead of waiting for people to ask "What is it now, and what do you want to change it to?", you may get better results if you tell folks what file system is on the drive now, and what you wish to change it to.

As far as I know, unless it is one of the Ext* formats, you will have the most success and least trouble by simply backing the data up somewhere, and re/formatting a/the new partition, and putting the data back.

If it IS one of the Ext file systems, such as Ext2, you could upgrade it to Ext3 or Ext4.

Regards,
Sasha

smeezekitty 10-15-2009 10:48 PM

it is ext2 and i am changing it to something else but not quite sure what
Quote:

Zero-reply threads are automatically "bumped" several times. You have only succeeded in taking your question off of the zero-reply list, so it will no longer get bumbed automatically.
i dont get it.

i have a bad habit of bumping after a few hours if i dont get a response and am ver persistent about the problem.

GrapefruiTgirl 10-15-2009 10:53 PM

Quote:

Originally Posted by smeezekitty (Post 3721120)
i dont get it.

*what* exactly 'don't you get'?
Quote:

i have a bad habit of bumping after a few hours if i dont get a response and am ver persistent about the problem.
That is a habit you will want to get out of here on LQ, for two reasons:

1) Impatience will not win you any friends here; people don't care how urgent your problem is, nor how persistent you are, and this sort of behavior will cause folks to ignore you, not help you faster.

2) As mentioned, threads with zero-replies, i.e., a question which has not yet had a reply, will automatically get 'bumped' several times to the top of the queue, before finally being allowed to drift into oblivion. Therefore, it is not necessary, nor etiquetically correct, to bump threads.

Cheers,

Sasha

John VV 10-15-2009 11:17 PM

back up your data and reformat

that is how .

smeezekitty 10-15-2009 11:21 PM

Quote:

Originally Posted by John VV (Post 3721153)
back up your data and reformat

that is how .

how do you do it on the root partition as in /

lumak 10-15-2009 11:51 PM

cp -a -x /* /path/your/backupdrv

if you don't have back up room and all important files are already safe, just reinstall

smeezekitty 10-16-2009 12:02 AM

Quote:

Originally Posted by lumak (Post 3721186)
cp -a -x /* /path/your/backupdrv

if you don't have back up room and all important files are already safe, just reinstall

i am copying / to /mnt/hdb1
but wont i go into an infinite loop when it gets to /mnt/hdb1
coping the files into themselves?

pixellany 10-16-2009 12:16 AM

Perhaps lumak was just exaggerating to make a point?

What's relevant here is that there is no need to copy **everything** if you are going to re-install the OS. If you are trying to keep the existing OS, but on a different filesystem format, then copying **everything** and then copying it back is about the most difficult method I can imagine.

Let's back off for a moment: What is the context of all this---ie what problem are you trying to solve?

smeezekitty 10-16-2009 12:18 AM

no problem i just dont like the ext file system

catkin 10-16-2009 12:19 AM

Quote:

Originally Posted by smeezekitty (Post 3721200)
i am copying / to /mnt/hdb1
but wont i go into an infinite loop when it gets to /mnt/hdb1
coping the files into themselves?

You may but the command will not because of the cp -x option, detailed in the man page.

smeezekitty 10-16-2009 12:22 AM

how do i know if *ALL* of it is copied?
i do not want to loose it all

pixellany 10-16-2009 12:28 AM

Since you really did not completely address my last questions and comments, allow me to suggest a plan:

1. Backup your DATA ONLY somewhere. (eg external USB drive)

2. Reinstall the OS, picking your desired filesystem format.

3. Copy your data back into your /home directory.

smeezekitty 10-16-2009 12:34 AM

Quote:

Originally Posted by pixellany (Post 3721226)
Since you really did not completely address my last questions and comments, allow me to suggest a plan:

1. Backup your DATA ONLY somewhere. (eg external USB drive)

2. Reinstall the OS, picking your desired filesystem format.

3. Copy your data back into your /home directory.

not so good
i would rather keep evreything intact and reinstall the bootloader

pixellany 10-16-2009 12:37 AM

I'm afraid that you are making things too difficult, but: Good Luck!

Regardless of what else you do, get your DATA safely backed up FIRST.

GrapefruiTgirl 10-16-2009 12:50 AM

Let's take another approach for a moment: What is it you don't like about Ext2, and/or what do you expect to gain by changing to a different file system? Are you looking for journaling? Compression? Changing for the sake of changing isn't practical ;)

smeezekitty 10-16-2009 12:58 AM

looking for somthing that has less overhead
its a very small disk and ext2 has a huge overhead
for example a ext2 floppy it 300k instead of 1400K and i have some more reasons

GrapefruiTgirl 10-16-2009 08:43 AM

Quote:

Originally Posted by smeezekitty (Post 3721253)
looking for somthing that has less overhead
its a very small disk and ext2 has a huge overhead
for example a ext2 floppy it 300k instead of 1400K and i have some more reasons

What are those other reasons? All factors should be considered. And have you done some research to determine which file system(s) will suit you best?

Ext* is a bit overkill for a floppy disk; I suggest using a FAT file system on floppies, or maybe consider making the Ext file system on them have a ridiculously small Inode-to-Block count (if it's even possible to make it small enough).
And, if you use floppies a lot, but also have a CDRW drive, you might consider using UDF-formatted CDRW discs instead, as they can be written to in successive sessions and once full, blanked and re-used. This has its own pros and cons when compared to floppy disks, but I have found the ~600Mib floppy CDRW 'disks' created by this process, to be pretty handy at times.

Sasha

pixellany 10-16-2009 09:25 AM

I read our OP as someone who likes to tinker----I can identify: Starting at maybe age 10 I discovered that I could sometimes fix things by taking them apart and re-assembling. Of course, I never knew WHY something got fixed (or at least 1/2 the time NOT fixed).

I say "go for it"---try it and see.

fpmurphy 10-16-2009 10:06 AM

Quote:

how do i know if *ALL* of it is copied?
i do not want to loose it all
Careful checking by you.

smeezekitty 10-16-2009 08:39 PM

Quote:

Originally Posted by pixellany (Post 3721723)
I read our OP as someone who likes to tinker----I can identify: Starting at maybe age 10 I discovered that I could sometimes fix things by taking them apart and re-assembling. Of course, I never knew WHY something got fixed (or at least 1/2 the time NOT fixed).

I say "go for it"---try it and see.

your right, i do like to tinker.

lumak 10-17-2009 11:29 AM

I just wanted to say sorry to the OP for my bad suggestion. I was answering the post right above it but I didn't explain the better option. However, my current signature line offers that warning ;P.

5+ gigs is a lot of data to back up with 'cp' x.x yikes!...

Unless of course your /usr and everything unessential to boot is on a different partition... my '/' partition is only 340MB of data aside from /boot which is on another partition...

Even if /var is included on your / partition, that should still be under 1 gig.

jschiwal 10-17-2009 12:09 PM

Look at tune2fs. A certain percentage of disk space is reserved for the root user. You can change this, possible achieving your end goal. The default reserved-block-percentage is 5%.

smeezekitty 10-17-2009 12:31 PM

@lumak its ok you dont need to apoligize
heres the output of df
Code:

Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/hda1              674600    633260      7072  99% /

/var /home /tmp /bin /sbin /boot /etc all on /


All times are GMT -5. The time now is 07:15 PM.