LinuxQuestions.org
Help answer threads with 0 replies.
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-06-2004, 07:14 AM   #1
trutnev
Member
 
Registered: Sep 2003
Distribution: RedHat 9.0, Mandrake 9.1
Posts: 68

Rep: Reputation: 15
from swap to ext3 ?


Is it possible to pass from swap to ext3 without formating the partition ?
I had problems with my swap that was on hdc5, and I ran the command 'mkswap' on hdc6, the wrong partition, the one with
'/' label. And now I cannot access to the system, all data including... I wonder if I can do smth with that. Because I don't really want to reinstall the system.

It is really stupid, but it happens.

Thanks.
 
Old 03-06-2004, 08:54 AM   #2
randomblast
Member
 
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291

Rep: Reputation: 30
You have already formatted the system with mkswap, you need to reinstall, sorry.
 
Old 03-06-2004, 09:08 AM   #3
trutnev
Member
 
Registered: Sep 2003
Distribution: RedHat 9.0, Mandrake 9.1
Posts: 68

Original Poster
Rep: Reputation: 15
I remember that it takes me about 5 minutes to format ext3, but it took only several seconds to format swap. Was it smth like quick format ?
 
Old 03-06-2004, 09:22 AM   #4
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
REINSTALL??????? right. The is the most stupid answer I have seen.

simply use fdisk to change the type and then mke2fs the filesystem.

Of course mke2fs takes longer, ext2 is a filesystem, white swap is simply a mapping.
 
Old 03-06-2004, 09:50 AM   #5
randomblast
Member
 
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291

Rep: Reputation: 30
Quote:
REINSTALL??????? right. The is the most stupid answer I have seen.
the way i read it his root is hdc6, if he formats it, he must reinstall.
 
Old 03-06-2004, 10:07 AM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
Ahh sh_t. It is just my pet peeve where such a common suggest to any problem is to reinstall the entire system, so STUPIDLY, I did not read the post entirely. :-( Forgive me.

If hdc6 was the root partition and therefore mounted, I am kind of surprised mkswap would run. I will have to test that out (not of course on anything essential).

There is always the possibility of restoring the root partition from the backup (there is a backup is there not). There is also the possibility of booting with a boot disk and running mke2fs to restore the superblocks. See man mke2fs, the -S option. I do not know the actual effects of mkswap, but it may be worth a try.
 
Old 03-06-2004, 02:11 PM   #7
randomblast
Member
 
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291

Rep: Reputation: 30
No problem, i see that answer too much as well.
There may be a way to restore, such as restoring the superblocks, i'm not sure.
I very much doubt there is a backup of the entire root filesystem though.
 
Old 03-06-2004, 04:14 PM   #8
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
Hopefully you haven't done anything drastic yet to change the contents on the partition. You may still be able to recover your info. mkswap only overwrites the superblock on the partition, so you should still be able to recover the contents by repairing it with a backup superblock. You have to boot up linux on a different partition or one that resides in memory. Either use a live-cd installation(knoppix), a linux-on-a-floppy(tomsrtbt), or install linux on another partition. After you have it booting in the other linux system, do a e2fsck on /dev/hdc5. Unless the partition is seriously corrupted, you should be able to get back your info.

Last edited by comp12345; 03-06-2004 at 04:16 PM.
 
  


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
Should i use as my swap an ext3 partiotion or a reiser one ?? nasty_daemon Slackware 2 09-07-2005 11:53 AM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 01:57 PM
how to convert ext3 to ntfs? cannot even see ext3 partition parv Linux - Hardware 1 12-31-2004 03:56 PM
Need Partition Creator for Ext2, Ext3 and Swap Partitions (FREE) milesonwheels Linux - Laptop and Netbook 2 07-14-2004 06:18 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM


All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration