I have multiple devices installed with Ubuntu Server. Some of them have a strange problem:
They can access internet using some applications, such as squid, without any problem.
They can ping to internet IP address.
They can use host / dig to query IP by domain name.
They cannot ping to internet by using domain name directly.
They cannot download file through wget / curl using domain name, but can do with IP.
They cannot use apt, stuck at connecting.
All they use a local dnsmasq as their dns.
After a long time dig, I found the problem and here is the fix.
open the file /etc/nsswitch.conf, search the line with “hosts:” and change the setting to “files dns” (without quotes).
This will guide you to prepare a installation media from Windows and install ubuntu into Soekris net6501.
Stuffs you need:
- a USB stick that CAN BE RECOGNIZED by net6501 device.
Not sure? Attach it to net6501 and reboot. If you can read the SIZE of this stick while booting, it is.
- an ISO file for ubuntu server 32-bit. Version 16.10 is tested.
- rufus. Guide and download point at https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows.
- a working serial connection from your workstation to your net6501, software included.
Prepare installation media:
- Use rufus to build the USB stick. Check the guide above.
- Link net6501 to your computer using serial connection and start the link. In this case, I’m using the default setting (Speed=19200, Data bits=8, Stop bits=1, Parity=None, Flow control=XON/XOFF).
- Boot your net6501 with USB stick attached.
- Hit ctrl-p to go into bios.
- Type “boot 81” (without quotes) and press enter to boot from USB.
- You will see that something wrong with gfxboot.
- Type this text below SLOWLY and press enter. DO NOT COPY AND PASTE:
- Do not press any key related to screen mode selection. It will be passed.
- Choose a language and continue installation steps as normal.
Grub configuration need to be adjusted for using serial as console.
Edit /etc/default/grub and change to these lines below:
Then run update-grub.
Hope this help you.
Every time when I log on my ubuntu server, there always be a System Information displayed. How can we tell to the bash to re-display this screen again?
The command is: landscape-sysinfo
Simply, you just need to type land and press tab key to let the auto complete do the job.
This command can be used to lock a file.
usage: chattr +i filename
The files locked by chattr cannot be modified or deleted, even with root permission.
For unlocking, use chattr -i filename.