LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-27-2010, 04:38 PM   #16
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331

Quote:
Originally Posted by mbonwick View Post
I sucessfully created the file, but when I come to mount it as above, terminal returns;
Code:
ubuntu@ubuntu:~$ sudo losetup /dev/loop0 /swapfile
losetup: /dev/loop0: device is busy
What am I doing wrong?
Xubuntu must be using one or more of the loop devices already.

It turns out that you can format the swapfile without using losetup. I just found this out.
Code:
sudo mkswap /swapfile

Last edited by stress_junkie; 11-27-2010 at 04:40 PM.
 
Old 11-27-2010, 04:54 PM   #17
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Followed all the other steps, rebooted and......nothing.

I also found the command to manually activate the swap file;
Code:
ubuntu@ubuntu:~$ sudo swapon /swapfile                                   
swapon: /swapfile: swapon failed: Input/output error
Any thoughts?

Thanks for all the help so far...
 
Old 11-27-2010, 04:57 PM   #18
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
My swapfile can be manually activated using swapon.

Try doing the mkswap again. It should look something like this.
Code:
$ sudo mkswap /swapfile
mkswap: /swapfile: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 4092 KiB
no label, UUID=52eb7466-7e5d-43c7-845f-60bd5f0be7e9

$ sudo swapon /swapfile
 
Old 11-27-2010, 04:58 PM   #19
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by mbonwick View Post
It's not possible to put more than one partiton on a USB flash drive. I guess I'm going to have to go for a swap file rather than partition.
What, really?

Whare did it say that?
 
Old 11-27-2010, 04:59 PM   #20
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by MTK358 View Post
What, really?

Whare did it say that?
I didn't want to go down that path. I agree. Flash drives can be partitioned. I just figured that making a swap file would be quicker anyway and I'd never done it so it looked like a quick and interesting approach.

Last edited by stress_junkie; 11-27-2010 at 05:01 PM.
 
Old 11-27-2010, 05:03 PM   #21
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie View Post
I didn't want to go down that path. I agree. Flash drives can be partitioned. I just figured that making a swap file would be quicker anyway and I'd never done it so it looked like a quick and interesting approach.
I agree, but it becomes a problem with Windoze (the flash drive is sometimes used for storage)

I ran mkswap again:
Code:
ubuntu@ubuntu:~$ sudo mkswap /swapfile
mkswap: /swapfile: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=af774f0e-bf9b-41fd-971e-15d73609ea49
ubuntu@ubuntu:~$ sudo swapon /swapfile
swapon: /swapfile: swapon failed: Input/output error
No idea why it's not working..
 
Old 11-27-2010, 05:08 PM   #22
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
I don't know either. The only difference is that my swapfile is on an internal disk. Maybe it has something to do with the USB but I don't know.

It makes me wonder if a swap partition on the flash drive would work.

Well, you could try putting more RAM into the machine or just avoid web sites that cause the problem.

Maybe someone else will have some ideas.
 
1 members found this post helpful.
Old 11-27-2010, 05:10 PM   #23
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
yeah, I guess.

Thanks a million for the help. I'll keep trying and post back if I get it working.
 
  


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
Programs randomly closing jonohull Linux - General 1 08-29-2009 12:30 PM
Programs closing on their own bcjohnson Linux - Software 4 02-04-2009 12:25 PM
Closing programs with console john7343 Linux - Software 3 02-22-2006 06:15 PM
Restart X without closing programs 4of11 Linux - Software 1 08-17-2004 03:48 PM
Linux ports randomly closing? eric_marsh Linux - Software 1 07-11-2004 11:33 AM


All times are GMT -5. The time now is 04:36 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration