无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
楼主: 510819776
打印 上一主题 下一主题

[分享] 安卓版的tiny-pxe-server(pxe-http-nfs) iscsi-target发布了

    [复制链接]
31#
发表于 2014-10-15 17:41:29 | 只看该作者
510819776 发表于 2014-10-15 16:32
用弟弟的小米手机测试了一下  安卓4.2.2
才发现问题的所在
原来不是所有手机都把 SD卡设置为默认存储 ...

好像不管默认存储是什么都是最终指向sdcard目录的.,

另外我试了直接用命令行启动.nfs目录里面的pxe命令
./pxe --conf-file=/sdcard/Boot/pxe.conf --group=sdcard_r

刚开始会提示权限错误,后来我加了上面的--group=sdcard_r,正常了,可以在电脑上用tftp命令下载.

但也是启动不了..路由器有开dhcp,没有接触过proxyDhcp,不知它如何运作.

不知你用来启动pxe参数是什么?能不能贴一个例子?

用顶楼的软件测试发现没有启动pxe进程,估计是参数或者权限问题

点评

c大 这里的-g sdcard_r 有这个用户组么?? 不是sdcard_rw么??  发表于 2014-10-15 23:23
我的手机就是与众不同 我手机sd卡是 hfsx文件系统 用的fuse在系统启动初级阶段就挂载了 安卓 4.0 我看了一下我sd卡的文件 各种权限 各种用户 然后把我弟弟的红米note 4.4.2系统拿过来弄 发现果然是权限问题  详情 回复 发表于 2014-10-15 22:44
回复

使用道具 举报

32#
发表于 2014-10-15 17:44:49 | 只看该作者
关注中,我测试也没成功.貌似是连上了手机,手机ip也出来了,但找不到网启菜单.

点评

pxe -F 192.168.2.2,192.168.2.50 -p 0 --dhcp-no-override --enable-tftp --tftp-root=/mnt/sdcard/.pxe/tftp -M g4d.0 pxe -F 192.168.2.52,proxy -p 0 --dhcp-no-override --enable-tftp --tftp-root=/mnt/sdc  详情 回复 发表于 2014-10-15 23:26
你这个情况离成功不远了,,,,,,  发表于 2014-10-15 17:48
回复

使用道具 举报

33#
 楼主| 发表于 2014-10-15 22:44:42 | 只看该作者
本帖最后由 510819776 于 2014-10-15 23:21 编辑
chenall 发表于 2014-10-15 17:41
好像不管默认存储是什么都是最终指向sdcard目录的.,

另外我试了直接用命令行启动.nfs目录里面的pxe命 ...


我的手机就是与众不同
我手机sd卡是 hfsx文件系统  用的fuse在系统启动初级阶段就挂载了 安卓 4.0
我看了一下我sd卡的文件 各种权限 各种用户  
然后把我弟弟的红米note 4.4.2系统拿过来弄
发现果然是权限问题 导致pxe进程无法正常开启
似乎pxe加上-u root 后可以运行 但是tftp服务还是失败
我的手机 因为sd卡权限 用户都可以改 才没这个问题
那个 安卓4.4.2的红米 测试 就nfs可用  
http即使进程起来了 也无法访问 还是权限
pxe 也是提示tftp权限问题
这货遇到vfat文件系统就那么蛋疼
纠结了
另外默认存储
我用 易安卓的     
取存储卡路径() 函数 貌似在红米手机上 得到的是一个不存在的路径
不过虽然得到的路径是不存在 但是数据包居然被正确的解压了
后来我 就直接用
busybox echo $EXTERNAL_STORAGE  来获取默认存储路径 不管是不是sd了
貌似我的手机和红米 note 都有共同的/sdcard路径 是个软连接
pxe的进程启动还是需要正确的参数
我的两种方式参数分别是
假设手机wifi ip是 192.168.2.52
sd卡路径是/mnt/sdcard
两条命令最后执行的结果是
pxe -F 192.168.2.2,192.168.2.50 -p 0 --dhcp-no-override --enable-tftp --tftp-root=/mnt/sdcard/.pxe/tftp -M g4d.0
pxe -F 192.168.2.52,proxy -p 0 --dhcp-no-override --enable-tftp --tftp-root=/mnt/sdcard/.pxe/tftp --pxe-service=0,Made-by-guo4qing,ipxe
这两条命令 在我的手机上运作非常好
路由开启了dhcp 手机就是自动获取ip的
在我手机上 添加-u root后 pxe进程能启动 但是网络启动提示tftp有问题
依然是权限问题呀 郁闷
不过我自己手机已经完美可用了

