Wiki source for InstallationFrugal


Show raw source

{{include tonguesInstallationFrugal}}
[[HomePage]] > [[ComponentHowTo Components and HowTos]] > [[InstallationIndex Install]]

====How to make a GNU/Linux frugal installation with copy-to-R.A.M. mode system operation====

Prior to installation, the container file that contains the operating system is commonly referred to as the //drive image// file.

A [[frugal]] installation is performed by __extracting the contents of the drive image file__ (with file extension //.img// or //.iso//) to normally __one__, i.e. the same, directory on a device.

Frugal installations, by default, run in //copy-to-R.A.M. mode//. Therefore, a frugal installation of [[https://wikka.puppylinux.com/HomePage Puppy]] GNU/Linux operating system has copy-to-R.A.M. mode available (determined by the bootloader configuration file ##syslinux.cfg## containing //pfix=copy//).

Copy-to-R.A.M. mode system operation refers to how the computer operating system is able to create a temporary environment whereby it __reads and writes to its complete file-system residing entirely within random access memory (R.A.M.)__.

Let the desired partition that one wants to install to be known as the target partition. That partition may be located on either of these following types of devices:
- an external device
- an internal device

Therefore, the target device is the device which contains the partition that one aims to install to, and that device could be either a flash memory card, an USB flash memory drive, a hard disk drive (H.D.D.) or a solid state drive (S.S.D.).

<<**WARNING**: If the target partition contains any important files **{{color text="make a minimum of two copies of important files, where each copy is located on a separate partition on a separate device" c="red"}}**, because they will be destroyed whenever the target partition is formatted.<<





<<**IMPORTANT**: **{{color text="determine the correct device name (sdX) of the target device" c="red"}}** to work on, via the command-line interface: **%%lsblk -al%%**<<





The following procedure assumes that one is running Puppy GNU/Linux. However, the same procedure can be followed within any GNU/Linux distribution. If one wishes to use Microsoft Windows go to [[http://puppylinux.org/wikka/InstallationFrugal#hn_Appendix Appendix]] below.

==Step 1 - PARTITIONING==
This step is optional, i.e. only proceed if one does not wish to keep the existing //partition structure// on the target device X.
~-**print/show existing partition structure** on the target device X: **%%/usr/sbin/parted /dev/sdX print%%**
- **un-mount** the target device X **%%umount /dev/sdX%%**
- **create a partition table (disklabel)** on the target device X {**##{{color text="WARNING" c="red"}}##**; access to all existing files on the target device will be lost}: **%%/usr/sbin/parted /dev/sdX mklabel gpt && /usr/sbin/parted -l%%**
- **create a partition (partitioning)** on the target device X (where //set 1// defines partition 1 of device X to be the boot partition; and in this example just one partition is created): **%%/usr/sbin/parted -a opt /dev/sdX mkpart primary ext4 8 100% set 1 boot on && /usr/sbin/parted /dev/sdX disk_set pmbr_boot on && /usr/sbin/parted /dev/sdX set 1 legacy_boot on print%%**

==Step 2 - FORMATTING==
This step is optional, i.e. only proceed if one does not wish to keep the existing //file-system structure// on the target device.
- **create a file-system (formatting)** on a partition Y of the target device X {**##{{color c="red" text="WARNING"}}##**: all existing data on the target partition will be over-written (destroyed)}:
~~-for **EXT4** file-system creation {makes use of //e2fsprogs// package}: **%%/sbin/mkfs.ext4 -b 4096 -m 0 -L LABEL -O extents,uninit_bg,dir_index,filetype,has_journal,sparse_super -E stride=4,stripe-width=256 /dev/sdXY%%**
~~-for **FAT32** file-system creation: **%%mkdosfs -v -n NAME -F 32 /dev/sdXY%%**
~~-for **FAT16** file-system creation: **%%mkdosfs -v -n NAME -F 16 /dev/sdXY%%**
~~-[[https://www.sdcard.org/downloads/sd-memory-card-formatter-for-linux/ SD Memory Card Formatter for Linux]]
CPU computers
==Step 3 - BOOT-LOADER INSTALLATION==
After formatting, a bootloader is required. Choose either A, B, or C.
~-A. [[https://github.com/limine-bootloader/limine/ Limine]]
//{placeholder}//
~-B. SYSLINUX
~~-install the **boot-loader ##[[https://www.kernel.org/pub/linux/utils/boot/syslinux/ SYSLINUX]]##** to one's actual operating system in use:
~~~-**[[https://www.smokey01.com/coolpup/ SYSLINUX]]**
~~~-installing this package merely makes available the ##SYSLINUX## files for one's use; it does not replace any of the existing boot-loader files which one's actual operating system makes use of for booting (starting-up) itself
~~~-initiating the following procedure to install the boot-loader to the target device requires one to perform it to __completion__; this ensures that no remnants of older ##SYSLINUX## versions remain on the target device
~~-install the **boot-loader [[https://www.syslinux.org/wiki/index.php/Library_modules c32 modules]]** __to the target device X__ at only one of these locations ///dev/sdXY/{boot/syslinux,syslinux}//: %%cp -af /usr/lib/syslinux/{libcom32,libutil,linux,menu}.c32 /dev/sdXY/boot/syslinux/%% %%cp -af /usr/lib/syslinux/{libcom32,libutil,linux,menu}.c32 /dev/sdXY/syslinux/%%
~~~-those four modules listed are the minimum required; if extra functionality is required, e.g. //chain.c32//, //vesamenu.c32//, as determined by the contents of //syslinux.cfg//, copy the extra, relevant files from ///usr/lib/syslinux//
~~-install the **boot-loader boot sector code** __to the target device X__: %%/bin/dd bs=440 conv=notrunc,fdatasync count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdX%%
~~-install the **boot-loader configuration file //syslinux.cfg//** __to the target device X__ by copying it to either ///boot/syslinux// or ///syslinux//
~~~-[[https://www.smokey01.com/coolpup/syslinux.cfg.sample sample]] file for flash memory drives with: //[[https://bkhome.org/blog/?viewDetailed=01813 pmedia]]=usbflash//, //elevator=noop//
~~~-this file will need editing if more than one Puppy version has been installed
~~~-the //[[https://bkhome.org/blog/?viewDetailed=01813 pkeys]]// parameter will need to be configured for the required keyboard layout, e.g. //pkeys=us//, //pkeys=uk//, //pkeys=fr//, //pkeys=de//, etc.
~~-install the **boot-loader system file //ldlinux.sys//** __to the target device X__, using the installers ##extlinux## or ##syslinux##:
~~~-for EXT4 file-systems, ensuring that it is mounted first: %%/bin/mount /dev/sdXY /mnt/sdXY && /bin/mkdir -p /mnt/sdXY/boot && /sbin/extlinux -i -s /mnt/sdXY/boot && sync%%
~~~-for FAT file-systems: %%/bin/mkdir -p /mnt/sdXY/boot && /usr/bin/syslinux --directory /boot -i -s /dev/sdXY && sync%%
~~~-removing //ldlinux.sys// without formatting
~~~~-the //ldlinux.sys// file has the immutable attribute set, which prevents it from being deleted or overwritten; this is because the sector location of the file must not change or else ##syslinux## has to be re-installed; to remove it, run: %%chattr -i /boot/syslinux/ldlinux.sys && rm -f /boot/syslinux/ldlinux.sys%%
~-C. GRUB4DOS (for BIOS-firmware only)
//{placeholder}//

==Step 4 - SYSTEM INSTALLATION==
- mount the target device
- mount the drive image (//.iso// or //.zip//) file
- copy from the drive image directory to the target device either all the files, (or just these essential ones: //vmlinuz//, //initrd.gz//, and all those with the extension //.sfs//
- if more than one operating system is to be frugally installed ensure that each is compartmentalized within their own directory)
- follow the instructions at LiveDVD //Appendix 3//
- re-boot the computer with the device connected
---
----
===Appendix===

==Installation to any external device, from within Microsoft Windows==
- format the drive or partition with FAT32
~~-[[https://www.sdcard.org/downloads/formatter/ SD Memory Card Formatter for Windows]]
- download and extract the latest //##[[https://www.kernel.org/pub/linux/utils/boot/syslinux/ syslinux.zip]]##// file to the //C// drive, i.e. //C:\syslinux//
- go to directory //C:\syslinux\win32\// %%cd C:\syslinux\win32\%%
- with administrator privileges run the ##syslinux## command to make the target device bootable: (where X is the drive letter for the target drive or partition) %%syslinux.exe -m -a X:%%
~-open the Puppy ISO (or ZIP) file to view its contents, using e.g. 7-zip (it is important that the original file names be kept) and copy to the target device the files: **//vmlinuz//**, **//initrd.gz//**, and all those with the extension **//.sfs//**
~-create a directory //syslinux// on the target device which __contains__ the following files:
~~-a boot-loader configuration file {sample **[[https://www.smokey01.com/coolpup/syslinux.cfg.sample syslinux.cfg]]** (for flash memory drives only; read //Step 3// above)}
~~-the required boot-loader **c32 modules** copied from //C:\syslinux// (read //Step 3// above)
~-follow the instructions at LiveDVD //Appendix 3//
~-re-boot (re-start) the computer with the flash memory device connected
~-if the operating system does not load (start), repeat the installation on a **FAT16** formatted partition

==Installation to any Microsoft Windows partition and using ""GRUBforDOS"" as boot-loader==
~-__Installing the boot-loader to the internal hard disk drive (where Microsoft Windows resides)__
~~-https://www.icpug.org.uk/national/linnwin/step1-xp.html
~~-https://puppy.b0x.me/lin-n-win
~-__Installing the boot-loader to an external drive__
~~-https://shino.pos.to/linux/lupq/puppydualboot.html

When making an installation to an internal H.D.D. with an existing operating system, one has the option to either allow that operating system to remain or be removed. Only remove the existing operating system if the computer is more than 3 years old since most computer manufacturers cease to provide [[https://murga-linux.com/puppy/viewtopic.php?p=483349#483349 new U.E.F.I./B.I.O.S. firmware versions]] after that time. If the intention is to remove the existing operating system, regardless of computer age, then ensure to check for and install any U.E.F.I./B.I.O.S. firmware updates first.

If the Puppy files are to be appended, by making a //frugal installation only// of Puppy, then this would involve one of the following:
- either making a //new partition// for Puppy (not recommended)
- or, using an //existing partition// for Puppy (recommended)

One can place a frugal installation within a pre-existing Windows installation. The save file, although itself is comprised of a Linux file-system, may reside on a F.A.T. or N.T.F.S. partition; which is why a frugal installation is also called a "co-exist" installation. A full hard disk drive installation on a F.A.T. partition is not possible because F.A.T. partitions do not support Linux symbolic links.

There is an option to install from within Microsoft Windows using the relevant file from here: https://www.mediafire.com/?5ah0d0rzcz5cc

==How to run Puppy Linux from a flash memory drive on any computer already running==
~[[QEMUpuppy]]

==Absent internal H.D.D.==
~-older Puppy versions will not boot from an external flash memory drive if the internal H.D.D. has been removed: %%Posted on 23 Apr 2011, 22:54 by perthie
USB Install Issue?
I notice that you still haven't commented on this issue. A machine
missing an internal hard drive can no longer be booted from a flash
drive. The new search procedure fails to find the sfs file on the flash
drive.
Posted on 24 Apr 2011, 8:20 by BarryK
Re no boot usb
I have written it down in my to-do list.%% http://bkhome.org/blog/?viewDetailed=02231

==Using GRUBforDOS boot-loader for all common file-systems==
- install the latest available version of helper program [[https://murga-linux.com/puppy/viewtopic.php?t=51697 Grub4DosConfig]]
- install the boot code to the M.B.R. of the target device X: %%bootlace.com --time-out=0 /dev/sdX%%
- install the boot system file //[[https://www.smokey01.com/coolpup/grldr grldr]]// by placing it on the target device
- install the boot configuration file //menu.lst//, or update an existing one, by using [[https://shino.pos.to/linux/puppy/ Grub4DosConfig]]: //Menu > System > ""Grub4Dos""//
- follow the additional instructions in //Appendix 3// at LiveDVD

==Also on the Wiki==
~[[FrugalReferences]]
~[[Frugal]]
~UsingPuppy
~[[InstallationFullHDD]]
~[[BootLoaders]]
~[[KernelParameters]]

==Related Webpages==
https://easyos.org/install/easy-frugal-installation.html
https://easyos.org/install/limine-bootloader.html
[[https://www.murga-linux.com/puppy/viewtopic.php?t=57711 Frugalinstaller-1.5 GUI thread]]
[[https://www.murga-linux.com/puppy/viewtopic.php?t=62476 Enrich 'Frugal' instead of doing full install]]
[[https://www.youtube.com/watch?v=ilGBGLejvfM How To Do A USB Install Of Puppy Linux Slacko 5.3.2.4]]
---
----
==Categories==
CategoryInstallation
CategoryTutorial
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki