unetbootin, ファイルであるpuppy, nat,flashplayer

パピーを名犬にするための技、テクニック

モデレータ: 暇人, YoN, nyu

返信する
hatahata
記事: 212
登録日時: 14/06/11(水) 11:49

unetbootin, ファイルであるpuppy, nat,flashplayer

投稿記事 by hatahata »

お世話になってます。
昔のlibretto l2 のHDDに これまた昔のlennyだけが走ってます。

この環境にpuppyをいれました。
lennyに 
Oprecise-571JP.iso と
unetbootinとをダウンロードしたあと、 unetbootinを起動させ
ハードディスクで そしてその隣で /を選びます。

これでもできるですが、あとでunetbootinに仕事をまかせたので 
grubのメニューの改変をしなくては 収拾がつかなくなります。
面倒です。 

ーーー
そのため unetbootinの苦労を経て、 逆に
自分ですべてをコントロールできる、 「unetbootinを利用しないやりかた」 のやり方にたどり着きました。
4つ先です。
これで virrualboxみたいに mintの中のファイルなのですが、 このファイルでpuppyがうごいて
nat 箱になります。


# ls -l p571/
total 292236
-rw-r--r-- 1 root root 1886180 7月 16 06:42 initrd.gz
-rw-r--r-- 1 root root 553648128 7月 16 08:51 precisesave-0716HDD.4fs
-rw-r--r-- 1 root root 128868384 7月 16 06:42 puppy_precise_5.7.1JP.sfs
-rw-r--r-- 1 root root 2802256 7月 16 06:43 vmlinuz
見事ファイルです。バックアップも clonezilla せず容易。

こうして wifiしかなかった自分に有線環境ができます。
これでないと インストール時に wifiドライバをあててくれないことがおおいので OSが導入しにくい。
最後に編集したユーザー hatahata [ 14/07/22(火) 06:32 ], 累計 6 回
hatahata
記事: 212
登録日時: 14/06/11(水) 11:49

Re: unetbootinを使って debianのHDD上でpuppy

投稿記事 by hatahata »

次のURLに これにて libretto L2の上のpuppyの姿を示します。

http://blogs.c.yimg.jp/res/blog-35-8d/a ... 1405567551


$ cat xorg.conf | grep -v "^\s*$" | grep -v "^\s*#"
Section "Module"
Load "dbe" # Double buffer extension
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
EndSection
Section "Files"
#FontPath "/usr/share/fonts/X11/misc/"
#FontPath "/usr/share/fonts/liberation/"
FontPath "/usr/share/X11/fonts/misc/"
FontPath "/usr/share/X11/fonts/Type1/"
FontPath "/usr/share/X11/fonts/TTF/"
EndSection
Section "ServerFlags"
Option "RandR" "on"
Option "AutoAddDevices" "false"
Option "DontZap" "false"
EndSection
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "jp106" #xkbmodel0
Option "XkbLayout" "jp" #xkeymap0
#Option "XkbVariant" "" #xkbvariant0
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2" #mouse0protocol
Option "Device" "/dev/mouse"
#Option "Emulate3Buttons"
#Option "Emulate3Timeout" "50"
Option "ZAxisMapping" "4 5" #scrollwheel
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 35-81
VertRefresh 59-76
ModeLine "1280x600" 60.0 1280 1328 1512 1712 600 601 603 625
Option "UseBIOS" "false"
#UseModes "Modes0" #monitor0usemodes
Option "PreferredMode" "1600x1200" #monitor0prefmode
EndSection

Section "Modes"
Identifier "Modes0"
#modes0modeline0
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "Monitor0"
DefaultDepth 16
#Option "metamodes" "1280x800_60 +0+0" #METAMODES_0
Subsection "Display"
Depth 16
Modes "1280x600"
EndSubsection

EndSection


chmod 644 xorg.confで変わります
最後に編集したユーザー hatahata [ 15/09/20(日) 20:45 ], 累計 9 回
hatahata
記事: 212
登録日時: 14/06/11(水) 11:49

Re: unetbootinを使って debianのHDD上でpuppy

投稿記事 by hatahata »

unetbootin をつかったものについて簡単にふれると 結果的には

