Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Jul 2019, 10:46
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Making FirstRib bootable with own initramfs
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [44 Posts]   Goto page: 1, 2, 3 Next
Author Message
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Fri 14 Jun 2019, 20:26    Post subject:  Making FirstRib bootable with own initramfs  

Both scripts build_firstrib_rootfs and build_firstrib_initramfs01 can now be downloaded at link below:

http://www.murga-linux.com/puppy/viewtopic.php?p=1028956#1028956

The main FirstRib thread provides a simple short build script for creating a FirstRib Linux root filesystem that can be used via, for example, a chroot on pretty much any Linux host system. The current flavour of FirstRib provides xbps package manager from Void Linux, which is fully dependency resolving:

http://www.murga-linux.com/puppy/viewtopic.php?p=1028956#1028956

Using FirstRib in that manner via a chroot is probably the most useful and is recommended. However, I want to also document the basics on how to also make your built FirstRib root filesystem independently bootable via a suitable initramfs with appropriate grub4dos or grub2 entry.

In practice there are several ways to create that initramfs, depending, for example, on facilities desired, so I am starting this new thread to provide some simple build_firstrib_initramfs script examples to experiment with some of these many possibilities.

Of course there is much more work also required on FirstRib root filesystem itself if you want to provide ethernet or wifi connectivity independently of the host, and I won't be covering that for the moment. i.e. my objective for now is just to show various mechanisms on how to boot firstrib, without worrying about how to independently connect it to the Internet (which for wifi, for example, would additionally need the likes of wpasupplicant and dhcp client configured). Current firstrib rootfs does connect to internet but via the underlying host.

The first build_firstrib_initramfs00.sh script can now be found in second post of thread. i.e. here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1030321#1030321

It won't as I say be particularly useful in the sense of doing much, but is important as a starter to show the basics of how the initramfs boot method works.

NOTE WELL: Once you understand the basics, it is best to move on to main build_firstrib_initramfs01 or higher for actual use. You can find the first of these, build_firstrib_initramfs01_XXXXverXXX.sh at the third post of this thread (with usage instructions), here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1030626#1030626

That 01 model provides save persistence, and loading of external squashfs (sfs) modules, such as firmware/modules, via overlayfs layers, the combination merge of which is reached via a chroot.

For a description/explanation on the basics of how this overlayfs or aufs layers plus chroot design works, please refer to the simple basic design of how to do it that I published a few months ago at the following forum link:

http://murga-linux.com/puppy/viewtopic.php?p=1025496

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Wed 26 Jun 2019, 21:34; edited 8 times in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Fri 14 Jun 2019, 20:27    Post subject: model00 script (simple; provided for understanding only)  

This first build initramfs00 (model 00) is very simple and for instructive/learning purposes only. In practice you should use the build_initramfs01 (model 01) and above build initramfs scripts, which are attached to the thread posts which follow this one. The most sophisticated of these will be given the highest model number.

Attached build_firstrib_initramfs00.sh creates a very simple initramfs.gz file, which you use with grub4dos or grub2 along with suitable vmlinuz kernel for booting (I only currently recommend vmlinuz from BionicDog32 or BionicDog64, depending on whether 32bits or 64bits firstrib_rootfs being used). You should read the script carefully before using it since it contains usage documentation as comments.

NOTE that these first initramfs examples are built to include the full firstrib_rootfs previously created in same directory using build_firstrib_rootfs*.sh script. Later initramfs will illustrate how to use a minimal root filesystem in the initramfs followed by a switch_root to the actual firstrib rootfs you want to use.

NOTE WELL: Once you understand the basics, it is best to move on to main build_firstrib_initramfs01 or higher for actual use. You can find the first of these, build_firstrib_initramfs01_XXXXverXXX.sh at the third post of this thread (with usage instructions), here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1030626#1030626

Like build_firstrib_rootfs scripts the code has purposively been kept very simple and consists of less then 20 actual lines of codes plus the comments.

