Question about the initrd.gz

Booting, installing, newbie
Post Reply
Message
Author
triminh
Posts: 45
Joined: Tue 19 May 2009, 08:13

Question about the initrd.gz

#1 Post by triminh »

Hello,

I have a new question which is related about the file "initrd.gz".

Can you tell me the way how to make the initrd.gz which will ask users to create personal saved session (pup_save.2fs or pup_save.3fs) when starting the first time from the CD?

Thanks for you help,
triminh
moB
Posts: 116
Joined: Mon 19 Oct 2009, 11:25
Location: Coastal

#2 Post by moB »

triminh,

seems you wish each user to be offered the option to make a personal save file on their first run.

You might try this:
  • 1. Make a boot stanza for first-time boot.
    2. Make other login options.
    3. Set default boot option to first-run option.
For example:

Code: Select all

default 1
color green/black yellow/grey 

  title Puppy (Users: Sign In)
  root (hd0,1)
  kernel /pup500/vmlinuz root=/dev/sda1 psubdir=pup500
  initrd /pup500/initrd.gz

  title Puppy (First-time: Create Account)
  root (hd0,1)
  kernel /pup500/vmlinuz root=/dev/sda1 psubdir=pup500 pfix=ram
  initrd /pup500/initrd.gz

  title Puppy (Filesystem Check)
  root (hd0,1)
  kernel /pup500/vmlinuz root=/dev/sda1 psubdir=pup500 pfix=fsck
  initrd /pup500/initrd.gz


Maybe this helps?

moB


it must needs be plucked at from the skies,
and dived for in the deep...
-- Melville, Moby Dick

Edit:

You should also have a wait-time specified:

Code: Select all

timeout 13
so the users have time to react.
Put it at the top of your grub script, of course :)
User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#3 Post by bigpup »

Do not think this would be a good idea. You want to make the save file after Puppy has fully booted and all settings are good.
At the first shutdown is when you are asked to make a save file. If you do not, it will be asked each time you boot until one is made.
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

It seems like there was a thread like this already
http://www.murga-linux.com/puppy/viewtopic.php?t=48465

I never did like the fact that it waited till you are shutting down to offer to save a file - maybe I actually want to do stuff with it on the first use and _not_ lose it. It shouldn't be too hard to add a parameter like pnewsave=...
you'd need to add a case pnewsave*) where it is looking at /proc/cmdline that decompresses a compressed save file from the initrd

I forget the command to make the save file (see the shutdown scripts) but rather than going through that long process (making the file takes a while) it would be better to pre-make it, compress it and include it in the initrd (a 1gb file compresses to a few kb and uncompresses much faster than making it on demand)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
moB
Posts: 116
Joined: Mon 19 Oct 2009, 11:25
Location: Coastal

#5 Post by moB »

bigpup wrote:Do not think this would be a good idea. You want to make the save file after Puppy has fully booted and all settings are good.
At the first shutdown is when you are asked to make a save file. If you do not, it will be asked each time you boot until one is made.
Yes, that about sums it up.

You can make changes to the sfs file easily enough.
Maybe you want to transfer savefile info?
You might edit your sfs to include such.

Under NOP I have passed configuration to a new personal savefile by renaming process.
Search the forum, there might be something usefull to you there.

One can separate the creation of personal savefile from shutdown, and avoid redundant setup operations.

Fix it 'til it's good and broken!
... then rebuild it as it should be :)
moB
Posts: 116
Joined: Mon 19 Oct 2009, 11:25
Location: Coastal

#6 Post by moB »

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#7 Post by nooby »

I do remember vaguely that there exists a recent updated puppy derivate already that do ask this from scratch and then it reboots but then it does not know which country keyboard and what time zoone and what browser I wanted to use and it has not set up iptables and so on.

But sure maybe it is good to have?
I use Google Search on Puppy Forum
not an ideal solution though
Post Reply