Jump to content



Photo

  • Please log in to reply
1 reply to this topic

#1 moeburn

moeburn

    tracer bullet

  • Joined: 10-March 04
  • Location: Toronto, Ontario

Posted 05 September 2013 - 16:40

So I have an old 80GB HD, attached to a USB enclosure, which is attached to my router.  I used a GParted live usb to format the drive to have a 250mb linux-swap partition in the beginning, and then the rest 79GB to be a FAT32 file storage partition.  Then I plugged the drive into the router, and ran the mkswap command, and now the router is (sort of) happily chugging along with about 2-10mb of the swap partition in use.

 

Then I decided I wanted to reformat the FAT32 partition to an EXT4 partition.  I plug the drive into my linux computer, run GParted, and it says that the 250mb partition at the beginning of the drive is "unrecognized", and it has no idea that its a linux-swap partition!  Yet the router is able to use it just fine, sort of, at least it says it is.

 

Well I'm getting some weird bugs on the router ever since I added the swap file.  Nothing router-crashing, just strange, annoying bugs, like now there are two instances of 192.168.1.1 in the bandwidth-usage graph on the router's web UI gateway page, or that the bandwidth graph shows 200-Petabyte spikes every now and then.

 

So I'm wondering, is GParted supposed to be able to recognize a linux-swap partition after mkswap has been run on it?  Or is my swap partition semi-corrupted, and could be the cause of all these strange bugs that started showing up after I added the swap?

 

Also, how the heck do I un-mkswap/remove a swap partition/disable the automounting of a swap partition?  All the guides I've read on the internet say to either use swapoff -a, which returns the following error:

root@Gargoyle:~# swapoff -a
swapoff: /etc/fstab: open failed: No such file or directory

...or they say to edit the /etc/fstab file.  Well I ran ls /etc/fstab, and it came up blank:

root@Gargoyle:~# ls /etc/fstab
ls: /etc/fstab: No such file or directory

So I don't have an fstab file.  So how do I disable the swap file without just unmounting the entire drive?




#2 Aergan

Aergan

    Neowinian Senior

  • Tech Issues Solved: 3
  • Joined: 24-September 05
  • Location: Staffordshire, UK
  • OS: Windows 8.1 Pro / Server 2012 R2 / Mint 16
  • Phone: Sony Xperia Z1

Posted 05 September 2013 - 18:33

It's likely because it's being reported as a USB-Flash Drive (Should be a single partition, no MBR) but mkswap has treated it like a USB-HDD.

 

I've got around this before by creating a new file system on the device (You'll loose your data though) as MS-DOS + MBR then partitioned it correctly in gparted. You should notice that after it presents itself as a USB-HDD.

Never had an issue since (Except keep it away from any Windows Disk Management services because it wont be properly manageable with multi partitions).





Click here to login or here to register to remove this ad, it's free!