build_firstrib_initramfs00.sh has been tested using the vmlinuz kernel provided with BionicPup64 in conjunction with 64bit version of firstrib_rootfs (or vmlinuz from BionicPup32 for 32bit firstrib_rootfs). I have chosen to use that kernel because it has common disk/usb/SD drivers built into the kernel. Using Void Linux kernel instead would more than likely (depending on your hardware) require extra modules/firmware to be installed in /lib of firstrib_rootfs so too much trouble at this stage.

To use this initramfs.gz build script, you need to put it in same directory as where your already built firstrib_rootfs is, and then run script from terminal with command:

Code:
./build_firstrib_initramfs00.sh


Once the initramfs.gz file has been created, you should then follow the script comment instructions, which I have duplicated here:

Code:
# To boot the resultant FirstRib system you can now:

# Create a directory, say /firstrib, on partition you will boot from
# containing the files:
#    initramfs.gz
#    vmlinuz (from BionicPup)
 
#  followed by creating a grub4dos or grub2 menu config to boot that.

# In more detail, that is:

# 1. Create a folder named, say, /firstrib on a Linux boot partition of your choice.
# 2. Copy the created initramfs.gz file to /firstrib
# 3. Put a suitable linux kernel (vmlinuz) into /firstrib
#    I've tested using bionicpup64 vmlinuz kernel
#    Make sure it is named: vmlinuz
# 4. Create a suitable grub2 or grub4dos (or whatever you use) boot config
#    containing stanza such as:

#    For grub4dos
#    (Example shows using (hd0,4) i.e. /dev/sda5 boot partition 4 of harddrive
#    Change following to the harddrive boot partition you are actually using):
#
#    title FirstRib (Void Linux Flavour)
#    root (hd0,4)
#    kernel /firstrib/vmlinuz
#    initrd /firstrib/initramfs.gz

#    For grub2 (but change hd0,msdos5 to boot partition you actually use):
#
#    menuentry 'FirstRib on /dev/sda5' {
#      set root='hd0,msdos5'
#      linux /firstrib/vmlinuz
#      initrd /firstrib/initramfs.gz
#    }


NOTE WELL that this first initramfs.gz contains only a very simple init script that simply starts a shell. It is just enough to show that firstrib_rootfs can be independently booted. It all runs in RAM and does not contain any save persistence mechanism and will not be able to connect to the internet (unless the apps/utilities required for that functionality have already been installed and configured in the firstrib_rootfs you are using). It is only uploaded here, for instructive purposes, to show how such initramfs is constructed. You can however use the booted result to mount external partitions, For example:

Code:
mkdir /mnt/sda5 && mount /dev/sda5 /mnt/sda5


The next initramfs build script is somewhat more sophisticated and provide save persistence via overlayfs followed by chroot mechanism (though still no functional internet unless your firstrib_rootfs build is pre-configured for such of course). I have already completed that more sophisticated initramfs following manual modification of the internal init script, but I'm still testing the result prior to uploading a buildscript for it. Might be a little while before I upload that though since I may include code to download suitable kernel and arrange for commandline arg to determine what boot dir it all should be copied to.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Wed 26 Jun 2019, 21:32; edited 12 times in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Fri 14 Jun 2019, 20:27    Post subject:  

build_firstrib_initramfs01_i686verXXX.sh and
build_firstrib_initramfs01_x86_64verXXX.sh can now be dowloaded along with build_firstrib_rootfs scripts at the link below.


http://www.murga-linux.com/puppy/viewtopic.php?p=1028956#1028956

Remove the dummy tar and make executable with chmod +x and place in same directory as your pre-built firstrib_rootfs.

The initramfs.gz product of this build script is suitable for connecting to the Internet once booted (via manually entered configuration commands), even with the default (smallest) firstrib_rootfs build. You can find more details about the build script in its announcement post, here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1030626#1030626

