Getting closer... or ...editing the initrd.gz (Closed)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#41 Post by LazY Puppy »

greengeek wrote:Do you think you will build a script that automatically makes the required changes to the initrd? And to also help the user to set up the new config file at the same time?
There's actually no need to apply changes to the init script.

The chosen wallpaper (defined in external .cfg file) will be copied into the OS, if it isn't already existing inside of the OS. Also it is written to /etc/Puppybackgroundpicture, to /root/.config/wallpaper/bg_img and also to /root/Choices/ROX-Filer/PuppyPin.

As long as the your personaliser script does include to apply the changes made inside of the named files, the wallpaper should appear in the remastered OS.
I also ask them to include a new bootsplash called splash.xpm into the same directory. Would this work for your system?
My boot splash image (splash.xpm) is stored at boot partition - just where it needs to be. How do you get the boot splash from inside of the OS to be shown in Grub or Grub4DOS before the OS is booted?

Any code?
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#42 Post by greengeek »

LazY Puppy wrote: How do you get the boot splash from inside of the OS to be shown in Grub or Grub4DOS before the OS is booted?

Any code?
My goal is different to yours - I build an iso (ready for immediate burning to CD) so I accumulate all of the files I want to add to the iso into a directory called /etc/isofiles. I get the user to add their preferred bootsplash as /usr/share/backgrounds/personal/splash.xpm then during the "distiller" process which assembles all the files i want to get into the iso I bring it across like this:

Code: Select all

#Add the users choice of bootsplash into the iso bootfiles directory
cp -f /usr/share/backgrounds/personal/splash.xpm /etc/isofiles/splash.xpm
Then I carry on with building the iso and burning it to CD

So my /etc/isofiles directory just contains these extra files that need to be added to the personalised sfs and put on CD:
Attachments
etc_isofiles.jpg
(24.57 KiB) Downloaded 472 times

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#43 Post by LazY Puppy »

greengeek wrote:#Add the users choice of bootsplash into the iso bootfiles directory
cp -f /usr/share/backgrounds/personal/splash.xpm /etc/isofiles/splash.xpm
I see now, just thought you would have discovered a secret way to get access to the .sfs from within Grub or Grub4DOS etc.pp.

Ok, while doing some more work on this here I have discovered a small issue when choosing a new Window Manager to use without to load a additional Window Manager SFS.

If setting a new WM just enter a dummy Name for the WM SFS to load.

By now I'm able to setup also:

- WM Theme
- GTK Theme
- Icon Theme
- Audio Theme (only in LazY Puppy/L.A.S.S.I.E. afaik)

Everything is setup from within /etc/profile.local.

Also by now, I'm convinced we really can do absolutely everything from within /etc/profile.local, though some probably may need to be done from /root/Startup.

However, it should be possible to setup also all the needed internet stuff as well as screen resolution and/or screen sizes plus many many more. All from within a regular text file (.cfg).
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#44 Post by LazY Puppy »

Hi.

I have made an update for the initrd.gz of precise 5.7.1 and uploaded to the first post.

The above mentioned small issue is gone and it offers now new options:

MYWMTHEME=
MYGTKTHEME=
MYICONTHEME=
#MYAUDIOTHEMEDIR= # currently not implemented
MYAUDIOTHEME=


The MYWMTHEME is currently working for JWM, IceWM and Openbox.
The MYAUDIOTHEME will only work if your Puppy has /usr/share/audio-themes (plus sub-directories with audio)

I have chosen not to upload a new initrd.gz. Instead I have just packaged the needed files plus a readme file containing needed instructions. Since I'm developing this from running my LazY Puppy I decided also to upload just updated files for the initrd.gz of precise 5.7.1, which saves me some time to be rather used for development instead of doing a manual copy & paste of equal code sections several times for different initrd.gz files.

I will just continue to update these precise 5.7.1 files since all files just needed to be copied and the code from within the init script is easily copied & pasted by your self.

Next I will try to make functions out of my code or even transferring it into separated scripts (as mavrothal suggested), which would make it a lot easier for anyone to include this into their Puppy Systems.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#45 Post by LazY Puppy »

RSH wrote:Next I will try to make functions out of my code or even transferring it into separated scripts (as mavrothal suggested), which would make it a lot easier for anyone to include this into their Puppy Systems.
I have successfully made functions out of two of the main parts of my code, but did fail to get this to work when transferring these functions code into a separated script.

The script so far is executed and it echoes all the needed Information to the console -as it is as when the code is included into the init script- but it does just return empty data, so nothing out of the config file seems to be used and set up.

If someone has some hints how to solve this, please, let me know.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#46 Post by LazY Puppy »

RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#47 Post by rufwoof »

Jasper wrote:Hi again,

One forum member reported doing a substantial sfs remaster using Ted Dog's ram2sfs with xz compression in 86 seconds.

Here, an xz remaster using Ted Dog's ram2sfs takes about 37 minutes, but a gz remaster takes less than 5 minutes.

Yet, your 15 seconds is not satisfactory?
I don't use save files in general and want to save some time on remastering....
I also run with no savefile
To remaster my pup takes <30 seconds (according to time remaster)
Desktop icon to do so that when clicked ...
Normal remaster process run through with no compression of puppy sfs and prompts removed.
zcat initrd.gz piped into cpio (extracts contents). Puppy sfs copied into the same folder and then the content again cpio'd piped through compression, redirected to where my grub4dos expects to find the initrd (and vmlinuz).
Reboot and seconds later running with the newly remastered version.
I currently prefer lzo compression over gzip as even though the filesize is larger lzo loads (decompresses) quicker, so puppy starts up quicker.

Storing puppy sfs inside initrd means that the vmlinuz and initrd pair is all that is required for other LAN (Windows) computers to PXE boot that puppy also.

My core puppy is somewhat bare, so remastering isn't required that often once you have a setup you like. For extra's I use SFS's wrapped inside a RoxApp Dir where the AppRun provides a prompt for which sfs/program to load and sfs_loads the sfs together with pointing the programs config file/directory (sym link) to a read/write version outside of puppy space (so changes preserved across reboots).

Not as sophisticated as LazyPup, but works well for me.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#48 Post by Ted Dog »

Rainer,
not able to translate long reply on German thread, got most of the text but my adult German is poor.

Did you get a computer? to replace the dead motherboard?

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#49 Post by LazY Puppy »

Ted Dog wrote:Rainer,
not able to translate long reply on German thread, got most of the text but my adult German is poor.

Did you get a computer? to replace the dead motherboard?
Yes, thanks to my Girlfriend who has paid 50% of the 179,- €, I got it at home now.

It's a 64 bit machine!

Currently running LazY Puppy booted (Grub4DOS) from USB 3.0 HDD ext2 formatted. Next stop: downloading and testing some of the available 64 bit Puppy Systems.
Pup-SysInfo Summary Report, Di 13 Jan 2015

Current Time: 22:51:51
System Uptime: 19 hr 35 min
Load Average: 0.19 0.33 0.31

=== BASE SYSTEM ===

PC Manufacturer: System manufacturer
Product Name: System Product Name
Serial Number: System Serial Number

Motherboard Vendor: ASUSTeK Computer INC.
Product Name: P5B-PLUS Series

Linux Kernel: 2.6.33.2 (i686)
Version: #1 SMP Thu May 27 10:56:32 EST 2010

Hostname: LazY-Puppy-300-WS
Username: root
Language: de_DE.UTF-8
Keyboard: de
Timezone: Europe/Berlin

Operating System: LazY Puppy 300
Desktop Panel: tint2 version 0.11-svn
Desktop Window Manager: Openbox 3.4.11
Desktop Start: xwin openbox

Boot Partition: sdc1
Boot File System: ext2
Boot Media: atahd

PUPMODE=5
PUPSFS=sdc1,ext2,/LazY/RSHsLP3_300.sfs
PUPSAVE=

=== BIOS ===

Vendor: American Megatrends Inc.
Version: 0804
Release Date: 07/13/2007
Runtime Size: 64 kB
ROM Size: 1024 kB

=== CENTRAL PROCESSOR ===

Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
Socket Designation: Socket 775
Manufacturer: Intel
Voltage: 1.4 V
External Clock: 333 MHz
Max Speed: 3800 MHz
Current Speed of Core 0: 2662 MHz, Core 1: 2662 MHz

=== COMPUTER MEMORY ===

Personal Storage: RAM Disk
Size Used Free Use%
3,0G 173M 2,9G 6%

Memory Allocation
Total RAM: 2026 MB
Used RAM: 714 MB
Free RAM: 1312 MB
Buffers: 9 MB
Total Swap: 4116 MB
Free Swap: 4116 MB

Memory Controller Information
Maximum Memory Module Size: 2048 MB
Maximum Total Memory Size: 8192 MB
Memory Module Voltage: 3.3 V
Associated Memory Slots: 4
Installed Memory: 2 GB

Memory Module 1
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Locator: DIMM0
Type: SDRAM
Type Detail: Synchronous
Speed: 533 MHz (1.9 ns)
Serial Number: SerNum0
Part Number: PartNum0

