summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-25 18:30:11 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-25 18:30:11 +0000
commit36935bcd2a8dff0e950c3abea4bb46acdadf0ab9 (patch)
tree53036fcdc9c53de6f7299e1e90f4f46e44dda0a0
parentb6810f16313553b978d9de31a28fb2b14a8dffd3 (diff)
downloaddrakx-backup-do-not-use-36935bcd2a8dff0e950c3abea4bb46acdadf0ab9.tar
drakx-backup-do-not-use-36935bcd2a8dff0e950c3abea4bb46acdadf0ab9.tar.gz
drakx-backup-do-not-use-36935bcd2a8dff0e950c3abea4bb46acdadf0ab9.tar.bz2
drakx-backup-do-not-use-36935bcd2a8dff0e950c3abea4bb46acdadf0ab9.tar.xz
drakx-backup-do-not-use-36935bcd2a8dff0e950c3abea4bb46acdadf0ab9.zip
udev support
(will help next commits)
-rw-r--r--rescue/NEWS1
-rw-r--r--rescue/list.xml14
-rw-r--r--rescue/tree/etc/fstab3
-rwxr-xr-xrescue/tree/etc/rc.sysinit18
4 files changed, 32 insertions, 4 deletions
diff --git a/rescue/NEWS b/rescue/NEWS
index c815341b2..6d228ca77 100644
--- a/rescue/NEWS
+++ b/rescue/NEWS
@@ -1,5 +1,6 @@
- enable rescue through serial line (mga#2052)
- include xz for xz modules
+- switch to udev
Version 1.28 - 15 January 2011, by Thierry Vignaud
diff --git a/rescue/list.xml b/rescue/list.xml
index 03d6615db..1d5feccc9 100644
--- a/rescue/list.xml
+++ b/rescue/list.xml
@@ -96,6 +96,8 @@
dump dump.ext2 restore restore.ext2 dump.ext3 restore.ext3 dump.xfs restore.xfs
parted partimage partprobe
+ udevadm
+
mdadm lvm2
mdmon kpartx
dmevent_tool
@@ -263,6 +265,18 @@
ssh/ssh_config
</from>
+<from dir="/lib/udev">
+ udevd
+</from>
+
+<from dir="/lib/udev/rules.d">
+ 10-dm.rules
+ 13-dm-disk.rules
+ 11-dm-lvm.rules
+ 95-dm-notify.rules
+</from>
+
+
<filter command="strip">
<from dir="/LIB">
libnss_files.so.2
diff --git a/rescue/tree/etc/fstab b/rescue/tree/etc/fstab
index 148dcd4b4..9280d8ee0 100644
--- a/rescue/tree/etc/fstab
+++ b/rescue/tree/etc/fstab
@@ -1,5 +1,6 @@
/dev/ram3 / ext2 defaults 1 1
/dev/fd0 /mnt/floppy auto defaults,noauto 0 0
none /proc proc defaults,noauto,ro 0 0
-devpts /dev/pts devpts defaults,noauto,rw 0 0
+devpts /dev/pts devpts gid=5,mode=620,noauto 0 0
+tmpfs /dev/shm tmpfs defaults,noauto 0 0
/dev/cdrom /mnt/cdrom auto defaults,noauto 0 0
diff --git a/rescue/tree/etc/rc.sysinit b/rescue/tree/etc/rc.sysinit
index 39d7dec6b..e562cde63 100755
--- a/rescue/tree/etc/rc.sysinit
+++ b/rescue/tree/etc/rc.sysinit
@@ -10,6 +10,21 @@ echo -e "\t\t\tWelcome to \\033[1;36mMageia\\033[0;39m Linux"
action "Remounting root filesystem in read-write mode" mount -n -o remount,rw /
+echo "Starting udev"
+mkdir /run
+mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run
+mkdir -p /run/udev/rules.d
+export UDEVRULESD=/run/udev/rules.d
+mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev
+mkdir /dev/pts
+mkdir /dev/shm
+mount /dev/pts
+mount /dev/shm
+
+/lib/udev/udevd --daemon --resolve-names=never
+udevadm trigger --type=subsystems --action=add
+udevadm trigger --type=devices --action=add
+
ln -s /tmp/stage2/etc/* /etc 2>/dev/null
# make passwd changable
rm -f /etc/passwd
@@ -22,9 +37,6 @@ mkdir -p /mnt /var/log /dev/pts
>/etc/mtab
mount -f /
mount -f /proc
-# mount /dev/pts and link /dev/ptmx so dropbear works
-mount /dev/pts
-ln -s /dev/pts/ptmx /dev/ptmx
# Set the hostname.
action "Setting hostname rescue" hostname rescue