From: Tim Yamin Date: Sun, 11 Apr 2004 14:20:41 +0000 (+0000) Subject: Bugfixes for bugs #46941, #46641; and a cosmetic fix for LiveCD mount issues. X-Git-Tag: v3.4.10.902~648 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=02f79749d05ce73cb75bdea57e245db90ccc7b07;p=genkernel.git Bugfixes for bugs #46941, #46641; and a cosmetic fix for LiveCD mount issues. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@104 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_funcs.sh b/gen_funcs.sh index d177a81..8395bd2 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -207,7 +207,8 @@ gen_die() { } has_loop() { - if [ -e "/dev/loop0" -o -e "/dev/loop/0" ] + dmesg | egrep -q '^loop:' + if [ -e "/dev/loop0" -o -e "/dev/loop/0" -a $? ] then # We found devfs or standard dev loop device, assume # loop is compiled into the kernel or the module is loaded diff --git a/generic/linuxrc b/generic/linuxrc index a6d1e70..65a21cf 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -326,6 +326,8 @@ then mount -t proc proc /proc umount /tmp/.initrd/proc > /dev/null 2>&1 || echo "*: Failed to unmount /tmp/.initrd/proc!" umount /dev > /dev/null 2>&1 + mount -n --move /tmp/.initrd/dev dev || echo '*: Failed to move over the /dev tree!' + rm /tmp/.initrd/dev -rf || '*: Failed to remove the initrd /dev!' umount /proc > /dev/null 2>&1 fi echo -n '.' diff --git a/genkernel b/genkernel index fa1eb35..71e0df3 100755 --- a/genkernel +++ b/genkernel @@ -38,7 +38,7 @@ then exit 1 fi -NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}" +NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}" # Set ${ARCH} get_official_arch @@ -53,14 +53,20 @@ source ${GK_SHARE}/${ARCH}/modules_load || gen_die "could not read ${GK_SHARE}/$ # get the real args for use. determine_real_args -NORMAL=${BOLD} print_info 1 "Compiling Linux Kernel ${WARN}${KV}${BOLD} for ${WARN}${ARCH}${BOLD}..." +NORMAL=${BOLD} print_info 1 "Compiling Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." echo if ! has_loop then - print_error print_info 1 "Your kernel does not appear to have loop device support. " - print_error print_info 1 "Please 'modprobe loop' if it is a module before running genkernel" - gen_die "Load loop support!" + modprobe loop 2>/dev/null + if ! has_loop + then + print_error 1 "Your kernel does not appear to have loop device support. " + print_error 1 "Please load loop support before running genkernel!" + gen_die "Load loop support!" + else + print_info 1 'loop: "loop" module loaded successfully...' + fi fi # Check /boot is mounted @@ -72,6 +78,8 @@ then then print_warning 1 "${BOLD}WARNING${NORMAL}: Failed to mount /boot!" echo + else + print_info 1 "mount: /boot mounted successfully!" fi else print_warning 1 "${BOLD}WARNING${NORMAL}: No mounted /boot partition detected!" @@ -184,6 +192,7 @@ print_info 1 "Kernel compiled successfully!" print_info 1 '' print_info 1 "Required Kernel Parameters:" print_info 1 ' root=/dev/ram0 real_root=/dev/$ROOT init=/linuxrc' +[ "${INITRD_SIZE}" -gt 4096 ] && print_info 1 " ramdisk_size=${INITRD_SIZE}" print_info 1 ' [ And "vga=0x317 splash=verbose" if you use a framebuffer ]' print_info 1 '' print_info 1 ' Where $ROOT is the device node for your root partition as the'