Puppy doesn't use swap partition when booting from USB?

Booting, installing, newbie
Post Reply
Message
Author
User avatar
Greybird
Posts: 4
Joined: Sat 09 Sep 2006, 12:10
Location: City of Angels
Contact:

Puppy doesn't use swap partition when booting from USB?

#1 Post by Greybird »

Newcomer to Puppy here, from Los Angeles! I've been investigating this over the Net via Gaim chatting and the help of a Aussie friend on the other side of the Pacific, "Deref" in Canberra. It's impressive and quite appealing, especially in its speed and compactness.

My computer (locally brewed) with 512 MB of RAM, 1.1 GHz, normally runs Windows XP. I used Partition Magic to carve out a 1 GB Linux swap partition from one of my NTFS partitions.

When I booted Puppy 2.0 from a live CD, it recognized the swap partition without any special action on my part, and this was reflected in the free-memory indicator in the Puppy taskbar. I had over 960 MB of free memory space.

When I used the Universal Installer to install Puppy on my 256 MB USB stick, though, and rebooted to load Puppy from there, the hard-disk swap partition was not recognized. It was mentioned, clearly, in the startup messages as having been detected and, supposedly, put to use. But Puppy wouldn't actually use it when fully booted.

I had minimized the Puppy personal storage file to 18 MB by temporarily copying other files to the USB stick. (It's unfortunate that you can't specify how large you want this file to be ... perhaps something to add to the To Do list?) This gave me only 12 MB of free memory.

I used the Resize Personal Storage File utility to add 64 MB, which now gives me about 72 MB of free memory. Apparently the swap space is in a file within the personal storage file.

How do I get this USB installation of Puppy to recognize and use the Linux swap partition on my hard disk? I searched diligently in the forums and could find nothing addressing this.

The Media Utility Tool doesn't help -- it sees the swap partition (as "hda9"), has a "Use Swap" button displayed, but this apparently does nothing when clicked.

Thanks in advance for any help! Please keep in mind that I'm a Linux neophyte, but I do know how to use the command console ... I'm a throwback to CP/M days {grin}
Last edited by Greybird on Sun 10 Sep 2006, 18:51, edited 1 time in total.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

i'm not sure why puppy's not using it directly, but you can add a line to the file /root/.etc/rc.d/rc.local to get puppy to use it on bootup.

swapon /dev/hda2

assuming /dev/hda2 is formatted as swap. (also i'm using pup1.08, so i'm not sure with 2.02, might be /etc/rc.d/rc.local)

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#3 Post by muggins »

i just re-read your post & saw that you said MUT doesn't turn swap on. this makes me wonder if it's properly configured &/or formatted.

so if you do fdisk /dev/hda, then press p, does this show it as a swap partition? (then press q to quit).

and did you do mkswap /dev/hda? (where ? is swap partition)
Last edited by muggins on Mon 11 Sep 2006, 00:10, edited 2 times in total.

User avatar
Greybird
Posts: 4
Joined: Sat 09 Sep 2006, 12:10
Location: City of Angels
Contact:

#4 Post by Greybird »

Thanks for the help! I've added that line to the rc.local file, with the swap partition being hda9, and we'll see if it works on the next boot-up of Puppy from USB. (If there's a way to get such configuration changes to "take" on the current boot-up, I'd appreciate knowing how.)

The utility you suggested gave the following partition list:

/dev/hda1 * 1 2079 16699536 7 HPFS/NTFS
/dev/hda2 2080 9729 61448625 f W95 Ext'd (LBA)
/dev/hda5 2080 4629 20482843+ 7 HPFS/NTFS
/dev/hda6 4630 7179 20482843+ 7 HPFS/NTFS
/dev/hda7 7180 9466 18370296 7 HPFS/NTFS
/dev/hda8 9467 9598 1060258+ b W95 FAT32
/dev/hda9 9599 9729 1052226 82 Linux swap / Solaris

I didn't use "mkswap" under Linux to create the swap partition, I used PartitionMagic 8.0 under Windows XP. It reported no problems.

Update, 10 minutes later: The entry in rc.local made no apparent difference, it seems. The free memory reported remains at about 70 MB.

It's more of a mystery to me than any inconvenience, as 70 MB seems to be plenty of free memory, and even with SeaMonkey and Gaim running, it only goes down at most to about 62 MB.

Still, I don't see any reason why my live CD would make full (and automatic) use of an existing Linux swap partition, and my USB installation would not.
Last edited by Greybird on Sun 10 Sep 2006, 19:53, edited 2 times in total.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#5 Post by GuestToo »

do you get any error messages if you open an rxvt terminal console window and type:

swapon /dev/hda9

to see how much swap space you have and are using, you can type:

free

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

cfdisk

#6 Post by raffy »

In console, you can try "cfdisk", delete then create the swap file. Then make it again: "mkswap -v1 /dev/hda9" (if it is still hda9) and then "swapon /dev/hda9".

Or you can just use the 2.1r2 or 2.2 version of Puppy, hoping the result would be different.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
Greybird
Posts: 4
Joined: Sat 09 Sep 2006, 12:10
Location: City of Angels
Contact:

#7 Post by Greybird »

Thanks for the continuing replies!
GuestToo wrote:do you get any error messages if you open an rxvt terminal console window and type: swapon /dev/hda9

to see how much swap space you have and are using, you can type: free
Here's what I get:

