From 083296c57af0d21be562eeb4a71db7091ec0a38c Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 22 Nov 2014 22:01:52 -0500 Subject: [PATCH] Fix udev naming of eth* network interfaces Update installation instructions. --- stage1/INSTALL | 8 +++----- stage2/INSTALL | 8 +++----- stage2/misc/udev/20-network.rules | 2 -- stage2/misc/udev/80-net-name-slot.rules | 1 + stage2/misc/udev/udev-create-persistent-net.sh | 7 ------- stage2/pkg/eudev | 3 --- 6 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 stage2/misc/udev/20-network.rules create mode 100644 stage2/misc/udev/80-net-name-slot.rules delete mode 100755 stage2/misc/udev/udev-create-persistent-net.sh diff --git a/stage1/INSTALL b/stage1/INSTALL index e0c1c53..4bb0d7d 100644 --- a/stage1/INSTALL +++ b/stage1/INSTALL @@ -6,10 +6,8 @@ Installation 1. Type: $> sudo make -2. Copy compiled kernel from ${LFS}/boot to your boot partition. +2. Add an entry to /boot/grub/menu.lst for your new kernel. -3. Add an entry to /boot/grub/menu.lst for your new kernel. +3. Create folder ${LFS}/mnt/hvrepos and add entry for it in ${LFS}/mnt/fstab -4. Create folder ${LFS}/mnt/hvrepos and add entry for it in ${LFS}/mnt/fstab - -5. Copy hvlinux tree into ${LFS} (ex: ${LFS}/usr/src/hvlinux) +4. Copy hvlinux tree into ${LFS} (ex: ${LFS}/usr/src/hvlinux) diff --git a/stage2/INSTALL b/stage2/INSTALL index ced5ba9..01941b4 100644 --- a/stage2/INSTALL +++ b/stage2/INSTALL @@ -1,5 +1,5 @@ stage2: Installing basic system software - + Installation ------------ @@ -10,16 +10,14 @@ Installation 3. Reboot. -4. Run script /usr/local/bin/udev-create-persistent-net.sh - -5. Optional. To install GRUB, launch 'grub'. When the GRUB prompt appears, +4. Optional. To install GRUB, launch 'grub'. When the GRUB prompt appears, install grub on the MBR with (example with boot partition on first partition of first disk): grub> root (hd0,0) grub> setup (hd0) grub> reboot -6. Login as root, and create the password for the regular user: +5. Login as root, and create the password for the regular user: >$ passwd reguser diff --git a/stage2/misc/udev/20-network.rules b/stage2/misc/udev/20-network.rules deleted file mode 100644 index d7ef635..0000000 --- a/stage2/misc/udev/20-network.rules +++ /dev/null @@ -1,2 +0,0 @@ -SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:04:0b:80:80:80", NAME="eth0" - diff --git a/stage2/misc/udev/80-net-name-slot.rules b/stage2/misc/udev/80-net-name-slot.rules new file mode 100644 index 0000000..b7bef3d --- /dev/null +++ b/stage2/misc/udev/80-net-name-slot.rules @@ -0,0 +1 @@ +# Dummy, so that ethernet devices are named eth0, eth1, etc. diff --git a/stage2/misc/udev/udev-create-persistent-net.sh b/stage2/misc/udev/udev-create-persistent-net.sh deleted file mode 100755 index d0650b8..0000000 --- a/stage2/misc/udev/udev-create-persistent-net.sh +++ /dev/null @@ -1,7 +0,0 @@ -#/bin/sh - -# Pre-generate the rules to ensure the same names get assigned to the same devices at every boot, including the first: - -for NIC in /sys/class/net/* ; do - INTERFACE=${NIC##*/} udevadm test --action=add $NIC -done diff --git a/stage2/pkg/eudev b/stage2/pkg/eudev index ef42cb4..b4deb0d 100644 --- a/stage2/pkg/eudev +++ b/stage2/pkg/eudev @@ -22,9 +22,6 @@ hvconfig_pre() hvbuild_post() { - install -v -m755 ${SCRDIR}/misc/udev/udev-create-persistent-net.sh \ - /usr/local/bin - for f in ${SCRDIR}/misc/udev/*.rules; do install -v -m644 ${f} /etc/udev/rules.d done -- 2.20.1