(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 28 Oct 2020, 19:54
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
HowTo boot with SCSI
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Tue 18 Aug 2009, 17:11    Post subject:  HowTo boot with SCSI  

this is a draft.

Sometimes you might need a puplet, that supports SCSI harddrives at startup. For example, if you want to boot it in a virtual machine on a Vmware ESXi server, that supports only special serverhardware.

Barry sometimes releases special versions of Puppy, that support it, but this is rare, and sometimes only alpha status.

The following instructions are more general.

I used Ultrapup, that already has a lot of SCSI modules in
/lib/modules/2.6.28.5/kernel/drivers/scsi/

So we just need to add them to the system, that boots Puppy (initrd.gz)

You can download such a modified ultrapup:
http://www.murga-linux.com/puppy/viewtopic.php?p=332670#332670

Here is a short instruction I sent someone via mail.
This might be helpfull, if yopu want to modify other puppys, and need help doing it.


you need a script called "editinit":

Code:
#!/bin/bash


gunzip initrd.gz

mkdir puppy-init
cd puppy-init
cat ../initrd | cpio -d -i

leafpad init

find . | cpio -o -H newc | gzip -9 > ../initrd.gz

cd ..
rm -rf puppy-init
rm -f initrd



You place it in a folder together with "initrd.gz" from the iso.
Then you type:
cd /to_that_folder
./editinit


This extracts it, and opens the file "init" in leafpad.
Do NOT close leafpad!
If you close it, the extracted files are zipped again.
Then I copied to the extracted folder the folder from my running Puppy:
/lib/modules/2.6.28.5/kernel/drivers/scsi/

Then I edited in the etrcted folder the file:
/lib/modules/2.6.28.5/modules.dep

I added there:

Code:
/lib/modules/2.6.28.5/kernel/drivers/usb/storage/usb-storage.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz:
/lib/modules/2.6.28.5/kernel/drivers/usb/host/uhci-hcd.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/usb/host/ehci-hcd.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/usb/host/ohci-hcd.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz /lib/modules/2.6.28.5/kernel/drivers/ssb/ssb.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/block/cryptoloop.ko.gz:
/lib/modules/2.6.28.5/kernel/drivers/ssb/ssb.ko.gz:
/lib/modules/2.6.28.5/kernel/drivers/hid/usbhid/usbhid.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/hid/usbhid/usbkbd.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/usb/core/usbcore.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/pcmcia/rsrc_nonstatic.ko.gz:
/lib/modules/2.6.28.5/kernel/drivers/pcmcia/yenta_socket.ko.gz: /lib/modules/2.6.28.5/kernel/drivers/pcmcia/rsrc_nonstatic.ko.gz
/lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_wait_scan.ko.gz:
/lib/modules/2.6.28.5/kernel/fs/squashfs/squashfs.ko.gz: /lib/modules/2.6.28.5/kernel/fs/squashfs/sqlzma.ko.gz /lib/modules/2.6.28.5/kernel/fs/squashfs/unlzma.ko.gz
/lib/modules/2.6.28.5/kernel/fs/squashfs/unlzma.ko.gz:
/lib/modules/2.6.28.5/kernel/fs/squashfs/sqlzma.ko.gz: /lib/modules/2.6.28.5/kernel/fs/squashfs/unlzma.ko.gz
/lib/modules/2.6.28.5/kernel/fs/fuse/fuse.ko.gz:
/lib/modules/2.6.28.5/kernel/fs/nls/nls_cp437.ko.gz:
/lib/modules/2.6.28.5/kernel/fs/nls/nls_iso8859-1.ko.gz:
/lib/modules/2.6.28.5/kernel/fs/nls/nls_cp850.ko.gz:
/lib/modules/2.6.28.5/kernel/fs/nls/nls_utf8.ko.gz:
/lib/modules/2.6.28.5/kernel/ubuntu/aufs/aufs.ko.gz:
/lib/modules/2.6.28.5/kernel/ubuntu/unionfs/unionfs.ko.gz:
/lib/modules/2.6.28.5/kernel/crypto/cbc.ko.gz:
/lib/modules/2.6.28.5/kernel/crypto/aes_generic.ko.gz:
/lib/modules/2.6.28.5/kernel/drivers/scsi/wd7000.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/ultrastor.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/u14-34f.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/tmscsim.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/t128.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/sym53c8xx_2/sym53c8xx.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/sym53c416.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/stex.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/st.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/sim710.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/53c700.ko /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/sg.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_sas.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_iscsi.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_fc.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_debug.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/raid_class.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/qlogicfas408.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/qlogicfas.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/qlogicfas408.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/qla4xxx/qla4xxx.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_iscsi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/qla2xxx/qla2xxx.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_fc.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/qla1280.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/ppa.ko: /lib/modules/2.6.28.5/kernel/drivers/parport/parport.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/pas16.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/osst.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/nsp32.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/mvsas.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/libsas/libsas.ko /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_sas.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/megaraid.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/megaraid/megaraid_sas.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/lpfc/lpfc.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_fc.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/libsas/libsas.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_sas.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/libiscsi.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_iscsi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/iscsi_tcp.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/libiscsi.ko /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_iscsi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/ips.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/ipr.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/initio.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/in2000.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/imm.ko: /lib/modules/2.6.28.5/kernel/drivers/parport/parport.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/hptiop.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/gdth.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/g_NCR5380_mmio.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/g_NCR5380.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/fdomain.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/eata.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/dtc.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/dpt_i2o.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/dmx3191d.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh_rdac.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh_hp_sw.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh_emc.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh_alua.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/device_handler/scsi_dh.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/dc395x.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/atp870u.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/arcmsr/arcmsr.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/aic94xx/aic94xx.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/libsas/libsas.ko /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_sas.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/aic7xxx_old.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/aic7xxx/aic7xxx.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/aic7xxx/aic79xx.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/aha1740.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/aha1542.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/aha152x.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/advansys.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/aacraid/aacraid.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/a100u2w.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/NCR53c406a.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/BusLogic.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/53c700.ko: /lib/modules/2.6.28.5/kernel/drivers/scsi/scsi_transport_spi.ko
/lib/modules/2.6.28.5/kernel/drivers/scsi/3w-xxxx.ko:
/lib/modules/2.6.28.5/kernel/drivers/scsi/3w-9xxx.ko:



So all new modules are added to the list, where the jkernel looks up what modules are available.


Then I edited the "init", that we have opened in leafpad already.
I add after:

Code:
modprobe sr_mod > /dev/null 2>&1 #v3.93 now built-in to 2.6.25.x kernel.


(line 214)

thiese new lines, to load all modules:


Code:
modprobe wd7000
modprobe ultrastor
modprobe u14-34f
modprobe tmscsim
modprobe t128
modprobe sym53c8xx
modprobe sym53c416
modprobe stex
modprobe st
modprobe sim710
modprobe sg
modprobe scsi_transport_spi
modprobe scsi_transport_sas
modprobe scsi_transport_iscsi
modprobe scsi_transport_fc
modprobe scsi_debug
modprobe raid_class
modprobe qlogicfas408
modprobe qlogicfas
modprobe qla4xxx
modprobe qla2xxx
modprobe qla1280
modprobe ppa
modprobe pas16
modprobe osst
modprobe nsp32
modprobe mvsas
modprobe megaraid
modprobe megaraid_sas
modprobe lpfc
modprobe libsas
modprobe libiscsi
modprobe iscsi_tcp
modprobe ips
modprobe ipr
modprobe initio
modprobe in2000
modprobe imm
modprobe hptiop
modprobe gdth
modprobe g_NCR5380_mmio
modprobe g_NCR5380
modprobe fdomain
modprobe eata
modprobe dtc
modprobe dpt_i2o
modprobe dmx3191d
modprobe scsi_dh_rdac
modprobe scsi_dh_hp_sw
modprobe scsi_dh_emc
modprobe scsi_dh_alua
modprobe scsi_dh
modprobe dc395x
modprobe atp870u
modprobe arcmsr
modprobe aic94xx
modprobe aic7xxx_old
modprobe aic7xxx
modprobe aic79xx
modprobe aha1740
modprobe aha1542
modprobe aha152x
modprobe advansys
modprobe aacraid
modprobe a100u2w
modprobe NCR53c406a
modprobe BusLogic
modprobe 53c700
modprobe 3w-xxxx
modprobe 3w-9xxx



Then I save and close leafpad, so the new initrd.gz is created.

Now I copy all files from the iso to a folder /wowspup-scsi/.
I replace the old initrd.gz there with the new one.
Then I create the new iso with this script "build-iso-scsi" (which is placed one folder up):

Code:
#!/bin/bash

rm wowspup-1.1b-scsi.iso

mkisofs -o wowspup-1.1b-scsi.iso -l -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table wowspup-scsi
md5sum wowspup-1.1b-scsi.iso >wowspup-1.1b-scsi.iso-md5.txt

sync



Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9400
Location: Perth, Western Australia

PostPosted: Tue 18 Aug 2009, 21:22    Post subject:  

For the PCI-bsed SCSI interfaces at least (which is most of them), you don't need to load all the modules. In the 'init' script just have this:

Code:
MODALIASES="`cat /sys/bus/pci/devices/*/modalias`" #important, save to variable before loop.
for ONEMODALIAS in $MODALIASES
do
  modprobe -v $ONEMODALIAS #-v means verbose.
  [ $? -eq 0 ] && echo -n "." > /dev/console
done


...that's how it's done in the Woof builds.

But, it does require that modprobe be setup properly, that is, depmod run when the initrd.gz created -- which some older puppies don't do.

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3425
Location: Oregon

PostPosted: Wed 19 Aug 2009, 00:18    Post subject:  

I just tried your instructions and created the editinit script file, saved it to a directory, and copied initrd.gz from my frugal install of Puppy 421 to the same directory.
I did no modifications to init in Leafpad.
I just exited it after a quick browse through it.
So with max compression used in both my original initrd.gz and the created one, I was wondering why, with no changes, the created initrd.gz file in my directory is smaller by 1k than the original I started with?
Makes me wonder what changed or got left out?

Try it with no editing of the init file in Leafpad and see if you get the same results.
Back to top
View user's profile Send private message 
cthisbear

Joined: 29 Jan 2006
Posts: 4499
Location: Sydney Australia

PostPosted: Wed 19 Aug 2009, 01:50    Post subject:  

So where is Sage when you want him?

Just ungrateful methinks.

Chris.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3425
Location: Oregon

PostPosted: Thu 20 Aug 2009, 00:19    Post subject:  

Barry,
Upon examining the scsi directory in Puppy 421 and the one in Puppy v3a, in the uncompressed initrd directory, I noticed that the scsi files are compressed. With MUs method, it looks like he is copying uncompressed files into the scsi directory in the initrd tree.
So can he use the compressed ones to save on size of the initrd.gz file?

Also, I have Puppy 421 and Puppy v3a scsi both frugal on my pc.
Do they both have the same kernel version?
If so, can I use MU's edit initrd script to copy the scsi directory from the Puppy v3a init to a temporary location, exit his utility, and restart it with my Puppy 421 initrd.gz file, insert the scsi directory with contents from my temp location, Add your code segment to the init file, and let it rebuild the initrd.gz file with the mods and have a scsi version of Puppy 421?
Also, does one do the depmod command after booting the newly created Puppy? If not, at what point in the Process.

I know, so many questions!
But that is how one learns.
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Thu 20 Aug 2009, 17:21    Post subject:  

8-bit,

I think the version number of the kernel in Puppy 3 and 4 is the same, but for Puppy 4, the kernel was recompiled with slightly different options.
So the modules might not work.

You could copy them to puppy 4, then try for example a
modprobe ultrastor

If you get an error about a symbol mismatch, it is incompatible.
If you get no error, and can see it with
lsmod
then it should be usable.


depmod -a
This is required to register modules to the kernel.
The command will write some lines to the file
/lib/modules/2.6.xx.xx/modules.dep

To avoid to run this command (what could take 2-3 seconds), I had added those lines by hand to the modules.dep in initrd.gz (via copy&paste from the larger one in the running system).


gzip:
yes, you can gzip the modules.
Of course, you also need to modify modules.dep then.
So change for example:
Code:
/lib/modules/2.6.28.5/kernel/drivers/scsi/sg.ko:

to:
Code:
/lib/modules/2.6.28.5/kernel/drivers/scsi/sg.ko.gz:


Initrd.gz will not get smaller, as it is compressed with gzip already.
But it could save 1-2 MB of memory (Ram).

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3425
Location: Oregon

PostPosted: Thu 20 Aug 2009, 23:03    Post subject:  

Sorry if my post was confusing.
I was using Puppy 4.3 Alpha as a source to try modifying the initrd.gz in Puppy 421.

They both seem to have the same Kernel version although the kernel in Puppy 4.3 Alpha was compiled by Barry as a scsi kernel.
I do not need to boot from a scsi device, I was just trying to get my scsi devices recognized as such after compiling and installing a module for my scsi card.
When I mount the scsi zip drive, it shows up with a usb icon and is listed in Pmount under a USB tab.
As a matter of fact, both the scsi zip drive and the scsi scanner are listed as usb devices and both are listed under storage devices in the Hardinfo program.
I can use and access them both though.

And so far, although being able to boot with the modified initrd.gz in a different directory so as not to mess things up, I have not succeeded in my goals.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.1268s ][ Queries: 12 (0.0377s) ][ GZIP on ]