PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

mkswap' and 'swapon' 'swapoff


Your Ad Here

Your Ad Here

hi folks; Can someone or all help me setup a swapfile correctly please? I already destroyed my Debian (Sarge) install once after reading the man pages for 'mkswap' and 'swapon' (which says "The parbreastion or path must be prepared with mkswap", before activating it with swapon).

I just now see there are a *couple* of man pages for swapon;

#usr-share-man-man2-swapon.2.gz #usr-share-man-man8-swapon.8.gz

I was hasty to say the least (since I know what a swapfile is and does)....and after seeing this in the man mkswap pages, I issued;

To setup a swap file, it isnecessaryto create that file before initializing it with mkswap , e.g. using a command like;

# dd if=-dev-zero of=swapfile bs=1024 count=65536

except - I went full bore and used 512MB - hence;

# dd if=-dev-zero of=swapfile bs=1024 count=524288

Smallest Linux to got internet and Office
Now comes the "canned" speech about what's wrong with GG posting. It's offered as a learning tool, to help you get more...

.....note; I may have had to alter that slightly to get it to work ...and definewhichparbreastion to place it on -- ala; # dd if=-dev-zero of=-dev-hda3 bs=1024 count=524288

Like a shmuck, I buttumed it would realize there's data ondev-hda3 already (that's my Debian Install and ' ' parbreastion.), and just create the file after the data, in an empty area - big mistake! To make things worse - and even though it took a while, and being the new linux trooper that I am, I marched on with;

# mkswap -c -v1 -L swapsterdev-hda3

Big mistake numero Duo! I confirmed this first immediately by noticing nothing worked after that and getting many of the same Ext3 errors across the screen...and secondly, after rebooting into Recovery mode 'single' and using 'fdisk' (to find the start-end of blocks of hda3) - then a 'dd' command that skip=SECTORS and found-read the LABEL I created -- also present were manymany zeros -- Doh!

Here's my fdisk output now;

Diskdev-hda: 82.3 GB, 82348277760 bytes 255 heads, 63 sectors-track, 10011 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

mkswap' and 'swapon' 'swapoff' 819
Keith Keller I see - well using 'dd' to make a swap invar-tmp called 'swap' (no swap-sterany more - no more LABELing trials and tribulations for now) so; I have this when using...

Device Boot Start End Blocks Id Systemdev-hda1 * 1 1275 10241406 c W95 FAT32 (LBA)dev-hda2 1276 3188 15366172+ f W95 Ext'd (LBA)dev-hda3 3189 5620 19535040 83 Linuxdev-hda4 5621 10011 35270707+ b W95 FAT32dev-hda5 1276 3188 15366141 b W95 FAT32

;;;;;;;;;;; Anecdotal - extra info ;;;;;; earlier and needed to create another primary parbreastion with which to copy over my subsequently unbootable hda1 and hda5. Parbreastiion hda5 was done during the Debian (re)Installation using the installer's "Copy parbreastion..." command, after creating hda4 (explicitly for the copies of hda1 and hda5) -- but i cannot seem to copy hda5 over using a GUI in Debian (no permission, even after many sudo, mkdir mnt-tmp, remount, mount), and I'm not going to attempt potentially damaging console commands' just yet. Once I achieve that goal, I can then WIPE hda1,2,and 5 ;;;;;;;;;; End Anecdotal ;;;;;;;;;;

What a mess I've made -- have a good laugh on me -- please ;-) But also please help me to just set up and use a SWAPFILE for now...

I have a ~20GB linux parbreastion (-dev-hda3) and approx. 15+GB is FREE space

# uname -a Linux localhost 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU-Linux (for those who may recall any of my previous posts, I originally had kernel 2.6.8-2-386, but I am using 2.4 now)



Your Ad Here

List | Previous | Next

mkswap' and 'swapon' 'swapoff' 819

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Ankit Fadia : The real picture