A proposal for an Implementation of ISO-Scan

A home for all kinds of Puppy related projects
Post Reply
Message
Author
Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

A proposal for an Implementation of ISO-Scan

#1 Post by Scooby »

A proposal for an Implementation of ISO-Scan

Background:
I wanted to boot puppy directly from ISO using grub(grub2). I tired of the grub4dos way
since it requires the iso to be contiguous. First I thought it was OK when I saw that grub
supports the loopback feature. This takes you as far as loading initrd.gz but when control
is passed the ISO loop is freed. The puppy stalls and fails to load basesfs. But for
example Ubuntu LiveCD's has a boot-parameter "iso-scan/filename" and thus can be booted.
I then set out to implement a boot-parameter pisoscan for Puppy Linux

Solution:
I extracted the init-script from the initrd.gz contained in ISO for further reevaluation.
I changed it in six places(listed here in order of appearance). A total of 34 lines not counting
comments and blank lines.

1. search_func(14 lines, starting at row: 464)
2. Handling of in-parameter pisoscan(2 lines, starting at row: 575)
3. Loading of basesfs(8 lines, starting at row: 1434)
4. Evaluation of COPYCONTENDER and COPY2RAM(1 line, starting at row: 1472)
5. Loading of Zdrv(3 lines, starting at row: 1521)
6. Unmounting of after loading if sfs-files, $UMOUNTME(6 lines, starting at row: 1582)


Of course point 5 will be repeated if more layers are added for example Adrv.

the changed areas are marked with

#--------------------------------ISO-SCAN-START-------------------------------------------------------------------
...
#--------------------------------ISO_SCAN_END---------------------------------------------------------------------


I have not tried to speed up or change the code to much. My objective was to achive the goal
with as little intrusion on the init-script structure as possible.

The script was developed on AlphaOS10 but the example files below is from precise-5.7.1.iso.
Other puppy's tried was slacko-5.6-PAE.iso and lina-1.0.iso. I included Fatdog64-621.iso in
the test suite but it employs the "Humongous" intitrd and can already be booted with grub directly.
Furthermore Fatdog's init-script doesn't use the same structure as the others which leads
me to believe it is not woof-based.

I have tested on both ntfs and vfat filesystems. Internal HD and USB.
With and without savefile. And tried on a simulated RAM-challenged machine.
It seems to work.

The grub config I used was

Code: Select all

menuentry "ISO SCAN Precise" {
set root=(hd0,msdos1)
loopback loop /boot/grub/PreciseWithIsoScan.iso
linux (loop)/vmlinuz pisoscan=/boot/grub/PreciseWithIsoScan.iso 
initrd (loop)/initrd.gz
}
Obs! "set root=(hd0,msdos1)" is different depending on bootdevice. Can be found using grub-shell.

from grub manual:

(hdX,Y) is the partition Y on disk X, partition numbers starting at 1, disk numbers starting at 0
set root=(hdX,Y) sets the boot partition, where the kernel and GRUB modules are stored (boot need
not be a separate partition, and may simply be a directory under the "root" partition (/) )

Downloads:
init
Md5sum: 3f8804a84ef713b910797ecf596d4d71


PreciseWithIsoScan.iso
Md5sum: bc841d06ce097135c1dc1fd005072cdc

Questions:
a: I use existent mount point /mnt/data2. I cannot see it is used in init-script and I
believe it was reserved for future use. Am I right?

b: I use loop device loop10. Is there a reason this shouldn't be used?

c: Is the following unnescessary? Do you have to both umount and release loop device with losetup -d?

Code: Select all

	  losetup /dev/loop10 /mnt/data/$PISOSCAN
	  mount -r -t iso9660 -o noatime /dev/loop10 /mnt/data2 
	  
	  ...
	  
	  umount /mnt/data2
	  losetup -d /dev/loop10
	  

d: Is there any case I haven't thought of where iso-scan would interfere with normal puppy operation?


Conclusion:

I have never used woof and don't know exactly how it is structured. But I have seen user-posts with patches for it.
It should be possible to add this and I propose that this be made standard in woof.


Request for comments...
Last edited by Scooby on Fri 13 Sep 2013, 19:29, edited 1 time in total.

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

#2 Post by Ted Dog »

Good work, hope it gets spun into regular wolf.

Rangan Masti
Posts: 37
Joined: Tue 01 Jan 2013, 19:23
Location: Germany, Berlin

#3 Post by Rangan Masti »

This is a good idea!

simargl8

#4 Post by simargl8 »

Rangan Masti wrote:This is a good idea!
+1

But is there some Grub2 GUI configuration tool for Puppy Linux, if not this would be useful just
for people with other distributions that already have Grub2 installed.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#5 Post by watchdog »

simargl8 wrote: But is there some Grub2 GUI configuration tool for Puppy Linux, if not this would be useful just
for people with other distributions that already have Grub2 installed.
Rcrsn51 provided a pet of grub2 in isoboot thread:

http://www.murga-linux.com/puppy/viewtopic.php?t=67235

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#6 Post by Scooby »

simargl8 wrote: But is there some Grub2 GUI configuration tool for Puppy Linux, if not this would be useful just for people with other distributions that already have Grub2 installed.
There is installation of grub from commandline, not enough for you?

Do you mean on HD or USB-flashdrive,

For USB-flashdrive, a Gui would be easy to hack together.

Me myself now runs a hybrid of grub and grub4dos(easy2boot) on USB drive.
Boots to grub with option of loading grub4dos(easy2boot).

simargl8

#7 Post by simargl8 »

Scooby wrote:
simargl8 wrote: But is there some Grub2 GUI configuration tool for Puppy Linux, if not this would be useful just for people with other distributions that already have Grub2 installed.
Do you mean on HD or USB-flashdrive,
I mean one same GUI for all, something like grub4dos-config. That is one great program, easy
to use and in just 2 clicks it installs grub4dos on hard disk or usb sticks.

For me bootloader is just like any other program, means we should use only one for every type
of installation. But it must be easy to setup for everyone.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#8 Post by amigo »

The problem is that the best bootloader for an installation is not the same one as the best for booting from optical media, or booting from USB. And booting other architectures (ARM, etc) may require still some other bootloader.

Post Reply