Memory Module 2
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Locator: DIMM1
Type: SDRAM
Type Detail: Synchronous
Speed: 533 MHz (1.9 ns)
Serial Number: SerNum1
Part Number: PartNum1

Memory Module 3
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Locator: DIMM2
Type: Unknown
Type Detail: Unknown
Speed: Unknown
Serial Number: SerNum2
Part Number: PartNum2

Memory Module 4
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Locator: DIMM3
Type: Unknown
Type Detail: Unknown
Speed: Unknown
Serial Number: SerNum3
Part Number: PartNum3

Internal Cache
Configuration: Enabled, Not Socketed, Level 1
Installed Size: 64 KB

External Cache
Configuration: Enabled, Not Socketed, Level 2
Installed Size: 4096 KB

Cache Information
Configuration: Disabled, Not Socketed, Level 3
Installed Size: 0 KB

=== DRIVES: CD/DVD ===

Device Name: sr0
Model Number: HL-DT-ST DVDRAM GH24NS90
Firmware Revision: IN01

Device Name: sr1

=== DRIVES: HDD ===

Device Name: sda:
Model Number: WDC WD1600AVJB-63WTA0
Firmware Revision: 58.01H58
device size with M = 1024*1024: 152627 MBytes
device size with M = 1000*1000: 160041 MBytes (160 GB)

Device Name: sdb:
Model Number: WDC WD1600AAJB-22WRA0
Firmware Revision: 58.01H58
device size with M = 1024*1024: 152627 MBytes
device size with M = 1000*1000: 160041 MBytes (160 GB)

=== DRIVES: USB ===

