LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-25-2005, 08:16 AM   #1
willy_9
Member
 
Registered: Oct 2005
Location: France
Distribution: Mandriva 2008.0
Posts: 35

Rep: Reputation: 15
Question swapon on ntfs


Hi everyone,

I searched through this forum, but wasn't able to find a solution, I hope someone can give me some answers. Here it is :

I am using a linux live CD, slax (damn, I can't put the URL for the moment... google it !) , which is really great, and I would like to use some swap with it. Problem is the only hard drive I have is NTFS, since I'm using it on my professional laptop. I thought I could do it with kernel 2.6.12 since it is capable of writing inside existing NTFS files if it doesn't change their size, but I can't get it working. What I did was :

under linux, create a 1.0gb file on a usb drive :
Code:
dd if=/dev/zero of=/mnt/sda1_removable/swapfile.swp count=2000000
under Window$ 2000, copy it on c:/

reboot linux, make it a swapfile :
Code:
mkswap -c /mnt/hda1/swapfile.swp
swapon it :
Code:
swapon /mnt/hda1/swapfile.swp
This is where I get every time :
Code:
Invalid Argument : /mnt/hda1/swapfile.swp
What did I do wrong ? Or can't I swap on NTFS ?

Thanks in Advance !!!
 
Old 10-25-2005, 08:38 AM   #2
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Orleans, 120 km south of Paris
Distribution: Mandrake, Freeduc (the one I'm making), Slackware, MacOS X
Posts: 166

Rep: Reputation: 39
Post

Hello, an advice you should follow:forget this idea. Unless you want to lose your professionnal datas on HDD.

Buy an external storage system.
 
Old 10-25-2005, 08:46 AM   #3
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Yes, I agree Stéphane Ascoët.
Although linux kernel 2.6.10+ can write on ntfs but it was extremely dangerous.
Most of distro disable this features.
But some Live CD enable its to statisfied windows user.
I think there must be some solution somewhere on the internet but you should give up this idea.
Do so can throw away your data once day
 
Old 10-25-2005, 08:49 AM   #4
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Quote:
Originally posted by TruongAn
[B]Although linux kernel 2.6.10+ can write on ntfs but it was extremely dangerous.
Most of distro disable this features.
/B]
Not really. NTFS write in 2.6.10+ is actually very safe but you cannot change the size of a file. If you enable the new NTFS write in the kernel and use the swap file on the NTFS partition as Linux swap you should have no problems since the file size never changes, so the MFT never needs to be touched.

It is kernels prior to 2.6.10 where NTFS writes are dangerous.
 
Old 10-25-2005, 09:37 AM   #5
willy_9
Member
 
Registered: Oct 2005
Location: France
Distribution: Mandriva 2008.0
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks for your help, guys...

Yes, I was quite confident in the kernel 2.6.12 to be safe enough to write within existing ntfs files. It's just that it seems that the swapon command refuses to work on an ntfs partition, or I misunderstood the problem... I wonder if anyone ever tried to do it. I agree it is a strange way to use linux, but that would really help me.
 
  


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
weird 'swapon -a' error elluva Slackware 3 08-18-2004 02:39 AM
swapon command Krenn Slackware 3 08-13-2004 08:53 AM
swapon hda6 - invalid argument ??? thepasty Mandriva 1 07-09-2004 09:37 AM
2.6.3 swapon - function not implemented Sammy2ooo Linux - General 3 03-10-2004 07:08 AM
mount a partition and swapon on boot(fstab??) edman007 Linux - Newbie 4 10-01-2003 05:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:41 PM.

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