sh-3.00# swapon /dev/hda9
swapon: /dev/hda9: Device or resource busy

sh-3.00# free
total used free shared buffers
Mem: 515632 248000 267632 0 21144
Swap: 1052220 0 1052220
Total: 1567852 248000 1319852

It thus seems to be reported as being "busy" or in use, and it's added in with the rest of the memory. Puppy still isn't reporting anything more than 62 to 68 MB, though, in the taskbar readout, when booted from the USB stick.

I'll note again that when Puppy booted from the live CD, it reported 960 MB or more in the taskbar, with the same (created under WinXP) swap partition.
raffy wrote:In console, you can try "cfdisk", delete then create the swap file. Then make it again: "mkswap -v1 /dev/hda9" (if it is still hda9) and then "swapon /dev/hda9".

Or you can just use the 2.1r2 or 2.2 version of Puppy, hoping the result would be different.
I'm ultra-cautious with partition tables. Thus far I've only let Partition Magic (now in 8.0 for WinXP) touch them, but that's never once failed, back to Win95 days. A partition table error can put the whole hard disk in limbo, or worse, and such a utility has to earn my trust. Frankly, Linux has a long way to go.

I think I'll just wait to try v2.2 (I've downloaded the OpenOffice.org edition) or, possibly, the soon-to-come v2.10 of Puppy and see if this will change. That'll also allow writing to NTFS disks, as well. But even that I'll only try first, and repeatedly, with a test NTFS partition.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#8 Post by GuestToo »

free says that you have 512 megs of ram, and 1 gig of swap space, which gives you a total of 1 1/2 gigs of virtual ram

the free-memory indicator in the Puppy taskbar is reporting how much free space there is in the save file on the usb drive
I used the Resize Personal Storage File utility to add 64 MB, which now gives me about 72 MB of free memory
your save file on the usb drive seems to be about 82 megs ... you seem to be using about 10 megs of the save file, which leaves about 72 megs of free space in the save file

the indicator on the task bar is showing how much free space is left in the save file ... it is not showing how much total ram you have

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

safe resizing

#9 Post by raffy »

Frankly, Linux has a long way to go.
- If I remember right, Linux console-based partition resizing has been safe for FAT since more than 5 years ago, and now GUI Gparted is safe for WinXP's NTFS.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#10 Post by Sit Heel Speak »

Greybird wrote:...512 MB of RAM,...USB stick,...Puppy wouldn't actually use it when fully booted...
Yes, it's a bug or design oversight. Something isn't working optimally in the /sbin/init script when Puppy is booted from a USB stick.

(HEAVILY EDITED --...one should never describe a bug in Puppy from memory...it is sure to confuse...one should always be looking straight at it, and describe it precisely, and include a screenshot...which I will do, as soon as Puppy Gold 2.10 finishes downloading here in Win98SE...)

The solution would be either to make part of swap space allocatable as an extension to the second (changes-holding) tmpfs partition, or else do away with the tmpfs partition and use just swap space as the changes-holding area, when booting from USB. Sorry, how to do this is beyond my ken at present.
Last edited by Sit Heel Speak on Thu 14 Sep 2006, 19:20, edited 3 times in total.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

Sit Heel Speak, i think Puppy IS working properly with his usb stick

free says he says he has 512 megs of ram, and 1 gig of swap space

he has about 72 megs of free space in his save file, and that is what Puppy is reporting he has free, in the taskbar applet

i think the problem is that he thinks the taskbar applet is reporting the amount of free ram ... it is not, it is reporting the free space in his save file on the usb stick ... this is what Puppy is supposed to be doing ... it is not a bug

if you want to see how much space you have in your file systems,
type df -h

User avatar
Greybird
Posts: 4
Joined: Sat 09 Sep 2006, 12:10
Location: City of Angels
Contact:

#12 Post by Greybird »

GuestToo wrote:i think the problem is that he thinks the taskbar applet is reporting the amount of free ram ... it is not, it is reporting the free space in his save file on the usb stick ... this is what Puppy is supposed to be doing ... it is not a bug
Well, that's what it says that it's doing, anyway. "Free Memory," it displays.

I have two hard-disk partitions set up for Puppy, a 1 GB FAT32 for storing the pup_save.3fs file (when it's booted from the live CD), and a separate 1 GB Linux Swap.

When I use the live CD, the taskbar applet reports 960 MB or so of "Free Memory." This is both before and after the pup_save file (512 MB) is initially created.

You're saying that this applet is reporting the free space in the save file, not the free memory in RAM-plus-swap-partition. If so, then, when the live CD is running, how could it display 960 MB free? When that save file is only 512 MB?

I'm inclined to think the handling of the temporary ramdisk partition is, indeed, not optimal under a boot from the USB stick. The Puppy system knows the swap partition is there. It's just not considering it to be "Free Memory."

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#13 Post by GuestToo »

i didn't write the free memory applet, so i don't know much about it, but i think there has been confusion over this issue in the past.

I think what happens is, that when Puppy is running completely in ram, like when it first boots in a new machine, and there is no swap, then the applet is reporting the free space in ram

when Puppy is running completely in ram and there is swap space, i think the applet is reporting the free space in virtual ram (ram plus swap space)

when Puppy is running with a save file, i think it is reporting the free space in the save file.

i think this is how it is supposed to work, but i'm not really sure

whether it is working the way it is supposed to work on your machine or not, i don't know

and yes, it seems to be a little confusing

Post Reply