| | 35 | problem() { |
|---|
| | 36 | cat <<"EOF" |
|---|
| | 37 | The problem may be caused by the fact that ISA IDE and SCSI adapters are |
|---|
| | 38 | no longer attempted to be autodetected. If you use such hardware, load the |
|---|
| | 39 | proper driver manually with the "modprobe" command and exit from this shell. |
|---|
| | 40 | For old IDE controllers, the correct module name is "ide-generic", or, if |
|---|
| | 41 | you want to use the new libata-based driver, "pata-legacy". To avoid this |
|---|
| | 42 | message next time you boot this CD, use a kernel command line like this: |
|---|
| | 43 | linux load=ide-generic |
|---|
| | 44 | |
|---|
| | 45 | This problem can be also caused by a slow SCSI controller or USB/FireWire |
|---|
| | 46 | CD-ROM that needs more time to be detected. If you see any kernel messages |
|---|
| | 47 | below, this is the case. In this case, it is sufficient to type "exit", |
|---|
| | 48 | and the CD will continue the boot process. To avoid this message next |
|---|
| | 49 | ime you boot this CD, use a kernel command line like this: |
|---|
| | 50 | linux rootdelay=20 |
|---|
| | 51 | |
|---|
| | 52 | Dropping you to a shell. |
|---|
| | 53 | |
|---|
| | 54 | EOF |
|---|
| | 55 | sh |
|---|
| | 56 | } |
|---|
| | 57 | |
|---|
| 40 | | echo "Cannot resume from device $resume, which doesn't exist" |
|---|
| | 68 | cat <<EOF |
|---|
| | 69 | The specified resume device ${resume} doesn't exist. |
|---|
| | 70 | Please fix this problem and exit this shell. If you don't want to resume, |
|---|
| | 71 | type "exit". |
|---|
| | 72 | |
|---|
| | 73 | EOF |
|---|
| | 74 | problem |
|---|
| | 75 | # Retry |
|---|
| | 76 | if [ -b ${resume} ] ; then |
|---|
| | 77 | eval echo $( stat -L -c '$(( 0x%t )):$(( 0x%T ))' ${resume} ) >/sys/power/resume |
|---|
| | 78 | # MC syntax highlighting is buggy ' |
|---|
| | 79 | else |
|---|
| | 80 | cat <<EOF |
|---|
| | 81 | The specified resume device ${resume} still doesn't exist. |
|---|
| | 82 | Assuming that you don't want to resume. |
|---|
| | 83 | EOF |
|---|
| | 84 | fi |
|---|
| 110 | | if [ ! -L /dev/lfs-cd ] ; then |
|---|
| 111 | | echo "LFS LiveCD not found." |
|---|
| 112 | | TRIES=5 |
|---|
| 113 | | DELAY=6 # 30 seconds total |
|---|
| 114 | | |
|---|
| 115 | | for (( ; i<=$TRIES ; i++ )) ; do |
|---|
| 116 | | [ -L /dev/lfs-cd ] && break |
|---|
| 117 | | |
|---|
| 118 | | echo -n "Retry attempt $i of $TRIES... " |
|---|
| 119 | | sleep $DELAY |
|---|
| 120 | | find_cd |
|---|
| 121 | | |
|---|
| 122 | | [ -L /dev/lfs-cd ] && echo "success!" || echo "failed!" |
|---|
| 123 | | done |
|---|
| 124 | | fi |
|---|
| 125 | | |
|---|
| 126 | | if [ ! -L /dev/lfs-cd ] ; then |
|---|
| 127 | | echo "" |
|---|
| 128 | | echo "LFS LiveCD could not find its device, perhaps due to" |
|---|
| 129 | | echo "unsupported or undetected hardware. Or maybe this is" |
|---|
| 130 | | echo "just a slow SCSI or USB controller that needs more time" |
|---|
| 131 | | echo "to settle (workaround: add rootdelay=30 to the kernel" |
|---|
| 132 | | echo "command line in the boot loader)." |
|---|
| 133 | | echo "" |
|---|
| 134 | | echo "Dropping you to a shell." |
|---|
| 135 | | echo "Please load the needed modules and, optionally, make" |
|---|
| 136 | | echo "/dev/lfs-cd a symlink pointing to the correct device." |
|---|
| 137 | | echo "" |
|---|
| 138 | | sh |
|---|
| | 154 | if [ ! -b /dev/lfs-cd ] ; then |
|---|
| | 155 | cat <<"EOF" |
|---|
| | 156 | |
|---|
| | 157 | LFS LiveCD could not find its device, perhaps due to unsupported or |
|---|
| | 158 | undetected hardware. Please fix this problem and exit this shell. |
|---|
| | 159 | |
|---|
| | 160 | EOF |
|---|
| | 161 | problem |
|---|
| 175 | | mount -n -t "$rootfstype" -o "$rootflags" "$DEVICE" /.tmpfs/.partition |
|---|
| 176 | | /sbin/losetup /dev/loop3 "/.tmpfs/.partition/$FILE" |
|---|
| | 202 | while [ ! -b "$DEVICE" ] ; do |
|---|
| | 203 | cat <<EOF |
|---|
| | 204 | |
|---|
| | 205 | The device ${DEVICE}, which is supposed to contain a file |
|---|
| | 206 | with the ISO9660 image of the LFS LiveCD, does not exist. |
|---|
| | 207 | Please fix this problem and exit this shell. |
|---|
| | 208 | |
|---|
| | 209 | EOF |
|---|
| | 210 | problem |
|---|
| | 211 | done |
|---|
| | 212 | if ! mount -n -t "$rootfstype" -o "$rootflags" "$DEVICE" /.tmpfs/.partition ; then |
|---|
| | 213 | cat <<EOF |
|---|
| | 214 | |
|---|
| | 215 | Could not mount device ${DEVICE} |
|---|
| | 216 | (but it does exist, please mention this when asking for support). |
|---|
| | 217 | Sleeping forever. Please reboot and fix the kernel command line. |
|---|
| | 218 | |
|---|
| | 219 | Maybe you have put the ISO9660 image of the LiveCD onto a partition |
|---|
| | 220 | formatted with an unsupported file system? |
|---|
| | 221 | |
|---|
| | 222 | Or maybe filesystem type autodetection went wrong, in which case |
|---|
| | 223 | you should add rootfstype=... to the kernel command line. |
|---|
| | 224 | |
|---|
| | 225 | Available partitions: |
|---|
| | 226 | EOF |
|---|
| | 227 | cat /proc/partitions |
|---|
| | 228 | while true ; do sleep 10000 ; done |
|---|
| | 229 | fi |
|---|
| | 230 | if [ ! -f "/.tmpfs/.partition/$FILE" ] ; then |
|---|
| | 231 | cat <<EOF |
|---|
| | 232 | |
|---|
| | 233 | The file ${FILE} does not exist on the device ${DEVICE}. |
|---|
| | 234 | Sleeping forever. Please reboot and fix the kernel command line. |
|---|
| | 235 | |
|---|
| | 236 | Maybe you have specified a wrong device or file name? Does the following |
|---|
| | 237 | list of files on the partition look right? |
|---|
| | 238 | EOF |
|---|
| | 239 | ( cd /.tmpfs/.partition ; ls ) |
|---|
| | 240 | umount -n /.tmpfs/.partition |
|---|
| | 241 | while true ; do sleep 10000 ; done |
|---|
| | 242 | fi |
|---|
| | 243 | losetup /dev/loop3 "/.tmpfs/.partition/$FILE" |
|---|
| | 258 | /dev/*) |
|---|
| | 259 | while [ ! -b "$root" ] ; do |
|---|
| | 260 | cat <<EOF |
|---|
| | 261 | The device ${root}, which is supposed to contain the |
|---|
| | 262 | root file system, does not exist. |
|---|
| | 263 | Please fix this problem and exit this shell. |
|---|
| | 264 | |
|---|
| | 265 | EOF |
|---|
| | 266 | problem |
|---|
| | 267 | done |
|---|
| | 268 | if ! mount -n -t "$rootfstype" -o "$rootflags" "$root" /.root ; then |
|---|
| | 269 | cat <<EOF |
|---|
| | 270 | |
|---|
| | 271 | Could not mount device ${root} |
|---|
| | 272 | Sleeping forever. Please reboot and fix the kernel command line. |
|---|
| | 273 | |
|---|
| | 274 | Maybe the device is formatted with an unsupported file system? |
|---|
| | 275 | |
|---|
| | 276 | Or maybe filesystem type autodetection went wrong, in which case |
|---|
| | 277 | you should add the rootfstype=... parameter to the kernel command line. |
|---|
| | 278 | |
|---|
| | 279 | Available partitions: |
|---|
| | 280 | EOF |
|---|
| | 281 | cat /proc/partitions |
|---|
| | 282 | while true ; do sleep 10000 ; done |
|---|
| | 283 | fi |
|---|
| | 284 | ;; |
|---|
| 193 | | mount -n -t "$rootfstype" -o "$rootflags" /dev/root /.root |
|---|
| 194 | | ;; |
|---|
| 195 | | /dev/*) |
|---|
| 196 | | mount -n -t "$rootfstype" -o "$rootflags" "$root" /.root |
|---|
| | 287 | if ! mount -n -t "$rootfstype" -o "$rootflags" /dev/root /.root ; then |
|---|
| | 288 | cat <<EOF |
|---|
| | 289 | |
|---|
| | 290 | Could not mount device $root |
|---|
| | 291 | Sleeping forever. Please reboot and fix the kernel command line. |
|---|
| | 292 | |
|---|
| | 293 | Maybe the device is formatted with an unsupported file system? |
|---|
| | 294 | |
|---|
| | 295 | Or maybe filesystem type autodetection went wrong, in which case |
|---|
| | 296 | you should add the rootfstype=... parameter to the kernel command line. |
|---|
| | 297 | |
|---|
| | 298 | Available partitions: |
|---|
| | 299 | EOF |
|---|
| | 300 | cat /proc/partitions |
|---|
| | 301 | while true ; do sleep 10000 ; done |
|---|
| | 302 | fi |
|---|