2009年6月21日日曜日

Unleashed その7

作成したISOはpuppy-unleashedフォルダの中に出来ます。作成されたISOのサイズは57MBでした。puppy-unleashedフォルダのサイズは作業前139MB、作業後617MBでした。puppy-unleashedフォルダの中には新しくフォルダなどが出来ています。

何度かやりましたが、やはりPuppyをLive-CDから起動させて操作する必要はありませんでした。当り前と言えば当り前。



完成したISOをマウントしてみた


完成したISOをLive-CDにし起動してみたところ


mtpaintを入れて画面をキャプチャー出来る様にしているが、それ以外はBrowserpuppy4.7と同等のpupletが出来たはず。全て英文仕様なので日本語化が必要。最初の0rootfs_skeletonである程度日本語化しておけば良いかもしれない。動作はLive-CDの起動から終了までPuppy4.1.2と全く同じです。他の部分が問題なくきちんと動くかどうかはわからない。

Unleashed その6

Step5
packagesにファイルを入れ終わったらexpandtarballs.shスクリプトを実行しPETパッケージを展開させます。今回は先日試したBrowserPuppy4.7と同じ追加パッケージをいれました。(252個追加した)

#sync
#cd /mnt/sdd1/puppy-unleashed ------自分の環境に合わせてください。
#./expandtaballs.sh

Finishedが出るまで気長に待ちましょう。

Step6
pupletを作成する準備が整いました。createpuppyスクリプトを実行します。さすがに日本語チームの方々もここまでは日本語にしてくれていません。英文表示なので解かりにくいですが全てenterで問題なくISOの作成まで出来ます。試してみます。

# ./createpuppy

WARNING: Current Linux system must be running same kernel as used in Puppy.

This script will create a complete Puppy filesystem, in rootfs-complete
directory. This may be about 200M. A temporary copy of this is made,
needing another 200M, plus temp files, so you may need about 500M
free space in the partition that is running this script.
WARNING: Do NOT use a msdos or vfat partition!!!!!
Executing df command (available space shown in Kbytes):
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda5 7178940 1335432 5478836 20% /
shmfs 123316 0 123316 0% /dev/shm
fusesmb 7178940 1335432 5478836 20% /opt/fusesmb
/dev/sdd1 1897420 364464 1436568 20% /mnt/sdd1

...if the current partition is inadequate, type CTRL-C to
abort this script, otherwise just press ENTER key to continue:enter

Wait...

Barebones is defined in pkgs-barebones.txt, edit before running createpuppy.
If choose barebones, the orig packages.txt is saved as /tmp/ORIG-packages.txt
and restored to packages.txt at end of this script (so do not abort script).
Do you want a 'standard' puppy, or 'barebones' (ENTER for standard): enter
Creating /tmp/allpkgs.txt, a list of all packages in packages directory.
Correlating packages.txt and allpkgs.txt, creating /tmp/packagesfnd.txt.
Any packages in packages.txt not in allpkgs.txt are marked unavailable.
Starting package selection GUI. Must exit GUI before this script will continue.
/tmp/rettags.txt has all the tags (package names) chosen to be in Puppy.
Note, /tmp/notchosenpkgs.txt has a list of the not-chosen packages.
ここでGUIが起動しパッケージの選択が出来ます。少し時間がかかります。
Ok, now checking broad dependency groups...
Note that these groups are fairly coarse and you may want to override.
For example, printer and scanner support are both in MMCORE group, but
you may want one not the other. So, do not be too bothered about breaking
up a CORE group, as this script does a comprehensive dependency check
further down.
...done.

These kernels are available:
2.6.21.7
2.6.25.16
Please type in which one of these kernels you want to use.
Note, puppy is currently running 2.6.25.16, and if you choose a
different kernel the build will be slightly deficient -- you need
to boot from it and then run createpuppy again so that the default
kernel is the one you want -- this second live-cd will be ok.
If you just press ENTER key, the default is 2.6.25.16:enter
...okay, using 2.6.25.16

Kernel version 2.6.25.16 has these actual types to choose from:
vmlinuz
vmlinuz-RDLZMA
Please type in which one of these kernels you want to use.
If in doubt, just press ENTER key only.
If you just press ENTER key, the default is vmlinuz:enter
...okay, using vmlinuz

