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 Mon 20 Oct 2014, 07:30
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
A proposal for an Implementation of ISO-Scan
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
Scooby

Joined: 03 Mar 2012
Posts: 319

PostPosted: Fri 13 Sep 2013, 13:44    Post subject:  A proposal for an Implementation of ISO-Scan  

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:
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:

     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, 15:29; edited 1 time in total
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2364
Location: Heart of Texas

PostPosted: Fri 13 Sep 2013, 14:58    Post subject:  

Good work, hope it gets spun into regular wolf.
Back to top
View user's profile Send private message 
Rangan Masti

Joined: 01 Jan 2013
Posts: 8

PostPosted: Sun 15 Sep 2013, 14:47    Post subject:  

This is a good idea!
Back to top
View user's profile Send private message 
simargl8

Joined: 06 Feb 2013
Posts: 65

PostPosted: Tue 17 Sep 2013, 17:28    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
watchdog

Joined: 28 Sep 2012
Posts: 606

PostPosted: Wed 18 Sep 2013, 01:03    Post subject:  

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
Back to top
View user's profile Send private message 
Scooby

Joined: 03 Mar 2012
Posts: 319

PostPosted: Wed 18 Sep 2013, 06:24    Post subject:  

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).
Back to top
View user's profile Send private message 
simargl8

Joined: 06 Feb 2013
Posts: 65

PostPosted: Wed 18 Sep 2013, 07:09    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2257

PostPosted: Wed 18 Sep 2013, 10:04    Post subject:  

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
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.0684s ][ Queries: 12 (0.0035s) ][ GZIP on ]