lenny linux にて

ls /
AUTORUN.INF fsckme.flg mnt splash.xpm
PIC grldr mnt-iso srv
PUPPY.ICO home opt sys
PUPPYJP.ICO initrd.gz proc tc
README.HTM initrd.img pupdesk.flg tmp
READMEJA.HTM k puppy usr
bin lib puppy-stock var
boot lupu_devx_528JP.sfs puppy_precise_5.7.1JP.sfs vmlinuz
boot.catalog media root
dev menu-advanced.lst sbin
etc menu.lst selinux


ls /puppy/
precisesave-lenny.4fs


古いlennyなので
cat /boot/grub/menu.lst| grep -v "^\s*$" | grep -v "^\s*#"
default 2
timeout 15
color cyan/blue white/blue

title Debian GNU/Linux, kernel 2.6.26-2-486
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-486 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.26-2-486

title Debian GNU/Linux, kernel 2.6.26-2-486 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-486 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.26-2-486

title Precise Puppy 5.7.1JP
root (hd0,0)
kernel /vmlinuz
initrd /initrd.gz
boot


title Puppy safe mode\nStart puppy with safety boot options(without X)\nTry 'xorgwizard' after bootup succeed to start graphic mode.
root (hd0,0)
kernel /vmlinuz pmedia=usbflash pfix=ram,nox nosmp noapic i915.modeset=0 radeon.modeset=0 nouveau.modeset=0
initrd /initrd.gz
boot

title Puppy on RAM only\nRun totally in RAM, ignore saved sessions(puppy pfix=ram)
root (hd0,0)
kernel /vmlinuz pmedia=usbflash pfix=ram
initrd /initrd.gz
boot
title Advance menu
root (hd0,0)
kernel /boot/ubnkern
initrd /boot/ubninit
boot

以上です。
pmedia=usbflash などに unetbootinの仕業が見えます
最後に編集したユーザー hatahata [ 14/07/17(木) 13:33 ], 累計 5 回
hatahata
記事: 212
登録日時: 14/06/11(水) 11:49

Re: unetbootinを使って debianのHDD上でpuppy

投稿記事 by hatahata »

debian wheezy  を母艦とした ーー別のPCーー の場合です。

debianは sda1
puppyたちは sda3 のフォルダの中のファイルにあります。

つまり
# mount
rootfs on / type rootfs (rw,relatime)
/dev/sda3 on /initrd/mnt/dev_save type vfat
以下略で

ls -l /initrd/mnt/dev_save
total 1108736
-rwxr-xr-x 1 root root 155258912 8月 6 16:23 devx_precise_5.7.1.sfs
-rwxr-xr-x 1 root root 5308505 8月 6 14:41 flashplayer10-10.3.183.90.pet
-rwxr-xr-x 1 root root 54 8月 6 10:08 fsckme.flg
-rwxr-xr-x 1 root root 57864192 8月 7 2014 jre-1.8.0.05.sfs
-rwxr-xr-x 1 root root 102383616 8月 6 16:18 kernel_src-3.2.48-patched.sfs

-rwxr-xr-x 1 root root 90 8月 6 09:45 lang-pack.txt
-rwxr-xr-x 1 root root 19718144 6月 8 19:01 lang_pack_ja-1.9.sfs

drwxr-xr-x 2 root root 8192 8月 6 17:34 precise5.7.1frugal
drwxr-xr-x 2 root root 8192 8月 6 17:36 precise5.7.1frugal-BACKUP

-rwxr-xr-x 1 root root 786432000 8月 6 14:03 pupswap.swp

drwxr-xr-x 2 root root 8192 8月 6 10:04 slacko
です。

grug.cfgは こんな感じです。

menuentry "Puppy JAPAN" {
set root='(hd0,3)'
linux /precise5.7.1frugal/vmlinuz
initrd /precise5.7.1frugal/initrd.gz
}

menuentry "Puppy USA-slacko" {
set root='(hd0,3)'
linux /slacko/vmlinuz
initrd /slacko/initrd.gz
}