Per FirstRib design philosophy, I've kept the build script very short (around 40 lines of actual code + lots of documentation/comments) and simple, so hopefully easy to read and understand how they work, and thus easy to modify for user's own requirements.

As previously, this build script relies on previously constructed firstrib_rootfs, using the rootfs build script provided at:

http://www.murga-linux.com/puppy/viewtopic.php?p=1028956#1028956

(Though, actually, the build initramfs script would likely work, with some appropriate tweaks maybe, with other root filesystems, such as one extracted from a puppy-xxx.sfs or a xenialdog filesystem.sfs
Just a thought for those who love to experiment...)

Prior to use of build_firstrib_initramfs01... you also need to fetch/download the corresponding (32bit i686 or 64bit x86_64) overlayfs_module_XXXX.tar.gz. The appropriate (32 or 64 bit) overlayfs_module file should also be placed in same dir as build_firstrib_initramfs01 script prior to running the build initramfs script. The overlayfs_module files were too big for attaching to forum post but you can get them from firstrib github links below:

https://github.com/firstrib/firstrib/raw/master/overlayfs_module_i686.tar.gz
https://github.com/firstrib/firstrib/raw/master/overlayfs_module_x86_64.tar.gz

Usage:

Code:
./build_firstrib_initramfs_XXverXXX.sh <boot_partition>


where boot_partition is sda1, sda2... sdb1, sdb1... etc
For example:
Code:
./build_firstrib_initramfs01_x86_64ver005.sh sda5


In your selected /mnt/boot_partition/firstrib directory, you will also need an appropriate 32 or 64 bit vmlinuz (BionicPup vmlinuz generally being used and provided at present). And also a firstrib_firmware_modules.sfs (which for BionicPup kernel can be the full zdrvXXX.sfs renamed to firstrib_firmware_modules.sfs)