Now building rootfs-complete, a directory with the complete Puppy filesystem...
Updating packages.txt from /tmp/packagesfnd.txt, renamed old packages.txt.
ここで5分ぐらい時間がかかります。
Generating vertical Puppy menu logo for Fvwm in
rootfs-complete/usr/local/lib/X11/pixmaps/fvwm-menu.xpm..
cat: ./splash-images/blank130x24.ppm: そのようなファイルやディレクトリはありません
./createpuppy: line 540: ./splash-images/ppmlabel: そのようなファイルやディレク トリはありません
pnmrotate: Error reading magic number from Netpbm image stream. Most often, this means your input file is empty.
ppmtoxpm: Error reading magic number from Netpbm image stream. Most often, this means your input file is empty.

GOOD, the complete root filesystem is now built, in rootfs-complete.

This script can now optionally do a thorough dependency check.
This is currently experimental so not the default. It also
takes awhile to complete.
Press "c" key then ENTER to do thorough check,
else just press ENTER key to bypass check:enter

...done.

Each package can have file pinstall.sh, which is a post-install script, however
these have not yet been executed. Instead, they are appended to create one big
pinstall.sh script, which will now be executed.
This script can do stuff like configure a particular web browser as the default,
specify a taskbar icon for an application, or create a menu entry.

Press ENTER key to continue:enter

Executing pinstall.sh...
Configuring Puppy skeleton...
Configuring Puppy Help page...
Writing version number to Help page...
Writing the date to Help page...
Configuring gtkmoz as the default html viewer...
Configuring ROX Filer...
END OF pinstall.sh SCRIPT.
If you did not get 'End of pinstall.sh' message above, then
it aborted before completion. Press ENTER or CTRL-C:enter

Copying packages.txt to rootfs-complete/root/.packages/ ...

Constructing configuration files for JWM, Fvwm95, IceWM...
Generating /root/.icewm/menu...
Generating /root/.jwmrc...
...done. Press ENTER to continue:enter

One thing that the post-install script is supposed to do is decide what is
the main web browser, and write that to /tmp/rightbrwsr.txt
We need that info, as the live-CD iso filename has the browser name in it.
cat: /tmp/rightbrwsr.txt: そのようなファイルやディレクトリはありません
...ok, it is .
Sanity check for ROX desktop icons...
Press ENTER to build files that will be in the iso:enter

Copying kernels/2.6.25.16/vmlinuz to isolinux-builds/vmlinuz...
Creating modules-complete/...
少し時間がかかります。
Removing some exotic modules unlikely to be needed...
...ok, some removed.
Do you want to remove all the old true-SCSI drivers? True-SCSI drives are
quite rare. Just press ENTER to remove, any other printable char to keep:enter
Removing true-SCSI drivers from modules-complete/lib/modules/2.6.25.16/kernel/drivers/scsi...

Would you like the complete set of kernel modules to be in the initrd?
Or, would you prefer them to be a separate file, named zdrv_412.sfs?
Press ENTER key only for the zdrv file,
(note, ENTER key only will also offer further choice to put the
modules in the pup_412.sfs rather than create a zdrv file)
or any printable char then ENTER only for all modules to be in the initrd:enter

Moving some modules to initrd (req'd for drive recognition):
aufs.ko cdrom.ko fuse.ko ide-cd.ko ide-floppy.ko nls_cp437.ko nls_iso8859-1.ko sqlzma.ko squashfs.ko sr_mod.ko unionfs.ko unlzma.ko aes.ko aes_generic.ko blkcipher.ko crypto_blkcipher.ko cbc.ko cryptoloop.ko rsrc_nonstatic.ko yenta_socket.ko ehci-hcd.ko ohci-hcd.ko uhci-hcd.ko usb-storage.ko usbcore.ko usbhid.ko scsi_wait_scan.ko ssb.ko

If you want the modules to be in pup_412.sfs, and zdrv_412.sfs
not created at all, then type key only.
Type any printable char then ENTER for default zdrv:enter


Press ENTER key only to place all modules into pup_412.sfs.
Press any printable char then ENTER to place a usable subset of
modules (about 10MB compressed) into pup_412.sfs.
Waiting:enter
Copying all modules from modules-complete to rootfs-complete...
少し時間がかかります。
The file rootfs-complete/etc/networkmodules is a list of network
drivers that is read by the Network Wizard (usr/sbin/net-setup.sh)
Press ENTER key to create this file:enter
Updating rootfs-complet/etc/networkmodules...
Adding prism54
Adding ipw2100
Adding libertas_cs
Adding usb8xxx
Adding wl3501_cs
Adding rndis_wlan
Adding rtl8187
Adding rtl8180
Adding b43
Adding ray_cs
Adding orinoco_plx
Adding bcm43xx
Adding wavelan_cs
Adding atmel_cs
Adding orinoco_nortel
Adding iwl3945
Adding iwl4965
Adding airo_cs
Adding b43legacy
Adding airo
Adding adm8211
Adding rt2500pci
Adding rt2500usb
Adding rt2400pci
Adding rt73usb
Adding rt61pci
Adding atmel_pci
Adding orinoco_pci
Adding spectrum_cs
Adding ipw2200
Adding hostap_plx
Adding hostap_cs
Adding hostap_pci
Adding orinoco_tmd
Adding orinoco_cs
Adding ath5k
Adding netwave_cs
Adding zd1201
Adding zd1211rw
Adding acenic
Adding tg3
Adding sunhme
Adding ipg
Adding ns83820
Adding sungem
Adding sundance
Adding forcedeth
Adding atl1e
Adding sis900
Adding dmfe
Adding uli526x
Adding xircom_cb
Adding tulip
Adding winbond-840
Adding de2104x
Adding amd8111e
Adding 8139cp
Adding pcnet_cs
Adding 3c589_cs
Adding fmvj18x_cs
Adding xirc2ps_cs
Adding axnet_cs
Adding nmclan_cs
Adding smc91c92_cs
Adding 3c574_cs
Adding b44
Adding rtl8150
Adding mcs7830
Adding pegasus
Adding asix
Adding dm9601
Adding rndis_host
Adding net1080
Adding cdc_ether
Adding cdc_subset
Adding kaweth
Adding catc
Adding gl620a
Adding zaurus
Adding plusb
Adding sis190
Adding e1000
Adding sky2
Adding hp100
Adding bnx2
Adding cassini
Adding typhoon
Adding skge
Adding pcnet32
Adding tlan
Adding r8101
Adding 8139too
Adding eepro100
Adding hamachi
Adding starfire
Adding sc92031
Adding irda-usb
Adding stir4200
Adding ksdazzle-sir
Adding vlsi_ir
Adding via-ircc
Adding ks959-sir
Adding mcs7780
Adding donauboe
Adding kingsun-sir
Adding qla3xxx
Adding fealnx
Adding yellowfin
Adding r8169
Adding igb
Adding e100
Adding via-velocity
Adding dl2k
Adding e1000e
Adding ne2k-pci
Adding r6040
Adding lmc
Adding via-rhine
Adding epic100
Adding natsemi
Adding atl1
Adding acx
modinfo: could not find module rt2400
modinfo: could not find module rt2500
modinfo: could not find module rt2570
modinfo: could not find module rt61
modinfo: could not find module rt73
Adding acx-mac80211
Adding atl2
Adding rt2860sta
Adding rt2870sta
Adding ath_pci
Adding prism2_usb
modinfo: could not find module prism2_pci
modinfo: could not find module prism2_plx
modinfo: could not find module r8180
Converting rootfs-complete/ folder to squashfs isolinux-builds/pup_412.sfs...
(using GZIP)
Parallel mksquashfs: Using 1 processor
Creating little endian 3.1 filesystem on isolinux-builds/pup_412.sfs, block size 131072.
[=======================================================================] 6861/6861 100%
Exportable Little endian filesystem, data block size 131072, compressed data, compressed metadata, compressed fragments, duplicates are removed
Filesystem size 55706.08 Kbytes (54.40 Mbytes)
35.13% of uncompressed filesystem size (158557.33 Kbytes)
Inode table size 88372 bytes (86.30 Kbytes)
32.97% of uncompressed inode table size (268057 bytes)
Directory table size 76719 bytes (74.92 Kbytes)
53.98% of uncompressed directory table size (142134 bytes)
Number of duplicate files found 789
Number of inodes 8557
Number of files 6267
Number of fragments 555
Number of symbolic links 665
Number of device nodes 427
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1198
Number of uids 10
root (0)
ftp (1000)
spot (502)
unknown (1003)
unknown (506)
unknown (500)
unknown (10102)
unknown (501)
unknown (1701)
unknown (106)
Number of gids 15
unknown (3)
unknown (5)
unknown (11)
unknown (6)
unknown (14)
users (500)
tty (2)
daemon (1)
ftp (1000)
unknown (232)
unknown (100)
unknown (212)
unknown (165)
root (0)
unknown (244)
mv: cannot stat `initrd.gz': そのようなファイルやディレクトリはありません

Would you like to create a 'humongous' initrd?
Normally you will reply no here (just press ENTER key only).
Some special uses of Puppy, such as network booting, may require
Puppy to be in just two files, vmlinuz (the kernel) and initrd.gz
(with pup_412.sfs and maybe zdrv_412.sfs inside it).
Such a large initrd.gz file requires a lot of physical RAM, usually
at least 256MB, so not suitable for older PCs.

Press ENTER key only for a normal initrd.gz (recommended), or
press any character then ENTER key for 'humongous' initrd.gz:enter

Creating boot/initrd.gz...
rm: cannot remove `initrd.gz': そのようなファイルやディレクトリはありません
3740 blocks
Copying boot/initrd.gz to isolinux-builds/...
Creating isolinux-builds/isolinux.cfg...

Now to build the iso file...
Note, if possible, choose to burn to dvd-r here, as it will create an iso
file that is best for booting from both cd & dvd, both normal & multisession.
(but, you MUST have a blank dvd-r ready, as iso created by burning to dvd first)
Press ENTER to create iso for booting from CD, any other for DVD:enter
Press ENTER to build ISO file:enter
I: -input-charset not specified, using utf-8 (detected in locale settings)
Size of boot image is 4 sectors -> No emulation
17.02% done, estimate finish Sun Jun 21 11:43:38 2009
33.97% done, estimate finish Sun Jun 21 11:43:40 2009
50.96% done, estimate finish Sun Jun 21 11:43:39 2009
67.91% done, estimate finish Sun Jun 21 11:43:39 2009
84.91% done, estimate finish Sun Jun 21 11:44:14 2009
Total translation table size: 2048
Total rockridge attributes bytes: 740
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
29462 extents written (57 MB)

...done.
puppy-4.1.2-.iso created. ISOが作成されたようです。

Can now burn to CD-R. (CTRL-C if you want to quit script)
Type "y" for multisession, else just ENTER: 続けてLive-CDを作るならenter、止めるならCTRL+C
#

これでISOの作成が終了しました。

Unleashed その5

Step4続きその3
次にgFTPなどを使ってPETパッケージをpuppy-unleashedのpackagesフォルダの中にダウンロードして来ます。必ずしもgFTPを使う必要はありません。1個ずつ手動でダウンロードしても問題ありません。今回ダウンロードするのはpackage-4にあるPETパッケージです。gFTPの使いかたについては解説サイトが沢山あるので、そちらを参照してください。スクリプトを作成し一括処理させるのも良いでしょう。ダウンロード先のドライブはマウントさせておきます。


ibiblio.orgへの最初の接続でpasswordなどを聞かれた場合は最初に右上にあるFTPのボタンを再設定すると良いでしょう。ダウンロードしたファイルを消去するにはファイル名を右クリックして行います。右矢印はサーバーにファイルをアップさせる時に使うものです。

話が前後しますが次のStepに行く前に/packagesにPETを追加したらunleashed-core-4.1.2のバグ?を修正しておかないと、せっかく作成したLive-CDが起動出来ません。以下の要領で修正します。

起動時エラーの状況

Pausing for 60 seconds .... Performing a 'switch root' to the layered file system ... Kernel panic - not syncing: Attempted to kill init!

対策法
1.unleashed-core-4.1.1から/boot/initrd-tree0/devを持って来てunleashed-core-4.1.2の物と入れ換える。
2.unleashed-core-4.1.1から/boot/depmodを持ってきてunleashed-core-4.1.2/bootに入れる。

参考本家フォーラム
4.1.2 Unleashed: custom Puppy won't boot from frugal install
http://www.murga-linux.com/puppy/viewtopic.php?search_id=1474678869&t=37270

Unleashed その4

Step4続きその2
追加するパッケージの中で0rootfs_skeleton-412.petはPuppyの基本骨格となるもので、この中にPuppyの基本的なファイルが入っています。従って必ず追加パッケージに必ず含めないとPuppyにはなりません。

0rootfs_skeleton-412のPETパッケージを分解して中身を見たところ、中にはPuppy独自のスクリプト、Font、アイコン等、沢山のファイルがすでに入っています。このskeletonに何が入っているかを見極めることが大事だと思います。skeletonの内容が解かっていれば追加する物も理解し易くなります。言葉では簡単ですがかなり面倒で知識を必要とします。


0rootfs_skeleton-412の/usr/binを開いたところ


0rootfs_skeleton-412の/etcとPuppy4.1.2.1JPの/etcを並べてみたところ


つづく