E: Ad=0e(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0d(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--
Manufacturer=TOSHIBA
Product=External USB 3.0
--
Manufacturer=Seagate
Product=FreeAgentDesktop

=== DRIVES: PARTITIONS ===

Partition Specifications:

Part Type Size(MB)
sda1 ntfs 50006
sda2 ntfs 102618
sdb1 vfat 50006
sdb2 ntfs 50007
sdb3 ntfs 52611
sdc1 ext2 160252
sdc2 ext3 158344
sdc3 ext3 154226
sdc4 swap 4117
sdd1 vfat 82990
sdd2 ext3 77742
sdd3 ntfs 73646
sdd4 swap 4096
sr1 iso9660 45

Mounted Partitions:

Filesystem Size Used Avail Use% Mounted on
/dev/sdc2 153G 68G 77G 47% /mnt/sdc2
/dev/sdc3 149G 85G 56G 61% /mnt/sdc3
/dev/sdc1 155G 49G 98G 34% /mnt/sdc1

=== FILESYSTEMS ===

Filesystem Size Used Avail Use% Mounted on
/dev/loop0 171M 171M 0 100% /initrd/pup_ro2
/dev/loop4 34M 34M 0 100% /initrd/pup_ro4
/dev/loop5 1,2M 1,2M 0 100% /initrd/pup_ro5
/dev/loop6 3,9M 3,9M 0 100% /initrd/pup_ro6
/dev/loop7 21M 21M 0 100% /initrd/pup_ro7
/dev/loop8 256K 256K 0 100% /initrd/pup_ro8
/dev/loop9 256K 256K 0 100% /initrd/pup_ro9
/dev/sdc1 155G 49G 98G 34% /mnt/sdc1
/dev/sdc2 153G 68G 77G 47% /mnt/sdc2
/dev/sdc3 149G 85G 56G 61% /mnt/sdc3
rootfs 3,0G 173M 2,9G 6% /
shmfs 460M 0 460M 0% /dev/shm
tmpfs 172M 171M 1000K 100% /initrd/mnt/tmpfs
tmpfs 3,0G 173M 2,9G 6% /initrd/pup_rw
unionfs 3,0G 173M 2,9G 6% /

=== MONITOR/GRAPHICS ===

Monitor Name: Belinea1975S
Screen Resolution (pixels): 1280x1024
OpenGL Renderer: Mesa DRI R300 (RV380 3E50) 20090101 x86/MMX/SSE2 TCL
X.Org version: 1.7.6

VGA compatible controller: ATI Technologies Inc RV380 0x3e50 [Radeon X600]
oem: ATI RV380

=== MULTIMEDIA/SOUND ===

Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller
VENDOR: 8086 DEVICE: 284b
KERNEL DRIVER: HDA Intel
KERNEL MODULE: snd-hda-intel

=== NETWORK ===

Ethernet controller: Atheros Communications L1 Gigabit Ethernet
VENDOR: 1969 DEVICE: 1048
KERNEL DRIVER: atl1
KERNEL MODULE: atl1

=== PCI INTERFACES ===

DESCRIPTION: Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub
VENDOR: 8086 DEVICE: 29a0
KERNEL MODULE: intel-agp

DESCRIPTION: PCI bridge: Intel Corporation 82P965/G965 PCI Express Root Port
VENDOR: 8086 DEVICE: 29a1
KERNEL DRIVER: pcieport
KERNEL MODULE: shpchp

DESCRIPTION: Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller
VENDOR: 8086 DEVICE: 284b
KERNEL DRIVER: HDA Intel
KERNEL MODULE: snd-hda-intel

DESCRIPTION: PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1
VENDOR: 8086 DEVICE: 283f
KERNEL DRIVER: pcieport
KERNEL MODULE: shpchp

DESCRIPTION: PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4
VENDOR: 8086 DEVICE: 2845
KERNEL DRIVER: pcieport
KERNEL MODULE: shpchp

DESCRIPTION: PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5
VENDOR: 8086 DEVICE: 2847
KERNEL DRIVER: pcieport
KERNEL MODULE: shpchp

DESCRIPTION: USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1
VENDOR: 8086 DEVICE: 2830
KERNEL DRIVER: uhci_hcd
KERNEL MODULE: uhci-hcd

DESCRIPTION: USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2
VENDOR: 8086 DEVICE: 2831
KERNEL DRIVER: uhci_hcd
KERNEL MODULE: uhci-hcd

DESCRIPTION: USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3
VENDOR: 8086 DEVICE: 2832
KERNEL DRIVER: uhci_hcd
KERNEL MODULE: uhci-hcd

DESCRIPTION: USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4
VENDOR: 8086 DEVICE: 2833
KERNEL DRIVER: uhci_hcd
KERNEL MODULE: uhci-hcd

DESCRIPTION: USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1
VENDOR: 8086 DEVICE: 2836
KERNEL DRIVER: ehci_hcd
KERNEL MODULE: ehci-hcd

DESCRIPTION: PCI bridge: Intel Corporation 82801 PCI Bridge
VENDOR: 8086 DEVICE: 244e

DESCRIPTION: ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller
VENDOR: 8086 DEVICE: 2810

DESCRIPTION: IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller
VENDOR: 8086 DEVICE: 2820
KERNEL DRIVER: ata_piix

DESCRIPTION: SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller
VENDOR: 8086 DEVICE: 283e
KERNEL MODULE: i2c-i801

DESCRIPTION: IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller
VENDOR: 8086 DEVICE: 2825
KERNEL DRIVER: ata_piix

DESCRIPTION: VGA compatible controller: ATI Technologies Inc RV380 0x3e50 [Radeon X600]
VENDOR: 1002 DEVICE: 3e50

DESCRIPTION: Display controller: ATI Technologies Inc RV380 [Radeon X600] (Secondary)
VENDOR: 1002 DEVICE: 3e70

DESCRIPTION: SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller
VENDOR: 197b DEVICE: 2363
KERNEL DRIVER: ahci

DESCRIPTION: IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller
VENDOR: 197b DEVICE: 2363
KERNEL DRIVER: pata_jmicron

DESCRIPTION: Ethernet controller: Atheros Communications L1 Gigabit Ethernet
VENDOR: 1969 DEVICE: 1048
KERNEL DRIVER: atl1
KERNEL MODULE: atl1

DESCRIPTION: USB Controller: NEC Corporation USB
VENDOR: 1033 DEVICE: 0035
KERNEL DRIVER: ohci_hcd
KERNEL MODULE: ohci-hcd

DESCRIPTION: USB Controller: NEC Corporation USB
VENDOR: 1033 DEVICE: 0035
KERNEL DRIVER: ohci_hcd
KERNEL MODULE: ohci-hcd

DESCRIPTION: USB Controller: NEC Corporation USB 2.0
VENDOR: 1033 DEVICE: 00e0
KERNEL DRIVER: ehci_hcd
KERNEL MODULE: ehci-hcd

DESCRIPTION: FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller
VENDOR: 1106 DEVICE: 3044
KERNEL DRIVER: ohci1394
KERNEL MODULE: ohci1394

=== PRINTERS ===

DefaultPrinter pdf_writer
Printer CUPS-PDF

=== END OF SUMMARY REPORT ===

This report is also available in
/tmp/root/SysInfo-Summary-150113.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#50 Post by LazY Puppy »

Since I don't have access anymore to my old RSH account and therefor I'm unable to change the topics title to 'discontinued', I'm going to post here:

THIS IS NOW DISCONTINUED AND NOT SUPPORTED ANYMORE!

All my work done is by now combined and continued into T.O.P.L.E.S.S.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

Post Reply