[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: create /etc/udev/rules.d/70-persistent-net.rules



Christoph Pleger wrote:
> I want to boot a computer from network by PXE, with an NFS filesystem as
> root fs, install a basic system on the local disk and then boot the
> computer from the disk. After booting from disk, the names of the network
> interfaces should be the same as before with the NFS root.

> So, I thought that I can simply copy
> /etc/udev/rules.d/70-persistent-net.rules from my NFS root into the
> directory ${TARGET}//etc/udev/rules.d/, where $TARGET becomes /
> later on the local disk. But unfortunately, that file is not created
> when booting from network, so it cannot be copied.

On my NFS diskless client the 70-persistent-net.rules *is* created and
updated when booting.  Therefore your strategy would work in my
environment.  In my diskless boot environment my
70-persistent-net.rules file would grow and grow and grow as I booted
different hardware if I didn't actively prune it.

Therefore I ask, why doesn't it get created in your NFS boot environment?
Are you actively preventing it from being created?  (Note that
Raspbian for the pi actively prevents it.)

Other related ideas: After you have PXE booted your NFS diskless
client you will know the ethernet address of your network device.
That would allow you to differentiate the different NICs from each
other later.  Read through the /lib/udev/write_net_rules script and
see how you can drive it as you desire.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: