This procedure is only with cable, not for wifi
First check that your interface is up with the command “sudo ifconfig” :
If like in this screenshot you do not see an interface named “ethXXX“, you have to start the interface manually.
To found which of eth0, eth1, … your network card is, you can type “dmesg | grep eth”
We see here that the card “Intel Pro/1000” takes the “eth0” interface name. But it’s later renamed to “eth1“.
So our interface here is eth1, to bring it up, simply run “sudo ifconfig eth1 up”.
You may not have an IP Adress automatically like in this screenshot. If it’s the case, simply type “sudo dhclient eth1” to get one with DHCP.
If it doesn’t work, try to directly ping an IP address like google’s dns server 220.127.116.11 with the command “ping 18.104.22.168“. If it works, you probably have a nameserver problem. Simply add the line “nameserver 22.214.171.124” in /etc/resolv.conf
On ubuntu, if your system boots without network in failsafe mode, it will wait a long time for network to be available. In many case, this won’t help much…
Moreover, if you’re trying to do things like kernel compiling and for some reason you can’t see the boot log (including this “Waiting for network configuration” message), you’ll have the impression of being stuck with a bad kernel, but in fact it is just waiting 120 seconds…
Just edit the file sudo vi /etc/init/failsafe.conf and remove all “sleep” instructions. The message will be displayed but it won’t wait any time.
To repair you network problems, you might want to check this post and this post.
–> Ugly but okay in a development virtual machine
Launch the command “sudo visudo” in a terminal.
Add at the end :
student ALL=(ALL) NOPASSWD: ALL
And student will have no password prompt when using sudo
→ Ugly but okay in a development virtual machine…
Add “– – autologin root” at the end of /etc/init/tty1.conf
It will auto-log you as root for the first console. For the others, do the same with /etc/init/tty[1-5].conf
You can autolog as “student” by replacing root by student. It’s a little safer … but still ugly.
If all you get is a black screen when booting, boot in recovery mode to see a little more information :
When you are in the grub menu, choose the “recovery” version
If there is none or if it’s still black type “e” in the grub menu over the kernel entry you want. Find the line starting by linux, and add “ro single recovery” at the end.
Type F10 to boot.
Grub normally have a “Previous versions” menu to allow you to boot with the ubuntu default kernel…
In fact if you get a black screen when booting, chances is that you’re missing some modules. But you can get more:
- Add a serial device to your virtualbox, select “file” mode, with e.g. /tmp/vbox-jerry
- run tail -f /tmp/vbox-jerry on your machine to watch that log file,
- before booting, press e to edit the config and add at the tail of the command line ” console=ttyS0,57600″
- this will work only for boot time, when syslogd will start, the log will go to /var/log/syslog
- You can use the /etc/default/grub file like for the screen size (see slides of info0940) to make it permanent
A network problem during boot may stall you for 120 seconds, with or without a black screen ! So wait a little !