diff options
Diffstat (limited to 'meta/recipes-core/initrdscripts/files')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh index c054863a2a..eb5ab5b7a5 100644 --- a/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/meta/recipes-core/initrdscripts/files/init-live.sh | |||
@@ -13,6 +13,11 @@ early_setup() { | |||
13 | mkdir /sys | 13 | mkdir /sys |
14 | mount -t proc proc /proc | 14 | mount -t proc proc /proc |
15 | mount -t sysfs sysfs /sys | 15 | mount -t sysfs sysfs /sys |
16 | |||
17 | # support modular kernel | ||
18 | modprobe isofs 2> /dev/null | ||
19 | |||
20 | mkdir /run | ||
16 | udevd --daemon | 21 | udevd --daemon |
17 | udevadm trigger --action=add | 22 | udevadm trigger --action=add |
18 | } | 23 | } |
@@ -25,21 +30,25 @@ read_args() { | |||
25 | root=*) | 30 | root=*) |
26 | ROOT_DEVICE=$optarg ;; | 31 | ROOT_DEVICE=$optarg ;; |
27 | rootfstype=*) | 32 | rootfstype=*) |
28 | ROOT_FSTYPE=$optarg ;; | 33 | modprobe $optarg 2> /dev/null ;; |
29 | rootdelay=*) | 34 | LABEL=*) |
30 | rootdelay=$optarg ;; | 35 | label=$optarg ;; |
31 | LABEL=*) | 36 | video=*) |
32 | label=$optarg ;; | 37 | video_mode=$arg ;; |
33 | video=*) | 38 | vga=*) |
34 | video_mode=$arg ;; | 39 | vga_mode=$arg ;; |
35 | vga=*) | ||
36 | vga_mode=$arg ;; | ||
37 | esac | 40 | esac |
38 | done | 41 | done |
39 | } | 42 | } |
40 | 43 | ||
41 | boot_live_root() { | 44 | boot_live_root() { |
42 | killall udevd | 45 | killall udevd 2>/dev/null |
46 | |||
47 | # use devtmpfs if available | ||
48 | if grep -q devtmpfs /proc/filesystems; then | ||
49 | mount -t devtmpfs devtmpfs $ROOT_MOUNT/dev | ||
50 | fi | ||
51 | |||
43 | cd $ROOT_MOUNT | 52 | cd $ROOT_MOUNT |
44 | exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init | 53 | exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init |
45 | } | 54 | } |
@@ -78,7 +87,7 @@ done | |||
78 | case $label in | 87 | case $label in |
79 | boot) | 88 | boot) |
80 | mkdir $ROOT_MOUNT | 89 | mkdir $ROOT_MOUNT |
81 | mknod /dev/loop0 b 7 0 | 90 | mknod /dev/loop0 b 7 0 2>/dev/null |
82 | 91 | ||
83 | if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then | 92 | if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then |
84 | fatal "Couldnt mount rootfs image" | 93 | fatal "Couldnt mount rootfs image" |
@@ -97,4 +106,3 @@ case $label in | |||
97 | fatal "Installation image failed" | 106 | fatal "Installation image failed" |
98 | ;; | 107 | ;; |
99 | esac | 108 | esac |
100 | |||