Copy head.img to SD card
# mount /dev/sdd1 /mnt && cp /home/test/Desktop/head.img /mnt/root/ && sync && umount /mnt
Copy rootfs to SSD
# echo -e "d\nd\nn\np\n1\n\n\nw" | fdisk /dev/sdf && mkfs.ext4 /dev/sdf1 && mount /dev/sdf1 /mnt && rsync -av /clone-ssd/ /mnt/ && sync && umount /mnt
Replace nand
# dd if=head.img of=/dev/nand bs=1024 conv=noerror,sync
** If bad file system block try this resize2fs /dev/(device)
Config dhcpd.conf
############ SETTING ############
######### set dhcp range ########
default-lease-time 6000;
max-lease-time 72000;
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.101 192.168.5.250;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.5.255;
option routers 192.168.5.9;
option ntp-servers ntp.sut.ac.th;
option domain-name-servers 8.8.8.8, 8.8.4.4;
option domain-name "aiyara.lab.sut.ac.th";
}
######### reserved ip ########
host port-23 { hardware ethernet 14:CC:20:05:43:B4; fixed-address 192.168.5.23; }
host port-24 { hardware ethernet 0C:4D:E9:B9:8F:B5; fixed-address 192.168.5.24; }
host port-101 { hardware ethernet 02:03:08:02:24:40; fixed-address 192.168.5.101; }
host port-102 { hardware ethernet 02:03:0A:C2:AD:90; fixed-address 192.168.5.102; }
host port-103 { hardware ethernet 02:53:05:40:9A:AD; fixed-address 192.168.5.103; }
host port-104 { hardware ethernet 02:82:08:42:24:62; fixed-address 192.168.5.104; }
host port-105 { hardware ethernet 02:82:08:C3:26:D6; fixed-address 192.168.5.105; }
host port-106 { hardware ethernet 02:18:09:01:D4:14; fixed-address 192.168.5.106; }
host port-107 { hardware ethernet 02:03:08:01:E3:C0; fixed-address 192.168.5.107; }
host port-108 { hardware ethernet 02:18:08:01:72:E0; fixed-address 192.168.5.108; }
host port-109 { hardware ethernet 02:82:08:83:57:0A; fixed-address 192.168.5.109; }
host port-110 { hardware ethernet 02:05:07:80:88:EC; fixed-address 192.168.5.110; }
host port-111 { hardware ethernet 02:CD:01:C2:51:03; fixed-address 192.168.5.111; }
host port-112 { hardware ethernet 02:C1:06:42:F4:97; fixed-address 192.168.5.112; }
host port-113 { hardware ethernet 02:41:06:42:13:39; fixed-address 192.168.5.113; }
host port-114 { hardware ethernet 02:8D:05:82:33:02; fixed-address 192.168.5.114; }
host port-115 { hardware ethernet 02:06:07:42:84:88; fixed-address 192.168.5.115; }
host port-116 { hardware ethernet 02:84:0B:41:E5:46; fixed-address 192.168.5.116; }
host port-117 { hardware ethernet 02:85:03:01:6B:0A; fixed-address 192.168.5.117; }
host port-118 { hardware ethernet 02:4D:04:C0:B0:D1; fixed-address 192.168.5.118; }
host port-119 { hardware ethernet 02:82:08:43:02:B6; fixed-address 192.168.5.119; }
host port-120 { hardware ethernet 02:8D:04:C1:61:A2; fixed-address 192.168.5.120; }
host port-121 { hardware ethernet 02:D8:08:C1:12:53; fixed-address 192.168.5.121; }
host port-122 { hardware ethernet 02:45:06:01:02:0D; fixed-address 192.168.5.122; }
host port-123 { hardware ethernet 02:05:04:82:42:88; fixed-address 192.168.5.123; }
host port-124 { hardware ethernet 02:0D:05:81:C2:68; fixed-address 192.168.5.124; }
host port-125 { hardware ethernet 02:01:06:80:80:D0; fixed-address 192.168.5.125; }
host port-126 { hardware ethernet 02:09:08:41:C3:9C; fixed-address 192.168.5.126; }
host port-127 { hardware ethernet 02:88:08:81:62:4E; fixed-address 192.168.5.127; }
host port-128 { hardware ethernet 02:45:03:C1:FF:CD; fixed-address 192.168.5.128; }
host port-129 { hardware ethernet 02:03:09:42:0E:74; fixed-address 192.168.5.129; }
host port-130 { hardware ethernet 02:82:0B:42:7D:6A; fixed-address 192.168.5.130; }
host port-131 { hardware ethernet 02:C3:02:81:D4:9B; fixed-address 192.168.5.131; }
host port-132 { hardware ethernet 02:02:08:82:E6:1C; fixed-address 192.168.5.132; }
host port-133 { hardware ethernet 02:C2:07:42:B4:DF; fixed-address 192.168.5.133; }
host port-134 { hardware ethernet 02:4E:06:02:2A:15; fixed-address 192.168.5.134; }
host port-135 { hardware ethernet 02:09:08:C2:85:78; fixed-address 192.168.5.135; }
host port-136 { hardware ethernet 02:82:07:42:E5:36; fixed-address 192.168.5.136; }
host port-137 { hardware ethernet 02:8D:05:81:51:CE; fixed-address 192.168.5.137; }
host port-138 { hardware ethernet 02:83:04:C3:28:46; fixed-address 192.168.5.138; }
host port-139 { hardware ethernet 02:87:07:43:38:92; fixed-address 192.168.5.139; }
host port-140 { hardware ethernet 02:05:06:41:08:4C; fixed-address 192.168.5.140; }
host port-141 { hardware ethernet 02:82:08:03:52:5A; fixed-address 192.168.5.141; }
host port-142 { hardware ethernet 02:CD:06:C2:60:43; fixed-address 192.168.5.142; }
host port-143 { hardware ethernet 02:8F:0B:82:17:26; fixed-address 192.168.5.143; }
host port-144 { hardware ethernet 02:85:03:C1:11:DE; fixed-address 192.168.5.144; }
host port-13 { hardware ethernet 02:85:03:C2:E2:B2; fixed-address 192.168.5.13; }
host port-14 { hardware ethernet C4:2C:03:3A:2A:6F; fixed-address 192.168.5.14; }
host port-145 { hardware ethernet 02:08:08:81:A1:B4; fixed-address 192.168.5.145; }
host port-146 { hardware ethernet 02:05:06:82:05:FC; fixed-address 192.168.5.146; }
host port-147 { hardware ethernet 02:C5:08:02:94:A3; fixed-address 192.168.5.147; }
host port-148 { hardware ethernet 02:C5:03:81:02:17; fixed-address 192.168.5.148; }
host port-149 { hardware ethernet 02:45:08:03:03:B5; fixed-address 192.168.5.149; }
host port-150 { hardware ethernet 02:45:06:40:E8:85; fixed-address 192.168.5.150; }
host port-151 { hardware ethernet 02:0E:02:41:D1:E4; fixed-address 192.168.5.151; }
host port-152 { hardware ethernet 02:56:04:01:DD:91; fixed-address 192.168.5.152; }
host port-153 { hardware ethernet 02:D7:04:C3:00:9B; fixed-address 192.168.5.153; }
host port-154 { hardware ethernet 02:47:06:C1:DB:8D; fixed-address 192.168.5.154; }
host port-155 { hardware ethernet 02:83:03:C2:1E:4E; fixed-address 192.168.5.155; }
host port-156 { hardware ethernet 02:02:07:43:45:E4; fixed-address 192.168.5.156; }
host port-157 { hardware ethernet 02:D6:03:01:0F:7F; fixed-address 192.168.5.157; }
host port-158 { hardware ethernet 02:05:02:C2:55:28; fixed-address 192.168.5.158; }
host port-159 { hardware ethernet 02:02:04:83:4B:DC; fixed-address 192.168.5.159; }
host port-160 { hardware ethernet 02:08:08:43:0E:88; fixed-address 192.168.5.160; }
host port-161 { hardware ethernet 02:C2:0B:82:2E:0B; fixed-address 192.168.5.161; }
host port-162 { hardware ethernet 02:17:04:C2:52:00; fixed-address 192.168.5.162; }
host port-163 { hardware ethernet 02:C8:08:01:03:1B; fixed-address 192.168.5.163; }
host port-164 { hardware ethernet 02:83:04:C2:89:82; fixed-address 192.168.5.164; }
host port-165 { hardware ethernet 02:17:05:81:64:50; fixed-address 192.168.5.165; }
host port-166 { hardware ethernet 02:93:09:41:C7:1E; fixed-address 192.168.5.166; }
host port-167 { hardware ethernet 02:03:08:01:93:20; fixed-address 192.168.5.167; }
host port-168 { hardware ethernet 02:03:07:C1:01:F0; fixed-address 192.168.5.168; }
host port-169 { hardware ethernet 02:82:08:82:14:62; fixed-address 192.168.5.169; }
host port-170 { hardware ethernet 02:02:05:41:C2:4C; fixed-address 192.168.5.170; }
host port-171 { hardware ethernet 02:03:0A:00:DD:50; fixed-address 192.168.5.171; }
host port-172 { hardware ethernet 02:06:07:41:C6:08; fixed-address 192.168.5.172; }
host port-173 { hardware ethernet 02:05:07:82:05:F8; fixed-address 192.168.5.173; }
host port-174 { hardware ethernet 02:16:06:00:EF:AC; fixed-address 192.168.5.174; }
host port-175 { hardware ethernet 02:16:04:01:8E:68; fixed-address 192.168.5.175; }
host port-176 { hardware ethernet 02:08:08:82:00:CC; fixed-address 192.168.5.176; }
host port-177 { hardware ethernet 02:D8:07:C1:74:2F; fixed-address 192.168.5.177; }
host port-178 { hardware ethernet 02:07:07:C1:01:F0; fixed-address 192.168.5.178; }
host port-179 { hardware ethernet 02:85:07:42:A4:7A; fixed-address 192.168.5.179; }
host port-180 { hardware ethernet 02:89:08:C2:65:32; fixed-address 192.168.5.180; }
host port-181 { hardware ethernet 02:C4:07:02:57:8B; fixed-address 192.168.5.181; }
host port-182 { hardware ethernet 02:C1:06:42:73:CF; fixed-address 192.168.5.182; }
host port-183 { hardware ethernet 02:42:08:C3:36:F9; fixed-address 192.168.5.183; }
host port-184 { hardware ethernet 02:C3:09:42:9D:3B; fixed-address 192.168.5.184; }
host port-185 { hardware ethernet 02:03:05:41:8B:E8; fixed-address 192.168.5.185; }
host port-186 { hardware ethernet 02:46:07:C2:F5:B1; fixed-address 192.168.5.186; }
host port-187 { hardware ethernet 02:05:06:41:D6:70; fixed-address 192.168.5.187; }
host port-188 { hardware ethernet 02:85:07:C1:08:46; fixed-address 192.168.5.188; }
GOOS=linux GOARCH=arm GOARM=7 go build .