1 |
Author: agaffney |
2 |
Date: 2008-04-02 18:54:09 +0000 (Wed, 02 Apr 2008) |
3 |
New Revision: 661 |
4 |
|
5 |
Modified: |
6 |
trunk/ChangeLog |
7 |
trunk/generic/linuxrc |
8 |
Log: |
9 |
Remove initrd-specific code from linuxrc |
10 |
|
11 |
Modified: trunk/ChangeLog |
12 |
=================================================================== |
13 |
--- trunk/ChangeLog 2008-03-30 23:27:03 UTC (rev 660) |
14 |
+++ trunk/ChangeLog 2008-04-02 18:54:09 UTC (rev 661) |
15 |
@@ -2,6 +2,9 @@ |
16 |
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 |
17 |
# $Header: $ |
18 |
|
19 |
+ 02 Apr 2008; Andrew Gaffney <agaffney@g.o> generic/linuxrc: |
20 |
+ Remove initrd-specific code from linuxrc |
21 |
+ |
22 |
30 Mar 2008; Andrew Gaffney <agaffney@g.o> gen_arch.sh: |
23 |
Uncomment ppc/ppc64->powerpc code in set_kernel_arch, since it appears to |
24 |
actually be necessary as of 2.6.24-gentoo-r4 |
25 |
|
26 |
Modified: trunk/generic/linuxrc |
27 |
=================================================================== |
28 |
--- trunk/generic/linuxrc 2008-03-30 23:27:03 UTC (rev 660) |
29 |
+++ trunk/generic/linuxrc 2008-04-02 18:54:09 UTC (rev 661) |
30 |
@@ -606,67 +606,25 @@ |
31 |
|
32 |
verbose_kmsg |
33 |
|
34 |
-if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ] |
35 |
+# There used to be some initrd/2.4 code here, but it's gone now : |
36 |
+if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ] \ |
37 |
+|| [ ! -e "${CHROOT}/dev/tty1" ] |
38 |
then |
39 |
- # XXX: remove me!!! |
40 |
- echo "DEBUG: initrd code path" |
41 |
- if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ] \ |
42 |
- || [ ! -e "${CHROOT}/dev/tty1" ] |
43 |
- then |
44 |
- echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: /dev is broken!${NORMAL}" |
45 |
- else |
46 |
- echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting${NORMAL}" |
47 |
- fi |
48 |
+ echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: /dev is broken!${NORMAL}" |
49 |
+else |
50 |
+ echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}" |
51 |
+fi |
52 |
|
53 |
- cd "${CHROOT}" |
54 |
- mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null |
55 |
- pivot_root . tmp/.initrd |
56 |
- if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] |
57 |
- then |
58 |
- sleep 10 |
59 |
- fi |
60 |
- echo -ne "${BOLD}.${NORMAL}" |
61 |
+cd "${CHROOT}" |
62 |
+mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null |
63 |
+echo -ne "${BOLD}.${NORMAL}" |
64 |
+umount /sys || echo '*: Failed to unmount the initrd /sys!' |
65 |
+umount /proc || echo '*: Failed to unmount the initrd /proc!' |
66 |
+echo -e "${BOLD}.${NORMAL}" |
67 |
|
68 |
- /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/fd ] && rm /tmp/.initrd/dev/fd |
69 |
- /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdin ] && rm /tmp/.initrd/dev/stdin |
70 |
- /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stdout ] && rm /tmp/.initrd/dev/stdout |
71 |
- /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/stderr ] && rm /tmp/.initrd/dev/stderr |
72 |
- /tmp/.initrd/bin/[ -e /tmp/.initrd/dev/core ] && rm /tmp/.initrd/dev/core |
73 |
- umount /tmp/.initrd/dev || echo '*: Failed to unmount the initrd /dev!' |
74 |
- umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!' |
75 |
- umount /tmp/.initrd/sys || echo '*: Failed to unmount the initrd /sys!' |
76 |
- echo -ne "${BOLD}.${NORMAL}" |
77 |
+exec switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" |
78 |
|
79 |
- # /usr/src/linux/Documentation/initrd.txt: |
80 |
- # exec chroot . /sbin/init </dev/console >/dev/console 2>&1 |
81 |
- |
82 |
- echo -e "${BOLD}.${NORMAL}" |
83 |
- exec <dev/console >dev/console 2>&1 |
84 |
- exec chroot . /bin/sh <<- EOF |
85 |
- umount /tmp/.initrd || echo "*: Failed to unmount the initrd!" |
86 |
- /sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1 |
87 |
- exec "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" |
88 |
-EOF |
89 |
-elif [ "$0" = '/init' ] |
90 |
-then |
91 |
- if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ] \ |
92 |
- || [ ! -e "${CHROOT}/dev/tty1" ] |
93 |
- then |
94 |
- echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: /dev is broken!${NORMAL}" |
95 |
- else |
96 |
- echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}" |
97 |
- fi |
98 |
- |
99 |
- cd "${CHROOT}" |
100 |
- mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null |
101 |
- echo -ne "${BOLD}.${NORMAL}" |
102 |
- umount /sys || echo '*: Failed to unmount the initrd /sys!' |
103 |
- umount /proc || echo '*: Failed to unmount the initrd /proc!' |
104 |
- echo -e "${BOLD}.${NORMAL}" |
105 |
- |
106 |
- exec switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" |
107 |
-fi |
108 |
- |
109 |
+# If we get here, something bad has happened |
110 |
splash 'verbose' |
111 |
|
112 |
echo 'A fatal error has probably occured since /sbin/init did not' |
113 |
|
114 |
-- |
115 |
gentoo-commits@l.g.o mailing list |