Install on HDD drive BUT load it to ram at bootup

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Install on HDD drive BUT load it to ram at bootup

Post by nexussea »

Hi,

So I already played around with puppy distros, and I think I already know most way around it, except for that one thing I always wanted to figure out (which may or may not look obvious to others beside me):

How can I install it on a drive (eg: HDD) but, while still loading it from ram using the drive it's installed on, like a bootcd would do?

I mainly want this so that i have another way to install it beside frugal, normal install on drive, etc. And then I can switch whenever :)

I'm just overly curious about it, and I already figured out part of it (eg: making partition, etc) but just wondering how to do the "load it to ram using the drive where it's installed on..." part (I'm guessing I'll have to edit the grub config?)

if this was ever done before, I'm sorry in advance as I have not found said post(s) when searching prior to asking this :D

EDIT: actually the only way I know of to do this would be to directly use the drive as an actual cd/disc, and dd/write the puppy distro (here I'm planning on using fossapup9.5)...but that's wasteful (since this would make the free space of the drive unusable as far as i know), since I recall that it wouldn't really work on a specific partition (unless I did it wrong) and would only work if I do it on the whole drive instead.

I wouldn't be surprised if there is a better way

Thanks in advance.

P.S.: I mainly posted on "Beginner Help" because my problem pertain/is related to installation, and may or may not already be covered by an existing post/wiki entry which I didn'd find (if it is). If I used the wrong place to post this, feel free to tell me (if there a better place for that kind of question).

User avatar
mikeslr
Posts: 2965
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 922 times

Re: Install on HDD drive BUT load it to ram at bootup

Post by mikeslr »

Your question can have two meanings.
A frugal install always boots as if it were on a CD because what a frugal install actually entails is copying the system files [using fossapup64 as an example initrd.gz, vmlinuz, puppy_fossapup64_9.5.sfs, and any/all ?drv_fossapup64-9.5.sfses] to the drive.
Initrd.gz is an acronym for Initial RAM Disk. On boot-up instructions in initrd.gz determines what other system files to use. My layman's understanding is that --in the absence of boot-argument instructions-- among the instructions also included in the initrd are ones which examines the media the puppy is booted from and configures the 'operating system being created in RAM' accordingly.
By default, if booted from a hard drive, that configuration has changes you make written to the hard drive immediately. This is known as PupMode 12. If, however, you've booted from a USB-Key, those changes are held in RAM, only periodically written to media [default every 30 minutes and when you shut-down/reboot]. The original purpose of those instructions was to minimize wear-and-tear of USB-Sticks. This is known as PupMode 13.

Under PupMode 13 Menu>System>Puppy Event Manager>Click Save Session Tab opens a GUI enabling you change the Save interval [0=never] and --by putting a check in the box-- have Puppy Ask if you want to Save. On shutdown two buttons --Save, No Save-- will appear. Save is highlighted so all you have to do is press return. No Save, however, is the default: do nothing and in 60 seconds Puppy will shut-down/reboot without Saving.

You can trick a Puppy located on a hard-drive into operating as-if it were on a USB-Stick by providing or changing the boot argument. Depending on what boot-loader you use the line beginning with kernel or linux will be either silent or have an argument reading "pmedia=atahd". Edit that to read "ataflash", or if nothing is written about pmedia add that argument.
My boot argument in grub.cfg for Fossapup64 on a hard-drive reads:

linux /fossa64/vmlinuz psubdir=/fossa64 pmedia=ataflash pfix=fsck

The other interpretation of your question is how to have a Puppy located on a hard-drive operate entirely in RAM. See this discussion: viewtopic.php?p=41084#p41084. Of course, it's kind of inconvenient to unplug a hard-drive. But once Puppy boots to desktop the hard-drive is no longer automatically accessed*: the Puppy operates entirely in RAM.
Caution: Your Puppy is fossapup64. 666philb included an adrv.sfs in its ISO. That adrv.sfs contains many applications. I recall amethyst providing advice as to how to, under Fossapup64, use the Save2SFS module I referred to in the above post . Edit (found the post) viewtopic.php?p=29114#p29114. An adrv has priority over a ydrv: that is, in the event of conflicting files, those in the adrv will be used. Use Save2SFS to create an adrv. In the future you can create an new adrv which will include the contents of whatever is in RAM plus whatever was in the old adrv if not superseded by the contents of RAM. [Deletions in RAM will result in the contents formerly part of your system not being written to the new adrv. If the contents were in the 'core' or ydrv, a 'white-out' file will be written preventing their use/access].

* You can, of course, mount it and use it.

Last edited by mikeslr on Mon Nov 08, 2021 6:20 pm, edited 2 times in total.
User avatar
snoring_cat
Posts: 206
Joined: Tue Sep 21, 2021 3:40 pm
Location: Earth
Has thanked: 24 times
Been thanked: 46 times

Re: Install on HDD drive BUT load it to ram at bootup

Post by snoring_cat »

Hi nexussea,

I put together a Notecase document going over the steps needed for your scenario. In the document is also a section about running in RAM. The graphics take up some space, so I can't post the Notecase document here.

Here is the link

Just download it and click on the file via Rox file manager. Rox will start up the Notecase application for you. Sorry about the poor graphics. I'll have to remake the file at some point.

Meeeooow!

-- substance over noise, since 5 minutes in the future --

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Install on HDD drive BUT load it to ram at bootup

Post by nexussea »

Thanks a lot for both of your answers :)

I managed to do it thanks to both of your instructions. :thumbup:
Added pmedia argument as per your advice/instruction mikeslr and pfix=ram as per yours snoring_cat (btw, your guide is great!, really detailed and easy to understand)
This is all working now! Thanks again.

RAK
Posts: 3
Joined: Tue May 14, 2024 9:10 pm

Re: Install on HDD drive BUT load it to ram at bootup

Post by RAK »

The "HERE IS THE LINK" takes me to this URL https://raw.githubusercontent.com/w00fp ... nstall.ncd, but for some reason all I can see is the html code. My browser won't render this html code. Any idea what I am doing wrong? Thanks

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 370 times

Re: Install on HDD drive BUT load it to ram at bootup

Post by williwaw »

I do not have notecase installed, so could not test in notecase, but I did a copy and paste and then saved with .html extension and it opened in chromium

Post Reply

Return to “Beginners Help”