なお lang_pack_ja-1.9.sfs のおかげで簡単にslackoを日本語化はできました。
しかしここには tftpd-hpaはなく 571の方がすごいと思いました。
最後に編集したユーザー hatahata [ 14/08/08(金) 15:47 ], 累計 7 回
hatahata
記事: 212
登録日時: 14/06/11(水) 11:49

Re: unetbootinを使って debianのHDD上でpuppy

投稿記事 by hatahata »

話は また代わり mint の場合です。
ここで unetbootinを利用しないやりかたです。


linux mintがHDDの全領域をつかってます。
しばらくは mintでの作業です。
mkdir /p57

そして precise-571JP.iso を mount -o loopして  ( mount -o loop precise-571JP.iso /mnt-P )
このなかの
initrd.gz
precisesave-0716HDD.4fs (これは後でできたもの)
puppy_precise_5.7.1JP.sfs
vmlinuz
の3つを置きます。

grug.cfgがこわれるとめんどうだから
cp grug.cfg grug.cfg-ok
とでもバックアップをとっておきます。
もしこわれても USBメモリにインストールした子犬で救済できます

そして 
/etc/grub.d/40_custom
を調節して update-grubして

cat /boot/grub/grub.cfg
の最後の方が

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Precise Puppy 5.7.1JP" {
linux /p571/vmlinuz
initrd /p571/initrd.gz
}
### END /etc/grub.d/40_custom ###

になるようにします。

以上で mintのgrubから puppyが立ち上がってきます。

これからは puppyでnat box をつくる作業です。
udhcpdをいれます。

internet
|
|
|
uroadaero
192.168.100.254
|
|
|
wlan0 dhcp client
mintの中のパピー
eth0 192.168.11.1 <=udhcpdをここで走らす。
|
|
|
PC達



cat /etc/default/udhcpd
# Comment the following line to enable
DHCPD_ENABLED="yes"
DHCPD_OPTS="-S"


cat /etc/udhcpd.conf
start 192.168.11.21 #default: 192.168.11.20
end 192.168.11.25 #default: 192.168.11.254
# The interface that udhcpd will use
interface eth0 #default: eth0
#Examles
opt dns 192.168.100.254
option subnet 255.255.255.0
opt router 192.168.11.1
option lease 864000 # 10 days of seconds


問題があって パピーを立ち上げる度に ネットワークの再設定がいりました。
これは面倒です。
そのために 
ls /etc/init.d/
00sys_logger frisbee(ここにあります) rc.umntshares slmodem usb-modeswitch
10alsa messagebus rc.windows start_cpu_freq
README.txt rc.acpi rc.yassm swapsetup
cups rc.pcmcia sfs_load udhcpd
なので frisbeeを用いて ネットワークを固定しました。


そして
eth0や wlan0にアドレスがあたるのに少し時間がかかるので 次のスクリプトで
natをします。


cat nat.bat
sleep 60 # この時間稼ぎです
/etc/init.d/udhcpd restart
sleep 10 # udhacpdが立ち上がる時間稼ぎ
#!/bin/sh
# IP フォワーディングを有効に
echo 1 > /proc/sys/net/ipv4/ip_forward

# 初期化
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING

# NAT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

# ftp 通信
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_conntrack_ftp

#確認
echo
echo
echo
echo "iptables-save---------------------------------"
iptables-save
echo
echo
echo
echo "iptables -L----------------------------------"
iptables -L
echo "--------------------------"
echo "--------------------------"
echo "--------------------------"
ifconfig -a
echo "--------------------------"
echo "--------------------------"
echo "--------------------------"
ps ax | grep dhcpd


です。

これで unetbootin をつかわずに mintのうちの中のファイルで
パピーが立ち上がってきて、 nat boxになりました。

なお operaで flash player を使うには
adobeから tar 玉をつれてきて 解凍し
/usr/lib/opera/plugins/のなかに libflashplayer.soをいれるだけでいいです。
これで さきに 囲碁kgsのところでのべた javaws と相まって 必要なほとんどのことが
puppyでできるようになりました。
(BSDで jdkをmake install したら 数時間かかりました。 しかも i386はダメでamd64だけでした。 )
これからも minitのなかで いろんな種類の子犬(実は単なるファイルなのですが)が飼えそうです。
返信する