Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The building of one of the softwares I am installing is failing because of the error

c++: internal compiler error: Killed (program cc1plus)

I think this is because I have only 500Mb swap partition. So I am trying to increase it using an external pendrive. I have tried adding

/dev/sdb1 none swap sw 0 0

/dev/sdc1 none swap sw 0 0

( since on booting, sometimes the pendrive partition shows /dev/sdb1 while sometimes it shows /dev/sdc1) to the /etc/fstab file but still instead of showing System as Linux swap on using

fdisk -l

it is showing FAT16. I have also tried

mkfs.ext3 /dev/sdb1

so that we create swap on a linux type filesystem, but it says:

/dev/sdb1 is mounted; will not make a filesystem here!

I also tried

sudo swapon /dev/sdb1

but I get

swapon: /dev/sdb1: read swap header failed: Invalid argument

Please guide me so that I can make a swap partition on my pendrive.

PS: I have root permission.

share|improve this question
    
sudo blkid shows the unique identifiers of the file systems. They won't change unless the file systems are reformatted. In fstab, the notation UUID=uuid_shown_in_blkid avoids the problem of the unpredictable /dev/sd?. –  ignis May 11 '13 at 14:00

2 Answers 2

up vote 1 down vote accepted

Reformat the entire fat16 drive, the USB should be right on unity sidebar (Or wherever you've tweaked it), right click it and re-format (Use ubuntu, ubuntu formats drives 1000 times the speed of windows, period.)

Re-partition it. (Use ubuntu software center to easily find multiple linux partitioners)

Attempt to put all the files back onto the USB now.

This is the quickest way I can think of to make a USB reformatted and afterword, partition.

share|improve this answer
    
While formatting, Error creating filesystem: The device is busy, Details: /dev/sdb1 is mounted –  jink May 11 '13 at 7:44
    
Yeah I could format it as you said. Still having some problem partitioning. –  jink May 11 '13 at 8:03
    
Thanks. I could make a swap partition. I was trying to solve this problem for 4-5 hours. Surely a hint from an expert helps! –  jink May 11 '13 at 8:19
    
No problem jink! :D Do you mind telling everyone which partition program you used and details on process so anybody with any further issue can get help to? :3 –  Nate McFly May 11 '13 at 8:20
1  
I used Disk utility in Ubuntu 12.04 LTS to format the pendrive and gparted to change the type of partition. –  jink May 11 '13 at 10:45

I wouldn't suggest creating a swap partition on a flash device. The read/write rate when swapping would shorten the life of the drive considerably. But if you like, here how its done:

Open disks from dash, and follow the images below in the order that they are listed: Click the + sign to create a partition

enter image description here

Make sure the right type is choose, and name is optional, and them click create

enter image description here

Click the little wheels, to change the partition type

enter image description here

Make sure the right type is chosen, and click change

enter image description here

Notice that the partition type is now Swap

enter image description here

Click on the little square to mount, and that's it

enter image description here

share|improve this answer
    
it look nice 1 2 3 boxes..... –  Qasim May 11 '13 at 8:30
    
Thanks, I try... –  Mitch May 11 '13 at 9:43
1  
Thanks for your detailed reply. And by the way, I just needed swap partition on the pendrive for installing gnuradio and not for prolonged use, so the flash drive won't get spoilt. There were some problems mounting the pendrive, and I needed a non-wubi ubuntu, so I installed a new ubuntu with dual boot using instructions given here –  jink May 12 '13 at 6:31
    
If this answered your question, you may mark this answer as accepted. –  Mitch May 12 '13 at 7:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.