Version: Pidora-2014-R3
The default userid/password for pidora is: root/raspberrypi
Ref: http://www.raspberrypi.org/forums/viewtopic.php?f=51&t=96411
Ref: http://www.raspberrypi.org/forums/viewtopic.php?f=51&t=96411
Pidora-Headless-Mode
http://zenit.senecac.on.ca/wiki/index.php/Pidora-Headless-Mode#How_do_I_find_my_IP_Address.3F
To enable Headless Mode, create a file named "headless" inside the boot file system on the Raspberry Pi's SD card. Create this "headless" file before you boot your Raspberry Pi.
If "RESIZE" is in the "headless" file, the root filesystem will be expanded to the maximum size of the sd card via the service rootfs-resize. If "SWAP"(requires the value in megabytes) exists in the "headless" file, a swap file will be created of the specified size, and then activated.
If "RESIZE" is in the "headless" file, the root filesystem will be expanded to the maximum size of the sd card via the service rootfs-resize. If "SWAP"(requires the value in megabytes) exists in the "headless" file, a swap file will be created of the specified size, and then activated.
例:
IPADDR=192.168.1.105
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
IPADDR=192.168.1.105
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=
192.168.1.1
RESIZE
SWAP=512
RESIZE
SWAP=512
注:
headless文件中,配置了IPADDR, NETMASK, GATEWAY, DNS1无效果,IP依然是DHCP分配的。
headless文件中,配置了IPADDR, NETMASK, GATEWAY, DNS1无效果,IP依然是DHCP分配的。
只能通过路由查Pidora的IP,登陆后再修改为静态IP。
但修改静态IP后,必须删除headless文件,否则重启后IP还是会由DHCP分配。
配置静态IP
[
root@pidora ~]#
vi /etc/sysconfig/network-scripts/ifcfg-eth0
修改前
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=yes
修改后
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.199.101
NETMASK=255.255.255.0
GATEWAY=192.168.199.1
DNS1=192.168.199.1
ONBOOT=yes
NM_CONTROLLED=yes
# service network restart
# /etc/init.d/network restart
# reboot <- 重启之前,务必 删除headless文件
修改前
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=yes
修改后
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.199.101
NETMASK=255.255.255.0
GATEWAY=192.168.199.1
DNS1=192.168.199.1
ONBOOT=yes
NM_CONTROLLED=yes
# service network restart
# /etc/init.d/network restart
# reboot <- 重启之前,务必 删除headless文件
fedora18以上 关闭防火墙
systemctl stop firewalld.service // 关闭
systemctl disable firewalld.service // 开机不启动
使用ifconfig
# yum install net-tools
查看IP其他方法
# pifconfig
# ip addr show