To startup vm called "sys-net" in Qubes on my laptop need to write "1" in file

echo -n "1" > /sys/bus/pci/devices/0000\:04\:00.0/remove

also 0000:04:00.0 and 0000:04:00.1 are conflicts and need to be removed first after every startup laptop.

then network start and work fine. there is some input for information

$ lspci | grep -i eth
04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev12)

$ find /sys -name *04:00.0

$ find /sys -name *04:00.1

How can I convert it to systemd script to run it at start-up? It works only temporarily. After reboot the network device is there again.

  • 0000:04:00.0 - its a mmc0 ultra high speed SDR104 SDHC card – nickaz Mar 25 '17 at 19:15

You could try using a udev rule.

For example, you can create a file /etc/udev/rules.d/99-disable-eth.rules with the following content:

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="pci", RUN+="/bin/sh -c 'echo 1 >/sys/bus/pci/devices/0000\:04\:00.0/remove'"

Feel free to customize it further to add more specific items, like the vendor attribute, the name of the interface, etc.

Take a look at http://www.reactivated.net/writing_udev_rules.html for more examples and additional information on writing udev rules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.