这是我的手机执行ls /sdcard/ -l的情况
root@android:/data/data/com.teslacoilsw.quicksshd/home # ls /sdcard/ -l
drwxrwxrwx root     root              2014-08-06 19:45 8684
drwx------ app_75   app_75            2014-10-09 06:11 Android
drwx------ app_44   app_44            2014-10-13 01:47 Anmpp
drwx------ app_71   app_71            2014-10-15 05:37 AppProjects
drwxrwxrwx root     root              2014-04-14 16:12 BaiduMapSDK
drwxrwxrwx root     root              2014-08-11 02:10 DCIM
drwx------ app_88   app_88            2014-10-10 00:25 Download
-rwxrwxrwx root     root          120 2014-05-02 14:37 IMEI.bak
drwx------ app_52   app_52            2014-10-13 22:40 KingsoftOffice
-rwxrwxrwx root     root          120 2014-01-20 21:35 MP0B_001
drwx------ app_48   app_48            2014-10-10 00:21 MT
drwx------ app_44   app_44            2014-10-09 03:29 SpeedSoftware
drwx------ app_39   app_39            2014-10-12 21:52 Tencent
drwx------ app_133  app_133           2014-10-09 06:11 ThunderDownload
drwx------ app_62   app_62            2014-10-15 15:39 UCDownloads
drwxr-xr-x root     root              2014-10-13 02:32 anmpp
-rw-rw-rw- shell    shell      790506 2014-10-08 03:27 anmpp.apk
-rw-rw-rw- root     root     22754864 2014-10-13 02:37 anmpp.tar.bz2
-rw-rw-rw- root     root     23414820 2014-10-13 02:32 anmpp.zip
drwxrwxrwx root     root              2014-04-14 16:10 apktool
drwxrwxrwx root     root              2014-04-14 16:12 autonavidata60
drwx------ app_88   app_88            2014-10-10 00:25 backups
drwx------ app_75   app_75            2014-10-11 18:17 baidu
-rw-rw-rw- root     root      1686753 2014-10-13 22:32 bin.zip
drwx------ app_127  app_127           2014-10-05 17:22 center.com.eg.android.Ali                                                                             payGphone
drwx------ app_127  app_127           2014-10-05 17:22 com.eg.android.AlipayGpho                                                                             ne
-rw------- app_128  app_128      2566 2014-10-05 17:22 com.taobao.taobaohttpd
-rw------- app_128  app_128      2454 2014-10-15 22:22 com.taobao.taobaohttpdns
drwx------ app_52   app_52            2014-10-13 22:40 documents
-rw------- app_103  app_103        62 2014-10-09 21:01 exports
drwx------ app_87   app_87            2014-10-06 17:18 freedownfile
drwxrwxr-x shell    shell             2014-10-13 06:02 fsmount
drwxrwxrwx root     root              2014-10-15 14:37 install
drwxrwxrwx root     root              2014-04-14 16:14 mapbarnavi
drwxrwxrwx root     root              2014-04-17 22:12 msf
drwxrwxr-x root     root              2014-10-11 21:13 netboot
drwxrwxrwx root     root              2014-10-05 18:56 qvmov
drwxrwxrwx root     root              2014-10-05 18:55 readers
drwx------ app_50   app_50            2014-10-05 20:56 romtoolbox
drwx------ app_33   app_33            2014-10-06 03:01 sogou
drwxrwxrwx root     root              2014-10-06 01:21 sys-back
drwx------ app_128  app_128           2014-10-09 04:42 taobao
-rw------- app_110  app_110         0 2014-10-15 14:55 temp-498104037.tmp
-rw------- app_110  app_110         0 2014-10-15 14:54 temp340392331.tmp
drwx------ app_16   app_16            2014-10-07 14:42 tempdat
drwx------ app_119  app_119           2014-10-05 17:22 tencent
drwxrwxrwx shell    shell             2014-10-13 21:12 test
-rw-rw-rw- root     root      2266345 2014-10-16 06:21 调试版_tiny-pxe-server.apk
似乎权限很乱
不过就是这么乱  却是没问题
至于红米的sd路径权限
貌似 清一色的 rw-rw-  sdcard_rw
不过 那个nfs服务一点问题没有
http服务也有权限问题
权限怎么弄???
难道重新编译http 加入root运行特权??
那么dnsmasq也要重新编译一个root运行的??
还是修改配置和参数??
另外测试了一下 servers ultimate 最新版
结果是用里面的pxe 能启动grub4dos 但是卡载try blocksize 那儿 不过想必启动pxelinux.0 ipxe应该没问题
grub4dos应该对proxydhcp支持不怎么样了


pxe有两个参数
一个-u username  一个-g groupname
再看https的配置文件也有两个参数
User ***
Group ***
是控制http 用什么身份运行的
https 我启动他 没什么参数
就是https -f /mnt/sdcard/.pxe/http.conf
谁能告诉我  这些地方的user 和 group怎么处理呀???
我是刚好 给sd卡换了文件系统 导致这种情况没有发生
而vfat文件系统就难说了
坐等高手来解答


pxe的user 或者指定为root 或shell  而group指定为sdcard_rw
https的user只能是shell
          group sdcard_rw




                                                                          


点评

用BUKERPXE启动成功,也能启支grub4dos 0.4.5c, 但不知如何引导手机上的文件,希望举个例子,谢谢啦。  发表于 2014-10-28 16:21
回复

使用道具 举报

34#
 楼主| 发表于 2014-10-15 23:26:40 | 只看该作者
PE168 发表于 2014-10-15 17:44
关注中,我测试也没成功.貌似是连上了手机,手机ip也出来了,但找不到网启菜单.


pxe -F 192.168.2.2,192.168.2.50 -p 0 --dhcp-no-override --enable-tftp --tftp-root=/mnt/sdcard/.pxe/tftp -M g4d.0
pxe -F 192.168.2.52,proxy -p 0 --dhcp-no-override --enable-tftp --tftp-root=/mnt/sdcard/.pxe/tftp --pxe-service=0,Made-by-guo4qing,ipxe
这两条命令试一试
如果提示tftp权限不足
可以尝试加入  -u root/shell  -g sdcard_rw
回复

使用道具 举报

35#
发表于 2014-10-15 23:38:41 来自手机 | 只看该作者
曲线一下,在sdcard上建一个 Linux分区格式的img,然后挂载到mnt/nfs/下,这样nfs文件夹下文件的权限就都可以修改了。

点评

不行的 这里是要tftp和http的目录可读写 再说了挂载img干嘛?? 添加修改启动都麻烦 而且不是所有手机内核都支持img的挂载的 估计就是 user和group的问题 明天在用 红米note试试看吧  详情 回复 发表于 2014-10-15 23:58
回复

使用道具 举报

