Welcome! Log In Create A New Profile


Cannot use working rootfs on a different dockstar

Posted by lcg 
Cannot use working rootfs on a different dockstar
December 21, 2012 04:05PM
Dear all,

it does not seem possible to use a working rootfs from one dockstar on another (rootfs is Debian Wheezy installed by Jeff's script). However, on the second dockstar it is possible to install Debian via the script too, so it is not a problem of the Dockstar or installing Debian per se. But just copying the rootfs to another stick (or using the same stick on another dockstar) does not really seem to work. /etc/fstab was adjusted to UUID, so that's not the problem too. /var/log messages are not very helpful unless it seems that the network has not started - so it seems the systems starts, but without network. The IP is given via MAC (ie. always same IP for same MAC).

However, Davy's Rescue system on USB stick works on the different dockstars.

So what's the difference between a plain Debian created via debootstrap and Davy's Rescue System? Why does the one boots _with_ network, the other not -> on different machines that are identical for the hardware?

dmesg log tells me:

udevd[263]: renamed network interface eth0 to eth1

So why does this happen? I have not updated any kernel or whatsoever. Can this be avoided? Should the network be configured as eth1 instead of eth0? Is there anything written in a config file (which?) that inhibits to use eth0?

thanks for any suggestions,
Re: Cannot use working rootfs on a different dockstar
December 21, 2012 05:25PM

The reason is the udev persistent rules in assigning the network name based on MAC address. It will try to assign eth1 if eth0 was already associated with a MAC address before (i.e. in the 1st box, where the rootfs was from). So to work around this, we can change 2 udev-related files:

# cat /lib/udev/rules.d/75-persistent-net-generator.rules | grep -i 'kernel!'
KERNEL!="Eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \

# cat /etc/udev/rules.d/70-persistent-net.rules | grep -i 'subsystem'
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:75:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

In the first file, the device name white list has "eth*", so change that to "Eth*", so that udev can't find it. In the second file, either comment out the "SUBSYSTEM" line, or delete it.

This set up will force the udev to assign a brand new eth0 during boot. Therefore the rootfs can be reused in any new box.
Re: Cannot use working rootfs on a different dockstar
December 22, 2012 03:05PM
@Bodhi - thanks, worked out of the box. I chose option 2 and deleted the old entry (eth0) and renamed the new eth1 to eth0. Good to know that udev "remembers" hardware.

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.