LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Xubuntu Programs Randomly Closing (https://www.linuxquestions.org/questions/linux-software-2/xubuntu-programs-randomly-closing-846891/)

stress_junkie 11-27-2010 04:38 PM

Quote:

Originally Posted by mbonwick (Post 4172960)
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

mbonwick 11-27-2010 04:54 PM

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...

stress_junkie 11-27-2010 04:57 PM

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


MTK358 11-27-2010 04:58 PM

Quote:

Originally Posted by mbonwick (Post 4172923)
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?

stress_junkie 11-27-2010 04:59 PM

Quote:

Originally Posted by MTK358 (Post 4172978)
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.

mbonwick 11-27-2010 05:03 PM

Quote:

Originally Posted by stress_junkie (Post 4172979)
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..

stress_junkie 11-27-2010 05:08 PM

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.

mbonwick 11-27-2010 05:10 PM

yeah, I guess.

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


All times are GMT -5. The time now is 12:27 AM.