36#
 楼主| 发表于 2014-10-15 23:58:18 | 只看该作者
jxf268 发表于 2014-10-15 23:38
曲线一下,在sdcard上建一个 Linux分区格式的img,然后挂载到mnt/nfs/下,这样nfs文件夹下文件的权限就都可 ...

不行的
这里是要tftp和http的目录可读写
再说了挂载img干嘛??
添加修改启动都麻烦
而且不是所有手机内核都支持img的挂载的
估计就是 user和group的问题
明天在用 红米note试试看吧

点评

你现在不就是因为权限和用户组改不了吗? 我的意思是tftp和http的目录也放到那个img里去,挂载用busybox mount的命令,手机自带的mount挂不上,那个img里的分区是EXT3格式的,这样挂载后,权限用户组不就可以修改了  详情 回复 发表于 2014-10-16 00:53
回复

使用道具 举报

37#
发表于 2014-10-16 00:53:40 来自手机 | 只看该作者
510819776 发表于 2014-10-15 23:58
不行的
这里是要tftp和http的目录可读写
再说了挂载img干嘛??

你现在不就是因为权限和用户组改不了吗? 我的意思是tftp和http的目录也放到那个img里去,挂载用busybox mount的命令,手机自带的mount挂不上,那个img里的分区是EXT3格式的,这样挂载后,权限用户组不就可以修改了,然后写个脚本就可以启动相关服务测试了吧!要不然现在大家都要把sd卡格式化hfsx文件系统才能进行测试。



点评

不是改不了 可以改 但是我不知道改成什么 我的sd卡不是vfat文件系统 我发布的软件 都在我自己手机上测试过的 今天测试了红米note android 4.4.2才发现 权限问题的 因为sd格式化为hfsx文件系统 所以不存在权限  详情 回复 发表于 2014-10-16 01:21
回复

使用道具 举报

38#
 楼主| 发表于 2014-10-16 01:21:36 | 只看该作者
本帖最后由 510819776 于 2014-10-16 01:36 编辑
jxf268 发表于 2014-10-16 00:53
你现在不就是因为权限和用户组改不了吗? 我的意思是tftp和http的目录也放到那个img里去,挂载用busybox  ...


不是改不了 可以改
但是我不知道改成什么
portmap 和unfsd 无需更改 可以完美使用
而pxe启动的关键是dnsmasq
dnsmasq的参数有-u username -g groupname
dnsmasq的默认用户是nobody

同时http服务的配置文件 也提供了user 和group的选项
http似乎不能以user root身份运行 而group我不知道填写什么??sdcard_rw 还是别的??
我手机上http服务是user shell group root 工作良好

我的sd卡不是vfat文件系统
我发布的软件 都在我自己手机上测试过的
今天测试了红米note android 4.4.2才发现 权限问题的
因为sd格式化为hfsx文件系统 所以不存在权限问题

事实上我的手机有内置空间  是fat文件系统
不过我是在内核中 也就是init.rc的阶段就挂载了它
它上面的文件 ls -l 全部都是 root root
我想和mount sd的参数有关系
关键是我不知道 那些参数
为了一个pxe 弄出一个img挂载 那不现实
而且 现在的手机端pxe软件 有buker lite pxe 和servers ultimate 可以用
或者动手能力强的 直接用arm 版本的dnsmasq
然后自己用一个脚本执行软件 写好运行参数 以后直接运行 也很方便的
我的参数已经贴出来了 哈哈

回复

使用道具 举报

39#
发表于 2014-10-16 10:46:49 | 只看该作者
支持一个吧!
回复

使用道具 举报

40#
发表于 2014-10-16 14:16:05 | 只看该作者
自己用命令行启动成功了,谢谢楼主提供的资料........

有一点需要注意,要想启动成功,最好是保证启动时手机的屏幕是开着的...

点评

今天发布的版本 已经加入了 屏幕常亮了 而且可以自定义tftp和bootfile 还可以选择 proxydhcp 还是完整dhcp启动了 内置了你今天发布的g4d 不过感觉g4d在手机上真的没有优势 而ipxe 反而速度很快  详情 回复 发表于 2014-10-17 04:50
C大 用的哪条命令?? 我对那个apk再一次修改 这一次会判断 执行命令是否成功 会给出 进程是否开启的提示 而且我增加了一个输入框 可以为 内置的dnsmasq增加参数 默认的两种命令是 pxe -F $IP,proxy -p 0 --  详情 回复 发表于 2014-10-16 16:32
回复

使用道具 举报

41#
 楼主| 发表于 2014-10-16 16:32:20 | 只看该作者
chenall 发表于 2014-10-16 14:16
自己用命令行启动成功了,谢谢楼主提供的资料........

有一点需要注意,要想启动成功,最好是保证启动时手 ...

C大 用的哪条命令??
我对那个apk再一次修改
这一次会判断 执行命令是否成功
会给出 进程是否开启的提示
而且我增加了一个输入框  可以为 内置的dnsmasq增加参数
默认的两种命令是
pxe -F $IP,proxy -p 0 --dhcp-no-override --enable-tftp --tftp-root=$SDCARD/.pxe/tftp --pxe-service=0,Made-by-gruo4qing,ipxe
pxe -F $IP1,$IP2 -p 0 --dhcp-no-override --enable-tftp --tftp-root=$SDCARD/.pxe/tftp -M g4d.0
启动失败 可以尝试加入-u root -g root 或-u nobody -g nobody
或其他的参数 根据需要把
dnsmasq命令行的参数列表
Usage: dnsmasq [options]



Valid options are:

-a, --listen-address=<ipaddr>           Specify local address(es) to listen on.