You can fetch a copy of tested BionicPup vmlinuz from the firstrib github site at these download links. But rename the file to vmlinuz prior to use. (However, you'll currently also need the BionicPup iso anyway in order to get its firmware zdrvXXX.sfs, which you should rename to firstrib_firmware_modules.sfs):

https://github.com/firstrib/firstrib/raw/master/vmlinuz_bionicpup32v8.0
https://github.com/firstrib/firstrib/raw/master/vmlinuz_bionicpup64v8.0

Once the initramfs.gz has been constructed by build_firstrib_initramfs_XXverXXX.sh you should copy the initramfs.gz along with the relevant BionicPup vmlinuz kernel and firstrib_firmware_modules.sfs into directory:

Code:
/mnt/chosen_boot_partition/firstrib/


and make a suitable grub2 grub.cfg or grub4dos menu.lst to boot that resultant frugal install.

For example:
Code:
# To boot the resultant FirstRib-based WeeDog system:

# Create a directory, say /firstrib, on partition you will boot from
# containing the files:
#   initramfs.gz
#   vmlinuz (e.g. from 32 or 64 bit BionicPup though others can be used)
#   firstrib_firmware_modules.sfs (e.g. renamed from zdrvXXX.sfs if from BionicPup)
 
#  followed by creating a grub4dos or grub2 menu config to boot that.

# In more detail, that is:

# 1. Create a folder named, say, /firstrib on the Linux boot partition of your choice.
# 2. Copy the created initramfs.gz file to /firstrib on that partition.
# 3. Put appropriate (32bit or 64bit) linux kernel (vmlinuz) into /firstrib
#    Make sure the kernel is named: vmlinuz
# 4. Put appropriate firstrib_firmware_modules.sfs into /firstrib
# 5. Create a suitable grub2 or grub4dos (or whatever you use) boot config
#    containing stanza such as:

#    For grub4dos
#    (Example shows using (hd0,4) i.e. /dev/sda5 boot partition 4 of harddrive
#    Change following to the harddrive boot partition you are actually using):
#
#    title FirstRib (Void Linux Flavour)
#    root (hd0,4)
#    kernel /firstrib/vmlinuz
#    initrd /firstrib/initramfs.gz

#    For grub2 (but change hd0,msdos5 to boot partition you actually use):
#
#    menuentry 'FirstRib on /dev/sda5' {
#      set root='hd0,msdos5'
#      linux /firstrib/vmlinuz
#      initrd /firstrib/initramfs.gz
#    }


NOTES:

Once you boot the FirstRib-based system, you can test save persistence is working by creating a test file and then rebooting:

Code:
touch testfile


Note that a quick way for booting from FirstRib commandline is ctrl-alt-delete, but, if you use that, NOTE WELL that you must enter command sync first or your testfile will not be saved out of RAM memory. Alternatively, use reboot -f or poweroff -f (no sync command needed for these cases).

You can also test the firstrib_firmware_modules.sfs has loaded correctly, since if all okay, the following command should show list of firmware on your system:

Code:
ls /usr/lib/firmware


These build scripts have been tested with a minimum default firstrib_rootfs and also with base-voidstrap installed. Boot will fail with larger base-system installed though (I've still to look into why).

Next version of build_firstrib_initramfs (i.e. model02) will employ a very small rootfs inside the initramfs and its init will perform a switch_root to external (large_as_you_like) firstrib_rootfs. Hence for larger builds, that is the one to wait for... Also, that switch_root system will boot much faster since only the small initial firstrib_rootfs needs to first be loaded into RAM during boot. For larger firstrib_rootfs builds I'm also planning to (perhaps) use void linux kernel since that makes additional firmware/module provision easy via xbps package manager. Those wanting to build a very small FirstRib system, however, should find these current BionicPup vmlinuz-based build systems useful since BionicPup kernels boot out-of-the-box without extra modules (other than overlayfs), but disadvantage is that you do need to add your own extra firmware/modules from BionicPup if and when you require it. No such issues anyway if you want to run your FirstRib firstrib_rootfs system as a chroot from any Linux host, which is the method I really recommend).

I am also now working on Internet connectivity for the initramfs builds. That is simply a matter of configuring the system with the likes of ip utility and dhcpcd for ethernet, and wpa_supplicant or similar for wifi.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Wed 26 Jun 2019, 21:35; edited 22 times in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Fri 14 Jun 2019, 20:27    Post subject:  

reserved
_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Fri 14 Jun 2019, 20:27    Post subject:  

reserved
_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Sat 15 Jun 2019, 07:36    Post subject: A very simple initramfs that doesn't do much...
Subject description: To illustrate how an initramfs.gz can be built
 

build_firstrib_initramfs00.sh has been uploaded with details to second post of thread, here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1030321#1030321

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Mon 17 Jun 2019, 07:53    Post subject:  

The second build_firstrib_initramfs script (model 01), which provides save persistence using overlayfs with chroot to merged result, will be posted tomorrow (it is completed, but I have to sleep now so will do final test before upload once I wake). I'll also quickly made a version that uses aufs as an alternative to overlayfs, but please test the overlayfs version in preference since further development will be with that one rather than aufs (since overlayfs officially adopted by kernel devs).

I'm just posting in advance to encourage interested forum members to test out build_firstrib_initram00.sh (i.e. model 00) prior to trying the build script that should be uploaded tomorrow. That will aid understanding since obviously the new 01 script tomorrow is more complex, and understanding the model00 first version will help you successfully test the next one... As always, the documentation is included as comments in the short simple script code (hopefully less than 40 lines of simple shell script plus comments in the build script).

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1125
Location: Connecticut, United States

PostPosted: Mon 17 Jun 2019, 08:17    Post subject:  

I used the first script and the resulting initramfs.gz did complete successfully and it almost finished booting!. I ran the script on a FirstRib set up that worked well as a chrooted OS using Xnest . The boot went all the way to "booting kernel" and stayed there.

I will go ahead and work with script #2 and try again with the fully loaded FirstRib and if it fails again I will use a freshly built system to run the script on.
I am using the vmlinuz from a stock Bionic32 and have not yet attempted it in 64 bit...which I will do later.
It is just easier to break the 32 bit system over and over on my mental health.

Also the boot process was long since the created initramfs is 671 megs large.
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 1125
Location: Connecticut, United States

PostPosted: Mon 17 Jun 2019, 11:36    Post subject:  

It booted and ran....and a 28 meg initramfs.gz

I repeated the experiment with a freshly built FirstRib and a initramfs.gz was produced and using Grub4Dos and next to 20 other Puppy Linux installs, booted and functioned in a simple form. If I can the eth0 to be recognize and actually get some connectivity it would be fun to see how it works and add some X server stuff.
Back to top
View user's profile Send private message Visit poster's website 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Mon 17 Jun 2019, 17:45    Post subject:  

Yes, these first initramfs builds put the whole of firstrib_rootfs into the initramfs which then gets completely loaded into RAM. Will boot very fast for small firstrib_rootfs but slow for a really big one.

As I said next version (being uploaded today) will include save persistence, but still only useful for local experimentation since no ethernet/wifi connectivity in there by default firstrib_rootfs build (of course, adding either or both ethernet/wifi connectivity is a matter of adding the relevant network packages and configuring them in firstrib_rootfs prior to making the initramfs - not an easy job though - I'll work on that next, but will depend on firmware etc).

From what you say, rockedge, build_firstrib_initramfs00.sh works fine for default "smallish" firstrib_rootfs but didn't work for your larger version? Please confirm - I'm guessing you have bash in larger version and not liking cttyhack used in basic one, but I'll haven't looked into that as yet.

Later initramfs version will use a separate (small) root filesystem during that boot into RAM phase and then boot the real (big) firstrib_rootfs via a switch_root mechanism (i.e. more conventional and fast since big rootfs not loaded into RAM, just mounted as read-only part of overlay system). I'll sort out any cttyhack issues for that stage (if not before...).

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1125
Location: Connecticut, United States

PostPosted: Mon 17 Jun 2019, 18:57    Post subject:  

hello wiak,

yes the FirstRib built straight from the second script worked quickly produced a 28 meg initramfs.gz and booted up really fast. it worked in it's limited form really well.

the other version I built FirstRib-big using the same procedure as above but then added all the goodies with base-system, rox, jwm ,geany,firefox. With this firstrib_rootfs ran the script and built the initramfs.gz which weighs in at 651 megs. I was excited that it began to boot...took more than a few minutes but hung right at the "booting kernel" message.


so I tried a simpler version which produced a 213 meg initramfs.gz....it contained Xorg server and rox xterm base-minimal...it also booted successfully but errors prevented anything other than the basics from working.

all the above work great using the host X or Xnest and the mount and unmount scripts
Back to top
View user's profile Send private message Visit poster's website 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Tue 18 Jun 2019, 05:04    Post subject:  

rockedge wrote:

so I tried a simpler version which produced a 213 meg initramfs.gz....it contained Xorg server and rox xterm base-minimal...it also booted successfully but errors prevented anything other than the basics from working.


Hi rockedge,

Based on your results, I'm doing a bit further research/experimentation prior to releasing second initramfs build script (whose main purpose is to include and allow testing of save persistence using overlayfs, which works, but the other issues you have had would still be there).

Such tests are quite arduous/take-a-while since I have to keep rebuilding initramfs etc (and my laptop has a physical fault, nothing to do with FirstRib, which makes it take an extra minute or two before it even starts to boot - I really should use a different machine, but I'm used to this one...)

I'll also start working on ethernet connectivity for it (and maybe even wireless since I never use ethernet nowadays - but of course wireless functionality inevitably involves firmware needs).

It is certainly interesting, from my point of view at least, to work on a system from near scratch build level, since so much fundamental system-level Linux involved (greatly helped by Void Linux templates of course).

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Tue 18 Jun 2019, 06:05    Post subject:  

Hello again rockedge,

I can confirm that boot failed when base-system was also installed into firstrib_rootfs prior to building the initramfs.

I had earlier tried simply installing bash with ncurses-base, and the resultant small firstrib_rootfs booted fine still.

I'm wondering if it's a memory issue only since with this initramfs method holding the full firstrib_rootfs, with base-system installed firstrib_rootfs nears 800MB in size.

How much RAM does your machine have. Mine is 2GB, which I would have thought was sufficient but I haven't really thought about how RAM gets allocated during boot.

Alternatively, something in base-system may be upsetting matters (though I can't imagine what). I will simply try randomly removing some of base-system bit by bit, rebuilding initramfs and rebooting until maybe successful boot. Long process testing that though... but I'll watch a movie whilst doing it... Hmmm, unfortunately, not so easy to xbps-remove here since void says won't remove since part of base-system! Maybe there is a way - otherwise I'll have to do it other way round - gradually adding the packages that make up base-system per:

https://github.com/void-linux/void-packages/blob/master/srcpkgs/base-system/template

If it's only a memory issue then nothing to worry about since later initramfs method will involve a switch_root from small firstrib_rootfs to mounted large one (which will not swamp RAM at all).

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Tue 18 Jun 2019, 08:18    Post subject:  

Just thought (on way to sleep now though), if a memory issue, which I suspect it is, just giving it sufficient swap space (file or partition) at boot time should fix it. I'll try that tomorrow. Certainly this particular initramfs with all firstrib_rootfs inside it is for small rootfs only (or lots of RAM on system). You could reduce the firstrib_rootfs size a little by deleting /var/cache/xbps which stores a copy of all the packages installed (or keep these on other disc since useful to set up own repository without needing to redownload from Internet all the time...)

In recent test I tried with base-voidstrap, which is one third the size of base-system, and that booted fine.

Packages in base-voidstrap documented here:

https://github.com/void-linux/void-packages/blob/master/srcpkgs/base-voidstrap/template

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1484
Location: not Bulgaria

PostPosted: Tue 18 Jun 2019, 08:34    Post subject:  

@rockedge:

EDIT: For download of latest build_firstrib_initramfs01 versions for 32 and 64 bit systems, along with appropriate required overlayfs_module_bionicpupXX.tar.gz and related bionicpup vmlinuz kernels, now go to third post down, here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1030322#1030322

In case you want to try this (but with default small firstrib_rootfs only for now, here is the save/persistence build initramfs script. Sorry only for x86_64 just now since it uses overlay_module-x86_64.tar.gz (which provides BionicPup64 module overlay.ko), which I've also attached. Put both together in same directory as pre-built firstrib_rootfs, then run ./build_firstrib_initram01.sh <partition>

where <partition> is sda1, sda2, sda3,... sdb1... i.e. the boot partition where your menu.lst finds vmlinuz and initramfs.gz (in firstrib directory there).

That will build the initramfs.gz (with overlayfs layers activated for save persistence to /mnt/<partition>/firstrib/upper_changes) and tells you when it is finished. I do need to add some more module info to the overlay_module-x86_64.tar.gz (which is a true tar.gz by the way; do not remove its tar.gz extension). However, it should work with default build_firstrib_rootfs-x86_64.sh build of firstrib_rootfs. I've currently made a stack of 3 layers, the middle being for an optional firstrib_extras.sfs if one is created (i.e. an extra sfs load at boot capability).

I will finalize that and also make 32bit version with plan to upload tomorrow now. You can at least see how the overlay layers work by looking at the init generated. Method is same as I described for both overlay and aufs with chroot to the merged result, a few months ago, here:

http://murga-linux.com/puppy/viewtopic.php?p=1025462#1025462

That was to show that layers could be used on an already running system by chroot into the merged layer result; I used the example of a full Void Linux install being made read-only and changes kept in another layer.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Tue 18 Jun 2019, 21:03; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [44 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0882s ][ Queries: 12 (0.0177s) ][ GZIP on ]