-A, --address=/<domain>/<ipaddr>        Return ipaddr for all hosts in specified domains.

-b, --bogus-priv                        Fake reverse lookups for RFC1918 private address ranges.

-B, --bogus-nxdomain=<ipaddr>           Treat ipaddr as NXDOMAIN (defeats Verisign wildcard).

-c, --cache-size=<integer>              Specify the size of the cache in entries (defaults to 150).

-C, --conf-file=<path>                  Specify configuration file (defaults to /etc/dnsmasq.conf).

-d, --no-daemon                         Do NOT fork into the background: run in debug mode.

-D, --domain-needed                     Do NOT forward queries with no domain part.

-e, --selfmx                            Return self-pointing MX records for local hosts.

-E, --expand-hosts                      Expand simple names in /etc/hosts with domain-suffix.

-f, --filterwin2k                       Don't forward spurious DNS requests from Windows hosts.

-F, --dhcp-range=<ipaddr>,...           Enable DHCP in the range given with lease duration.

-g, --group=<groupname>                 Change to this group after startup (defaults to dip).

-G, --dhcp-host=<hostspec>              Set address or hostname for a specified machine.

    --dhcp-hostsfile=<path>             Read DHCP host specs from file.

    --dhcp-optsfile=<path>              Read DHCP option specs from file.

    --tag-if=tag-expression             Evaluate conditional tag expression.

-h, --no-hosts                          Do NOT load /etc/hosts file.

-H, --addn-hosts=<path>                 Specify a hosts file to be read in addition to /etc/hosts.

-i, --interface=<interface>             Specify interface(s) to listen on.

-I, --except-interface=<interface>      Specify interface(s) NOT to listen on.

-j, --dhcp-userclass=set:<tag>,<class>  Map DHCP user class to tag.

    --dhcp-circuitid=set:<tag>,<circuit>Map RFC3046 circuit-id to tag.

    --dhcp-remoteid=set:<tag>,<remote>  Map RFC3046 remote-id to tag.

    --dhcp-subscrid=set:<tag>,<remote>  Map RFC3993 subscriber-id to tag.

-J, --dhcp-ignore=tag:<tag>...          Don't do DHCP for hosts with tag set.

    --dhcp-broadcast[=tag:<tag>...]     Force broadcast replies for hosts with tag set.

-k, --keep-in-foreground                Do NOT fork into the background, do NOT run in debug mode.

-K, --dhcp-authoritative                Assume we are the only DHCP server on the local network.

-l, --dhcp-leasefile=<path>             Specify where to store DHCP leases (defaults to /data/misc/dhcp/dnsmasq.leases).

-L, --localmx                           Return MX records for local hosts.

-m, --mx-host=<host_name>,<target>,<prefSpecify an MX record.

-M, --dhcp-boot=<bootp opts>            Specify BOOTP options to DHCP server.

-n, --no-poll                           Do NOT poll /etc/resolv.conf file, reload only on SIGHUP.

-N, --no-negcache                       Do NOT cache failed search results.

-o, --strict-order                      Use nameservers strictly in the order given in /etc/resolv.conf.

-O, --dhcp-option=<optspec>             Specify options to be sent to DHCP clients.

    --dhcp-option-force=<optspec>       DHCP option sent even if the client does not request it.

-p, --port=<integer>                    Specify port to listen for DNS requests on (defaults to 53).

-P, --edns-packet-max=<integer>         Maximum supported UDP packet size for EDNS.0 (defaults to 4096).

-q, --log-queries                       Log DNS queries.

-Q, --query-port=<integer>              Force the originating port for upstream DNS queries.

-R, --no-resolv                         Do NOT read resolv.conf.

-r, --resolv-file=<path>                Specify path to resolv.conf (defaults to /etc/resolv.conf).

    --servers-file=<path>               Specify path to file with server= options

-S, --server=/<domain>/<ipaddr>         Specify address(es) of upstream servers with optional domains.

    --rev-server=<addr>/<prefix>,<ipaddrSpecify address of upstream servers for reverse address queries

    --local=/<domain>/                  Never forward queries to specified domains.

-s, --domain=<domain>[,<range>]         Specify the domain to be assigned in DHCP leases.

-t, --mx-target=<host_name>             Specify default target in an MX record.

-T, --local-ttl=<integer>               Specify time-to-live in seconds for replies from /etc/hosts.

    --neg-ttl=<integer>                 Specify time-to-live in seconds for negative caching.

    --max-ttl=<integer>                 Specify time-to-live in seconds for maximum TTL to send to clients.

-u, --user=<username>                   Change to this user after startup. (defaults to nobody).

-U, --dhcp-vendorclass=set:<tag>,<class>Map DHCP vendor class to tag.

-v, --version                           Display dnsmasq version and copyright information.

-V, --alias=<ipaddr>,<ipaddr>,<netmask> Translate IPv4 addresses from upstream servers.

-W, --srv-host=<name>,<target>,...      Specify a SRV record.

-w, --help                              Display this message. Use --help dhcp for known DHCP options.

-x, --pid-file=<path>                   Specify path of PID file (defaults to /data/dnsmasq.pid).

-X, --dhcp-lease-max=<integer>          Specify maximum number of DHCP leases (defaults to 1000).

-y, --localise-queries                  Answer DNS queries based on the interface a query was sent to.

-Y, --txt-record=<name>,<txt>[,<txt]    Specify TXT DNS record.

    --ptr-record=<name>,<target>        Specify PTR DNS record.

    --interface-name=<name>,<interface> Give DNS name to IPv4 address of interface.

-z, --bind-interfaces                   Bind only to interfaces in use.

-Z, --read-ethers                       Read DHCP static host information from /etc/ethers.

-1, --enable-dbus[=<busname>]           Enable the DBus interface for setting upstream servers, etc.

-2, --no-dhcp-interface=<interface>     Do not provide DHCP on this interface, only provide DNS.

-3, --bootp-dynamic[=tag:<tag>]...      Enable dynamic address allocation for bootp.

-4, --dhcp-mac=set:<tag>,<mac address>  Map MAC address (with wildcards) to option set.

    --bridge-interface=<iface>,<alias>..Treat DHCP requests on aliases as arriving from interface.

-5, --no-ping                           Disable ICMP echo address checking in the DHCP server.

-6, --dhcp-script=<path>                Shell script to run on DHCP lease creation and destruction.

    --dhcp-luascript=path               Lua script to run on DHCP lease creation and destruction.

    --dhcp-scriptuser=<username>        Run lease-change scripts as this user.

-7, --conf-dir=<path>                   Read configuration from all the files in this directory.

-8, --log-facility=<facilty>|<file>     Log to this syslog facility or file. (defaults to DAEMON)

-9, --leasefile-ro                      Do not use leasefile.

-0, --dns-forward-max=<integer>         Maximum number of concurrent DNS queries. (defaults to 150)

    --clear-on-reload                   Clear DNS cache when reloading /etc/resolv.conf.

    --dhcp-ignore-names[=tag:<tag>]...  Ignore hostnames provided by DHCP clients.

    --dhcp-no-override                  Do NOT reuse filename and server fields for extra DHCP options.

    --enable-tftp[=<intr>[,<intr>]]     Enable integrated read-only TFTP server.

    --tftp-root=<dir>[,<iface>]         Export files by TFTP only from the specified subtree.

    --tftp-unique-root                  Add client IP address to tftp-root.

    --tftp-secure                       Allow access only to files owned by the user running dnsmasq.

    --tftp-max=<integer>                Maximum number of conncurrent TFTP transfers (defaults to 50).

    --tftp-no-blocksize                 Disable the TFTP blocksize extension.

    --tftp-lowercase                    Convert TFTP filenames to lowercase

    --tftp-port-range=<start>,<end>     Ephemeral port range for use by TFTP transfers.

    --log-dhcp                          Extra logging for DHCP.

    --log-async[=<integer>]             Enable async. logging; optionally set queue length.

    --stop-dns-rebind                   Stop DNS rebinding. Filter private IP ranges when resolving.

    --rebind-localhost-ok               Allow rebinding of 127.0.0.0/8, for RBL servers.

    --rebind-domain-ok=/<domain>/       Inhibit DNS-rebind protection on this domain.

    --all-servers                       Always perform DNS queries to all servers.

    --dhcp-match=set:<tag>,<optspec>    Set tag if client includes matching option in request.

    --dhcp-alternate-port[=<ports>]     Use alternative ports for DHCP.

    --naptr-record=<name>,<naptr>       Specify NAPTR DNS record.

    --min-port=<port>                   Specify lowest port available for DNS query transmission.

    --dhcp-fqdn                         Use only fully qualified domain names for DHCP clients.

    --dhcp-generate-names[=tag:<tag>]   Generate hostnames based on MAC address for nameless clients.

    --dhcp-proxy[=<ipaddr>]...          Use these DHCP relays as full proxies.

    --dhcp-relay=<local-addr>,<server>[,Relay DHCP requests to a remote server

    --cname=<alias>,<target>            Specify alias name for LOCAL DNS name.

    --pxe-prompt=<prompt>,[<timeout>]   Prompt to send to PXE clients.

    --pxe-service=<service>             Boot service for PXE menu.

    --test                              Check configuration syntax.

    --add-mac                           Add requestor's MAC address to forwarded DNS queries.

    --add-subnet=<v4 pref>[,<v6 pref>]  Add requestor's IP subnet to forwarded DNS queries.

    --proxy-dnssec                      Proxy DNSSEC validation results from upstream nameservers.

    --dhcp-sequential-ip                Attempt to allocate sequential IP addresses to DHCP clients.

    --conntrack                         Copy connection-track mark from queries to upstream connections.

    --dhcp-client-update                Allow DHCP clients to do their own DDNS updates.

    --enable-ra                         Send router-advertisements for interfaces doing DHCPv6

    --dhcp-duid=<enterprise>,<duid>     Specify DUID_EN-type DHCPv6 server DUID

    --host-record=<name>,<address>      Specify host (A/AAAA and PTR) records

    --dns-rr=<name>,<RR-number>,[<data>]Specify arbitrary DNS resource record

    --bind-dynamic                      Bind to interfaces in use - check for new interfaces

    --auth-server=<NS>,<interface>      Export local names to global DNS

    --auth-zone=<domain>,[<subnet>...]  Domain to export to global DNS

    --auth-ttl=<integer>                Set TTL for authoritative replies

    --auth-soa=<serial>[,...]           Set authoritive zone information

    --auth-sec-servers=<NS>[,<NS>...]   Secondary authoritative nameservers for forward domains

    --auth-peer=<ipaddr>[,<ipaddr>...]  Peers which are allowed to do zone transfer

    --ipset=/<domain>/<ipset>[,<ipset>..Specify ipsets to which matching domains should be added

    --synth-domain=<domain>,<range>,[<prSpecify a domain and address range for synthesised names

    --dnssec                            Activate DNSSEC validation

    --trust-anchor=<domain>,[<class>],..Specify trust anchor key digest.

    --dnssec-debug                      Disable upstream checking for DNSSEC debugging.

    --dnssec-check-unsigned             Ensure answers without DNSSEC are in unsigned zones.

    --dnssec-no-timecheck               Don't check DNSSEC signature timestamps until first cache-reload

    --ra-param=<interface>,[high,|low,]<Set priority, resend-interval and router-lifetime

    --quiet-dhcp                        Do not log routine DHCP.

    --quiet-dhcp6                       Do not log routine DHCPv6.

    --quiet-ra                          Do not log RA.

    --local-service                     Accept queries only from directly-connected networks



按道理应该是没问题的??
安装前一定要删除 自己的手机存储或sd卡上的.pxe文件夹 还是我自己添加代码去判断??
今天用 一个联想的手机测试了 刷的是小米系统 android 2.3.6
用的是 128M的sd卡  手机自动格式化
然后用我的app 删除之前的sd上的.pxe文件夹
测试一切功能ok
http的配置文件也做了改动
另外 我用wifi信号弱的安卓测试
同样的命令  在启动g4d.0时候
手机必须离路由很近 因为g4d.0需要开启dhcp服务才能正常工作
而路由开启了dhcp
这样的结果就是 如果手机的响应没有路由快 就会启动失败
所以手机用g4d模式启动尽量离无线路由器近一些
至于屏幕是否亮着问题不大
只需要设置wifi的休眠策略为永不即可
或者我要在软件加入??
现在测试的 安卓2.3.6 和安卓4.0都ok
sd卡权限问题解决了
不知道 安卓4.4.2是什么情况了??
红米note 4G增强版 似乎权限很诡异
2.3的sd卡是system.sdcard_r
4.0的不知道
4.4.2的似乎是****.sdcard_rw

点评

看sdcard的权限,我的是中兴红牛的,4.4.2版本的,是sdcard_r,如果sdcard_r可以用的话,只需要用sdcard_r权限就行了,  发表于 2014-10-16 17:07
这种 编写arm的二进制elf程序的安卓gui程序 完全不需要什么java知识 主要就是 反复利用busybox和安卓内置的那些命令 另外还有谁会易安卓的 要不要把代码发上来 大家一起来改进 不得不说 这个armv7a的dnsmasq程  详情 回复 发表于 2014-10-16 16:46
回复

使用道具 举报

42#
 楼主| 发表于 2014-10-16 16:46:19 | 只看该作者
510819776 发表于 2014-10-16 16:32
C大 用的哪条命令??
我对那个apk再一次修改
这一次会判断 执行命令是否成功

这种 编写arm的二进制elf程序的安卓gui程序
完全不需要什么java知识
主要就是 反复利用busybox和安卓内置的那些命令
另外还有谁会易安卓的
要不要把代码发上来 大家一起来改进
不得不说 这个armv7a的dnsmasq程序很给力
只要参数正确  一般是问题不大的

另外grub4dos在dhcpproxy模式下 似乎有很大问题
经过研究发现buker pxe lite和servers ultimate的pxe服务都是采用的dhcpproxy的模式来网络启动的
相当于pxe -F $IP,proxy -p 0 --dhcp-no-override --enable-tftp --tftp-root=$SDCARD/.pxe/tftp --pxe-service=0,Made-by-gruo4qing,ipxe   这种方式 也就是说手机本身不提供dhcp 分配ip的服务
只是提供pxe和tftp服务
grub4dos就会死在这里
而pxelinux.0  ipxe都对这种方式完美支持  这种方式适合大部分的普通无线路由器 开启了dhcp
这里dnsmasq虽然可以提供dhcp服务 不过能不能和无线路由器抢到先机 从而启动成功 是个悬念
我自己的路由器wr720n 开启了dhcp服务
用我安卓4.0 和 安卓2.3都测试  dnsmasq 开启dhcp后启动grub4dos成功 出菜单也快
其他路由器 我没有 难说
不过如果非要用dhcp方式来pxe的话 手机还是离路由器近一些比较好

点评

grub4dos 的问题我正在修复, 可以试试以下测试版,,使用proxy应该没有问题了.至少我自己测试没有发现问题. http://bbs.wuyou.com/forum.php?mod=viewthread&tid=342545&extra=page%3D1  详情 回复 发表于 2014-10-16 17:04
回复

使用道具 举报

43#
发表于 2014-10-16 17:04:55 | 只看该作者
510819776 发表于 2014-10-16 16:46
这种 编写arm的二进制elf程序的安卓gui程序
完全不需要什么java知识
主要就是 反复利用busybox和安卓内 ...

grub4dos 的问题我正在修复,

可以试试以下测试版,,使用proxy应该没有问题了.至少我自己测试没有发现问题.

http://bbs.wuyou.net/forum.php?m ... &extra=page%3D1

点评

测试了grub4dos的proxy 用我自己的apk 已经没问题了 不过用servers ultimate 6.3.10 pxe服务测试不行 出不来菜单 至于bukerpxe lite就不说了 看了下apk文件 就是用了一个精简了tftp服务的dnsmasq 一个改名的bus  详情 回复 发表于 2014-10-17 04:46
如果grub4dos的proxy支持没有问题 那么servers ultimate或buker pxe lite 应该都是可以完美启动了吧?? 如果他们还是不行 估计就是自带的tftp服务某些地方支持不好了  详情 回复 发表于 2014-10-16 17:13
回复

使用道具 举报

44#
 楼主| 发表于 2014-10-16 17:13:12 | 只看该作者
chenall 发表于 2014-10-16 17:04
grub4dos 的问题我正在修复,

可以试试以下测试版,,使用proxy应该没有问题了.至少我自己测试没有发现问 ...

如果grub4dos的proxy支持没有问题
那么servers ultimate或buker pxe lite 应该都是可以完美启动了吧??
如果他们还是不行 估计就是自带的tftp服务某些地方支持不好了
回复

使用道具 举报

45#
发表于 2014-10-16 18:12:55 | 只看该作者
回复

使用道具 举报

46#
 楼主| 发表于 2014-10-17 04:46:23 | 只看该作者
chenall 发表于 2014-10-16 17:04
grub4dos 的问题我正在修复,

可以试试以下测试版,,使用proxy应该没有问题了.至少我自己测试没有发现问 ...

测试了grub4dos的proxy
用我自己的apk 已经没问题了
不过用servers ultimate 6.3.10 pxe服务测试不行 出不来菜单
至于bukerpxe lite就不说了 看了下apk文件
就是用了一个精简了tftp服务的dnsmasq 一个改名的busybox 一个tftpd 组成
而且感觉 这货应该对tftp做了限制
不过我的软件已经和他的界面相似了
刚刚用你今天发布的grub4dos 启动到了菜单
然后我手动输入 map --mem /pe.iso (hd32)
******
之后大约1M/s的加载速度
然后进入了win7pe的桌面
速度 没法和ipxe比呀
我内置的http服务 配合ipxe 启动sanboot http://192.168.2.162/pe.iso 速度可达到6M/s 启动100M pe 30秒进入桌面
iscsi 方式配合ipxe 似乎也差不多这个速度
不过iscsi 启动win7pe 滚动条那儿好久 不知道在干嘛
但是最终还是进入了win7pe桌面
启动ubuntu 14.04的livecd 也就差不多1分钟而已
可惜今天的版本grub4dos还是不能和servers ultimate做朋友 依然不见菜单 而进入了命令行
看来这个app只要好好的开发一下
不比tiny pxe server差
只要把bug都解决了 应该是 安卓上最好的pxe服务软件了

回复

使用道具 举报

47#
 楼主| 发表于 2014-10-17 04:50:11 | 只看该作者
chenall 发表于 2014-10-16 14:16
自己用命令行启动成功了,谢谢楼主提供的资料........

有一点需要注意,要想启动成功,最好是保证启动时手 ...

今天发布的版本 已经加入了 屏幕常亮了
而且可以自定义tftp和bootfile
还可以选择 proxydhcp 还是完整dhcp启动了
内置了你今天发布的g4d
不过感觉g4d在手机上真的没有优势
而ipxe 反而速度很快
回复

使用道具 举报

48#
发表于 2014-10-17 10:43:40 | 只看该作者
16日的测试版本IPXe http开启 成功一次 第二天程序丢了 也重装不上 后来装上也开启不了各服务

点评

成功开启过 说明没问题 把pxe文件夹删除 重新进程序 有.pxe文件夹也删了 试试17号的 我测试2.3 4.0安卓都无问题  详情 回复 发表于 2014-10-17 14:28
回复

使用道具 举报

49#
发表于 2014-10-17 12:02:27 来自手机 | 只看该作者
17日的版本  换小平板测  各服务开启巴正常  重启后服务切均无法开启

点评

重启后服务无法开启?? 这也太诡异了啊??? 不至于吧??? 奇怪的平板??? 就这样了 反正核心就是那个 dnsmasq程序 直接拷贝到/system/bin/下面 改名pxe 弄好权限 然后 找个支持脚本的终端执行器 执  详情 回复 发表于 2014-10-17 21:43
回复

使用道具 举报

50#
发表于 2014-10-17 13:59:41 | 只看该作者
14日的可以连通服务器并获得IP,17日的无法连接到服务器(1-1).

点评

也就是说pxe服务提示开启成功 但是真实环境pxe启动失败?? 你17号版本是否勾选了 使用代理??  发表于 2014-10-18 01:22
回复

使用道具 举报

51#
发表于 2014-10-17 14:14:04 | 只看该作者
能不能以buker pxe lite为基础进行改造?加入HTTP等服务,好像buker pxe lite的成功率要高一些,只是传输速度太慢.

点评

我把buker pxe lite的apk做了一下修改 替换了里面低版本的太监dnsmasq 换上了完整版dnsmasq 同时修改了程序的默认配置 我弄了一个g4d进去 修改后的的bukerpxe里面配置sd卡路径和引导文件的选项 在我手机上测  详情 回复 发表于 2014-10-17 17:36
buker为基础 不可能 我研究过buker 这货和我的app提供pxe服务的都是dnsmasq 不过buker的dnsmasq是阉割版 不含tftp功能 于是buker找来了别人编译的两种版本的busybox 一个提供tftp服务 一个提供tcpsvd服务 所以从  详情 回复 发表于 2014-10-17 15:00
回复

使用道具 举报

52#
 楼主| 发表于 2014-10-17 14:28:24 来自手机 | 只看该作者
ren001 发表于 2014-10-17 10:43
16日的测试版本IPXe http开启 成功一次 第二天程序丢了 也重装不上 后来装上也开启不了各服务

成功开启过  说明没问题
把pxe文件夹删除 重新进程序
有.pxe文件夹也删了

试试17号的  
我测试2.3  4.0安卓都无问题
回复

使用道具 举报

53#
 楼主| 发表于 2014-10-17 15:00:05 来自手机 | 只看该作者
hy5425 发表于 2014-10-17 14:14
能不能以buker pxe lite为基础进行改造?加入HTTP等服务,好像buker pxe lite的成功率要高一些,只是传输速度 ...

buker为基础 不可能
我研究过buker 这货和我的app提供pxe服务的都是dnsmasq
不过buker的dnsmasq是阉割版 不含tftp功能 于是buker找来了别人编译的两种版本的busybox 一个提供tftp服务 一个提供tcpsvd服务
所以从原理上来说  我和他的app没有区别  
我的app tftp由dnsmasq提供 性能完全有保证
实不相瞒  buker内置dnsmasq我手机无法运行
另外pxe还有另一种实现方式   光一个busybox就够了 不过要完整版的  
如果不需要g4d做网络引导   其实servers ultimate是个不错的选择
目前为止 g4d依然不支持server u*****
另外 我因为没有太多手机测试  只是测试2.3 4.0
你不能运行服务  调试一下 看看哪的问题
既然成功过 一般就是参数问题  稍加修改 也一定能用
我的app 网络启动核心就是一个dnsmasq  这一点所有版本一样  不同的只是参数
失败的原因
1.新安装程序  要把以前版本的.pxe  .nfs或pxe删除或改名
打开程序后
终端输入su
ls /data/data/com.pxe/pxe
如果提示文件不存在 就是这个原因
2.程序无法获取正确存储目录
打开程序后 打开终端
su
busybox env
echo $EXTEN_ STORAGE
看手机的默认存储路径是否存在 以及和手机存储路径是否一致
3.手机固件不支持文件夹软链接
程序打开后终端输入
su
ls -l /lis/
ls /web
如果能看到portmap pxe 等文件说明支持
否则如果提示/lis不存在
则固件不支持目录软链接

4.以前老版本采用mount -o bind方式
我也不知道是不是所有手机都支持
不过软链接 没道理不支持

5.处理器平台不兼容  这个无能为力
6.程序参数不争取
那么打开程序后终端手动输入
su
/lis/pxe ****************
看是否能成功
回复

使用道具 举报

54#
 楼主| 发表于 2014-10-17 17:36:25 | 只看该作者
hy5425 发表于 2014-10-17 14:14
能不能以buker pxe lite为基础进行改造?加入HTTP等服务,好像buker pxe lite的成功率要高一些,只是传输速度 ...

我把buker pxe lite的apk做了一下修改
替换了里面低版本的太监dnsmasq
换上了完整版dnsmasq
同时修改了程序的默认配置
我弄了一个g4d进去
修改后的的bukerpxe里面配置sd卡路径和引导文件的选项 在我手机上测试已经无效
还有就是 程序自带的打开有效 但是关闭无效
想启动其他的引导器 就把该引导器改名g4d.0 放bukerpxelite/tftp目录下
如果tftp的路径不对
修改/data/data/com.buker*****/conf/ltsp.conf
链接:http://pan.baidu.com/s/1mghy4R2 密码:2miu

回复

使用道具 举报

55#
 楼主| 发表于 2014-10-17 21:43:32 | 只看该作者
ren001 发表于 2014-10-17 12:02
17日的版本  换小平板测  各服务开启巴正常  重启后服务切均无法开启

重启后服务无法开启??
这也太诡异了啊???
不至于吧???
奇怪的平板???
就这样了
反正核心就是那个 dnsmasq程序
直接拷贝到/system/bin/下面  改名pxe  弄好权限
然后 找个支持脚本的终端执行器
执行
加上你的手机ip是192.168.2.162
pxe -F 192.168.2.162,proxy -p 0 --dhcp-no-override --enable-tftp --tftp-root=/sdcard/tftp --pxe-service=0,Made-in-CN,g4d
pxe -F 192.168.2.1,192.168.2.10 -p 0 --dhcp-no-override --enable-tftp --tftp-root=/sdcard/tftp -M g4d.0
对 就就这两条命令 一般如果路由开启了dhcp
常用的是第一条命令 第一条命令的引导文件是g4d.0  而不是g4d
回复

使用道具 举报

56#
发表于 2014-10-17 21:49:46 来自手机 | 只看该作者
真是**X!
回复

使用道具 举报

57#
发表于 2014-10-17 22:44:23 | 只看该作者
平板卸app 删pxe文件夹  再装运行服务正常 退出  再运行也正常  重启后仍不正常

点评

重启不正常的时候 打开app 确认一下 /data/data/com.pxe下面是否有pxe文件 是否有/lis 告诉我结果 如果没有 有可能是我的代码问题 但是你说 装好后退出 然后再次运行 依然正常 只有重启后不正常 我就感觉诡   发表于 2014-10-18 01:42
卸app 删pxe 重装app一切ok 重启就不行了???? 这么诡异?? 这样 你重启在确认pxe无法开启的情况下 在打开程序的前提下 终端运行 su ls /data/data/com.pxe/ 看看com.pxe文件夹下有没有pxe portmap unfs  详情 回复 发表于 2014-10-18 01:19
回复

使用道具 举报

58#
发表于 2014-10-17 22:59:34 来自手机 | 只看该作者
在终端试了下
回复

使用道具 举报

59#
发表于 2014-10-17 23:03:00 来自手机 | 只看该作者
找不到文件 应该是平板或软件问题
回复

使用道具 举报

60#
 楼主| 发表于 2014-10-18 01:19:35 | 只看该作者
ren001 发表于 2014-10-17 22:44
平板卸app 删pxe文件夹  再装运行服务正常 退出  再运行也正常  重启后仍不正常

卸app 删pxe 重装app一切ok 重启就不行了????
这么诡异??
这样 你重启在确认pxe无法开启的情况下 在打开程序的前提下
终端运行
su
ls /data/data/com.pxe/
看看com.pxe文件夹下有没有pxe portmap unfsd https等文件
如果有 看看pxe这个文件是有可执行权限
再看看手机的 根目录  /  是否可写
如果/目录可写  而文件没有执行权限 应该是我的app问题
否则这情况应该是 root不完美导致
另外 我今天发布了一个 只包含pxe 的软件
你测试一下 应该是没问题的
我在我4.0 和 2.3的安卓上测试 重启依然可用
另外你的平板有没有测试过服务启动成功 是否能网络启动呢??


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-25 02:13

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表