# boot fails on kernels above 2.6.25 on my LiveCD [edited]

## bob doe

Hello folks,

For several months I've been developping a LiveCD based off Gentoo.  In my last version update, I upgraded the kernel from 2.6.25-r9 to 2.6.26-r4

Now the LiveCD wont boot.  First, I get a kernel message: 'ide_generic: I/O resource not free' message which according to another topic is due to a kernel conflict in 26 between SATA and legacy PATA.  Searching my kernel, legacy PATA is not enabled.  Anyways, then Gentoo starts to boot, it gets to 'remounting root filesystem read/write' and then fails with this:

rm: cannot remove `/fastboot' : Read-only filesystem

 * Failed to start /etc/init.d/checkfs

 * One or more critical startup scripts failed to start!

 * Please correct this, and reboot ...

I've no idea what /fastboot is, I dont have any directories with that name.  As for checkfs, I've never modified the file, and it does have all the proper permissions.  Here is my config file: http://rafb.net/p/4gxyaX95.htmlLast edited by bob doe on Fri Jan 30, 2009 4:45 pm; edited 2 times in total

----------

## richard.scott

Are you using Genkernel for creating your kernel and initrd?

If so, what are your boot args for the kernel?

----------

## bob doe

I am not.  I modified the config and compiled the kernel.  and I use an initramfs.

----------

## bob doe

*bump*

I've solved the ide_generic issue by removing it from the kernel, but Im still having the other problem.  The current kernel I've tried is 2.6.27-r7

If I revert to the 2.6.25-r9 kernel, things work fine.

----------

## richard.scott

What's in your isolinux.cfg (or grub.conf) etc for booting the kernel?

----------

## bob doe

This is the content of my /boot/grub/menu.lst:

```
default 0

timeout 5

foreground ffffff

background 0000ff

splashimage=/boot/grub/FLY.xpm.gz

title=FLY

   kernel /boot/vmlinuz root=/dev/ram0 rw cdroot video=uvesafb:1024x768-32,mtrr:3,ywrap quiet CONSOLE=tty1

   initrd /boot/initramfs.igz

title=FLY (no framebuffer)

   kernel /boot/vmlinuz root=/dev/ram0 rw cdroot quiet

   initrd /boot/initramfs.igz

title=Memtest86+

        kernel /boot/memtest86plus/memtest.bin

```

I have no /boot/grub/grub.conf

----------

## richard.scott

I set my cdroot to be 1 on my LiveCD's.... 

```
cdroot=1
```

I don't know if that will help?

----------

## bob doe

No, that did not solve the issue.  For the moment, the only "solution" seems to be to mask kernels above 2.6.25-r9  Which isnt really a solution at all.

----------

## richard.scott

 *bob doe wrote:*   

> No, that did not solve the issue.  For the moment, the only "solution" seems to be to mask kernels above 2.6.25-r9  Which isnt really a solution at all.

 

So what are the differences between kernels then? 

I can't understand how changing kernels will fix the checkfs script error?

----------

## bob doe

Im not sure.  I didnt see anything obvious.

Here's the configs:

2.6.25-r9:

http://rafb.net/p/w2kVM417.html

2.6.27-r7:

http://rafb.net/p/gntyEi28.html

----------

## bob doe

Im still having issues with this, can anyone help?

Here's whats happening during the boot process:

http://img522.imageshack.us/img522/4310/bootzy9.jpg

----------

## richard.scott

remove the "rw" from your kernel args.

----------

## bob doe

Nope, didnt change anything.

Someone on #gentoo wanted to see the difference between the working config and the non-working config, so here it is:

http://rafb.net/p/NhlYZZ96.html

----------

## richard.scott

I'm currently using hardened-sources-2.6.25-r13 on my LiveCD.

I'll rebuild it with gentoo-sources-2.6.27-r7 and see if it works.

----------

## bob doe

Someone suggested I try git-sources but I've never used anything other than gentoo-sources, Im not sure what the differences would be.

----------

## richard.scott

ok, using a genkernel created initrd with gentoo-sources-2.6.27-r7 to make a LiveCD and it works just fine for me   :Rolling Eyes: 

I would therefore assume that the kernel is not the issue but something else.

Thinking about it, when your system boots it first runs a "linuxrc" script inside your initrd to set things up?

If this script doesn't set things up in the way that the latest /etc/init.d boot scripts from baselayout expect then you'd have problems?

Perhaps you need to update your initrd too?.... or perhaps just post the linuxrc script so we can review it?

----------

## bob doe

Since I dont use a Genkernel, I couldnt get an initrd (pre se) working, if you're refering to the old guide from the Gentoo-wiki (not the Catalyst one)

I had to do a lot of diging and experimenting, but I finally got it working with an initramfs.

So anyways, looking at it from start of boot, Grub loads 'initramfs.igz'

That file contains a file called 'init' which is run rather than 'linuxrc'.  The contents of init are:

```
#!/bin/sh

PATH=/bin

CDROM=""

for x in hda hdb hdc hdd cdrom

do

  mount -t iso9660 -r /dev/${x} /cdrom > /dev/null 2>&1

  if [ "$?" = "0" ]

  then

    CDROM="${x}"

    break

  fi

done

if [ "${CDROM}" == "" ]

then

   mount -t proc none /proc

   echo " *** No optical device found ***"

   echo " Please paste the output that follows to http://bugs.criticalsecurity.net"

   echo " along with a detailed list of your computer's hardware."

   echo ""

   /sbin/lspci

   /sbin/sh

fi

mount -v -t squashfs -o loop /cdrom/files/source.img /new > /dev/null 2>&1

mount -t tmpfs -o size=32m none /new/var > /dev/null 2>&1

mount -t tmpfs -o size=32m none /new/etc > /dev/null 2>&1

mount -t tmpfs -o size=64m none /new/tmp > /dev/null 2>&1

mount -t tmpfs -o size=32m none /new/root > /dev/null 2>&1

cd /new/var && tar xpf /cdrom/files/var.tar.gz > /dev/null 2>&1

cd /new/etc && tar xpf /cdrom/files/etc.tar.gz > /dev/null 2>&1

cd /new/root && tar xpf /cdrom/files/root.tar.gz > /dev/null 2>&1

cd /new

mount --move . /

exec chroot . /sbin/init
```

From what I can tell though, this works fine as this process is before the actual /sbin/init which starts booting Gentoo.  I didnt make modifications to /sbin/init though.

The way the init in initramfs.igz works isnt perfect though.  I think because of the mount --move part.

----------

## richard.scott

Wow, that's way different to the genkernel one. Especially the part of mounting the new '/'.

I'd think about emerging genkernel and having a look at /usr/share/genkernel/defaults/linuxrc to see the differences.

Genkernel is dead easy to use too. I used to roll my own kernels but since using genkernel I've never looked back. It does standard kernels, LiveCD kernels NFS booting kernels etc etc.

----------

## bob doe

what does your linuxrc look like?

I've never really used Genkernel..

----------

## richard.scott

the latest genkernel uses this one:

```
#!/bin/sh

. /etc/initrd.defaults

. /etc/initrd.scripts

splash() {

        return 0

}

[ -e /etc/initrd.splash ] && . /etc/initrd.splash

# Clean input/output

exec >${CONSOLE} <${CONSOLE} 2>&1

if [ "$$" != '1' ]

then

        echo '/linuxrc has to be run as the init process as the one'

        echo 'with a PID of 1. Try adding init="/linuxrc" to the'

        echo 'kernel command line or running "exec /linuxrc".'

        exit 1

fi

mount -t proc proc /proc >/dev/null 2>&1

mount -o remount,rw / >/dev/null 2>&1

# Set up symlinks

/bin/busybox --install -s

if [ "$0" = '/init' ]

then

        [ -e /linuxrc ] && rm /linuxrc

        if [ -e /bin/lvm ]

        then

                ln -s /bin/lvm /bin/vgscan

                ln -s /bin/lvm /bin/vgchange

        fi

fi

quiet_kmsg

CMDLINE=`cat /proc/cmdline`

# Scan CMDLINE for any specified real_root= or cdroot arguments

FAKE_ROOT=''

REAL_ROOTFLAGS=''

CRYPT_SILENT=0

for x in ${CMDLINE}

do

        case "${x}" in

                real_root\=*)

                        REAL_ROOT=`parse_opt "${x}"`

                ;;

                root\=*)

                        FAKE_ROOT=`parse_opt "${x}"`

                ;;

                subdir\=*)

                        SUBDIR=`parse_opt "${x}"`

                ;;

                real_init\=*)

                        REAL_INIT=`parse_opt "${x}"`

                ;;

                init_opts\=*)

                        INIT_OPTS=`parse_opt "${x}"`

                ;;

                # Livecd options

                cdroot)

                        CDROOT=1

                ;;

                cdroot\=*)

                        CDROOT=1

                        CDROOT_DEV=`parse_opt "${x}"`

                ;;

                cdroot_type\=*)

                        CDROOT_TYPE=`parse_opt "${x}"`

                ;;

                # Start livecd loop, looptype options

                loop\=*)

                        LOOP=`parse_opt "${x}"`

                ;;

                looptype\=*)

                        LOOPTYPE=`parse_opt "${x}"`

                ;;

                # Start Volume manager options

                dolvm)

                        USE_LVM_NORMAL=1

                ;;

                dolvm2)

                        bad_msg 'Using dolvm2 is deprecated, use dolvm, instead.'

                        USE_LVM_NORMAL=1

                ;;

                domdadm)

                        USE_MDADM=1

                ;;

                dodmraid)

                        USE_DMRAID_NORMAL=1

                ;;

                dodmraid\=*)

                        DMRAID_OPTS=`parse_opt "${x}"`

                        USE_DMRAID_NORMAL=1

                ;;

                doevms)

                        USE_EVMS_NORMAL=1

                ;;

                doevms2)

                        bad_msg 'Using doevms2 is deprecated, use doevms, instead.'

                        USE_EVMS_NORMAL=1

                ;;

                # Debug Options

                debug)

                        DEBUG='yes'

                ;;

                # Scan delay options

                scandelay\=*)

                        SDELAY=`parse_opt "${x}"`

                ;;

                scandelay)

                        SDELAY=10

                ;;

                # Module no-loads

                doload\=*)

                        MDOLIST=`parse_opt "${x}"`

                        MDOLIST="`echo ${MDOLIST} | sed -e 's/,/ /g'`"

                ;;

                nodetect)

                        NODETECT=1

                ;;

                noload\=*)

                        MLIST=`parse_opt "${x}"`

                        MLIST="`echo ${MLIST} | sed -e 's/,/ /g'`"

                        export MLIST

                ;;

                # Redirect output to a specific tty

                CONSOLE\=*|console\=*)

                        CONSOLE=`parse_opt "${x}"`

                        exec >${CONSOLE} <${CONSOLE} 2>&1

                ;;

                # /dev/md

                lvmraid\=*)

                        RAID_DEVICES="`parse_opt ${x}`"

                        RAID_DEVICES="`echo ${RAID_DEVICES} | sed -e 's/,/ /g'`"

                ;;

                part\=*)

                        MDPART=`parse_opt "${x}"`

                ;;

                # NFS

                ip\=*)

                        IP=`parse_opt "${x}"`

                ;;

                nfsroot\=*)

                        NFSROOT=`parse_opt "${x}"`

                ;;

                crypt_root\=*)

                        CRYPT_ROOT=`parse_opt "${x}"`

                ;;

                crypt_swap\=*)

                        CRYPT_SWAP=`parse_opt "${x}"`

                ;;

                root_key\=*)

                        CRYPT_ROOT_KEY=`parse_opt "${x}"`

                ;;

                root_keydev\=*)

                        CRYPT_ROOT_KEYDEV=`parse_opt "${x}"`

                ;;

                swap_key\=*)

                        CRYPT_SWAP_KEY=`parse_opt "${x}"`

                ;;

                swap_keydev\=*)

                        CRYPT_SWAP_KEYDEV=`parse_opt "${x}"`

                ;;

                real_resume\=*)

                        REAL_RESUME=`parse_opt "${x}"`

                ;;

                noresume)

                        NORESUME=1

                ;;

                crypt_silent)

                        CRYPT_SILENT=1

                ;;

                real_rootflags\=*)

                        REAL_ROOTFLAGS=`parse_opt "${x}"`

                ;;

                keymap\=*)

                        keymap=`parse_opt "${x}"`

                ;;

                unionfs)

                        if [ ! -x /sbin/unionfs ]

                        then

                                USE_UNIONFS_NORMAL=0

                                bad_msg 'unionfs binary not found: aborting use of unionfs!'

                        else

                                USE_UNIONFS_NORMAL=1

                        fi

                        ;;

                nounionfs)

                        USE_UNIONFS_NORMAL=0

                        ;;

#                 unionfs\=*)

#                         if [ ! -x /sbin/unionfs ]

#                         then

#                                 USE_UNIONFS_NORMAL=0

#                                 bad_msg 'unionfs binary not found: aborting use of unionfs!'

#                         else

#                                 USE_UNIONFS_NORMAL=1

#                                 CMD_UNIONFS=`parse_opt "${x}"`

#                                 echo ${CMD_UNIONFS}|grep , >/dev/null 2>&1

#                                 if [ "$?" -eq '0' ]

#                                 then

#                                         UID=`echo ${CMD_UNIONFS#*,}`

#                                         UNIONFS=`echo ${CMD_UNIONFS%,*}`

#                                 else

#                                         UNIONFS=${CMD_UNIONFS}

#                                 fi

#                         fi

#                 ;;

        esac

done

if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" -eq 0 \)  -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]

then

        REAL_ROOT="${FAKE_ROOT}"

fi

splash 'init'

detect_sbp2_devices

cmdline_hwopts

# Mount sysfs

mount_sysfs

# Setup hotplugging for firmware loading

setup_hotplug

# Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel

if [ -z "${DO_modules}" ]

then

        good_msg 'Skipping module load; disabled via commandline'

elif [ -d "/lib/modules/${KV}" ]

then

        good_msg 'Loading modules'

        # Load appropriate kernel modules

        if [ "${NODETECT}" != '1' ]

        then

                for modules in ${MY_HWOPTS}

                do

                        modules_scan ${modules}

                done

        fi

        # Always eval doload=...

        modules_load ${MDOLIST}

else

        good_msg 'Skipping module load; no modules in the ramdisk!'

fi

# Delay if needed for USB hardware

sdelay

# Start device manager

start_dev_mgr

# Setup md device nodes if they dont exist

setup_md_device

# Scan volumes

startVolumes

setup_keymap

# Initialize LUKS root device except for livecd's

if [ "${CDROOT}" != 1 ]

then

        startLUKS

        if [ "${NORESUME}" != '1' ] && [ -n "${REAL_RESUME}" ]

        then

                case "${REAL_RESUME}" in

                        LABEL\=*|UUID\=*)

                                RESUME_DEV=""

                                retval=1

                                if [ "${retval}" -ne '0' ]; then

                                        RESUME_DEV=`findfs "${REAL_RESUME}" 2>/dev/null`

                                        retval=$?

                                fi

                                if [ "$retval" -ne '0' ]; then

                                        RESUME_DEV=`busybox findfs "${REAL_RESUME}" 2>/dev/null`

                                        retval=$?

                                fi

                                if [ "${retval}" -ne '0' ]; then

                                        RESUME_DEV=`blkid -t "${REAL_RESUME}" | cut -d ":" -f 1 2>/dev/null`

                                        retval=$?

                                fi

                                if [ "${retval}" -eq '0' ] && [ -n "${RESUME_DEV}" ]; then

                                        good_msg "Detected real_resume=${RESUME_DEV}"

                                        REAL_RESUME="${RESUME_DEV}"

                                fi

                                ;;

                esac

                swsusp_resume

#               suspend_resume

                tuxonice_resume

        fi

fi

mkdir -p "${NEW_ROOT}"

CHROOT="${NEW_ROOT}"

# Run debug shell if requested

rundebugshell

if [ "${CDROOT}" = '1' ]

then

        good_msg "Making tmpfs for ${NEW_ROOT}"

        mount -n -t tmpfs tmpfs "${NEW_ROOT}"

        for i in dev mnt mnt/cdrom mnt/livecd mnt/key tmp tmp/.initrd mnt/gentoo sys

        do

                mkdir -p "${NEW_ROOT}/${i}"

                chmod 755 "${NEW_ROOT}/${i}"

        done

        [ ! -e "${NEW_ROOT}/dev/null" ] && mknod "${NEW_ROOT}"/dev/null c 1 3

        [ ! -e "${NEW_ROOT}/dev/console" ] && mknod "${NEW_ROOT}"/dev/console c 5 1

        # For SGI LiveCDs ...

        if [ "${LOOPTYPE}" = "sgimips" ]

        then

                [ ! -e "${NEW_ROOT}/dev/sr0" ] && mknod "${NEW_ROOT}/dev/sr0" b 11 0

                [ ! -e "${NEW_ROOT}/dev/loop0" ] && mknod "${NEW_ROOT}/dev/loop0" b 7 0

        fi

        # Required for splash to work.  Not an issue with the initrd as this

        # device isn't created there and is not needed.

        if [ -e /dev/tty1 ]

        then

                [ ! -e "${NEW_ROOT}/dev/tty1" ] && mknod "${NEW_ROOT}/dev/tty1" c 4 1

        fi

        if [ "${REAL_ROOT}" != "/dev/nfs" ] && [ "${LOOPTYPE}" != "sgimips" ]

        then

                bootstrapCD

        fi

        if [ "${REAL_ROOT}" = '' ]

        then

                echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waiting for new devices"

                COUNTER=0

                while [ ${COUNTER} -lt 3 ]; do

                        sleep 3

                        echo -n '.'

                        let COUNTER=${COUNTER}+1

                done

                sleep 1

                echo -e "${NORMAL}"

                bootstrapCD

        fi

        if [ "${REAL_ROOT}" = '' ]

        then

                # Undo stuff

                umount  "${NEW_ROOT}/dev" 2>/dev/null

                umount  "${NEW_ROOT}/sys" 2>/dev/null

                umount /sys 2>/dev/null

                umount  "${NEW_ROOT}"

                rm -rf  "${NEW_ROOT}/*"

                bad_msg 'Could not find CD to boot, something else needed!'

                CDROOT=0

        fi

fi

# Determine root device

good_msg 'Determining root device...'

while true

do

        while [ "${got_good_root}" != '1' ]

        do

                case "${REAL_ROOT}" in

                        LABEL\=*|UUID\=*)

                                ROOT_DEV=""

                                retval=1

                                if [ "${retval}" -ne '0' ]; then

                                        ROOT_DEV=`findfs "${REAL_ROOT}" 2>/dev/null`

                                        retval=$?

                                fi

                                if [ "$retval" -ne '0' ]; then

                                        ROOT_DEV=`busybox findfs "${REAL_ROOT}" 2>/dev/null`

                                        retval=$?

                                fi

                                if [ "${retval}" -ne '0' ]; then

                                        ROOT_DEV=`blkid -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/null`

                                        retval=$?

                                fi

                                if [ "${retval}" -eq '0' ] && [ -n "${ROOT_DEV}" ]; then

                                        good_msg "Detected real_root=${ROOT_DEV}"

                                        REAL_ROOT="${ROOT_DEV}"

                                else

                                        whereis "REAL_ROOT" "root block device"

                                        got_good_root=0

                                        continue

                                fi

                                ;;

                esac

                if [ "${REAL_ROOT}" = '' ]

                then

                        # No REAL_ROOT determined/specified. Prompt user for root block device.

                        whereis "REAL_ROOT" "root block device"

                        got_good_root=0

                # Check for a block device or /dev/nfs

                elif [ -b "${REAL_ROOT}" ] || [ "${REAL_ROOT}" = "/dev/nfs" ]

                then

                        got_good_root=1

                else

                        bad_msg "Block device ${REAL_ROOT} is not a valid root device..."

                        REAL_ROOT=""

                        got_good_root=0

                fi

        done

        if [ "${CDROOT}" = 1 -a "${got_good_root}" = '1' -a "${REAL_ROOT}" != "/dev/nfs" ]

        then

                # CD already mounted; no further checks necessary

                break

        elif [ "${LOOPTYPE}" = "sgimips" ]

        then

                # sgimips mounts the livecd root partition directly

                # there is no isofs filesystem to worry about

                break

        else

                good_msg "Mounting root..."

                # Try to mount the device as ${NEW_ROOT}

                if [ "${REAL_ROOT}" = '/dev/nfs' ]; then

                        findnfsmount

                else

                        # mount ro so fsck doesn't barf later

                        if [ "${REAL_ROOTFLAGS}" = '' ]; then

                                mount -o ro ${REAL_ROOT} ${NEW_ROOT}

                        else

                                good_msg "Using mount -o ro,${REAL_ROOTFLAGS}"

                                mount -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_ROOT}

                        fi

                fi

                # If mount is successful break out of the loop

                # else not a good root and start over.

                if [ "$?" = '0' ]

                then

                        if [ -d ${NEW_ROOT}/dev -a -x ${NEW_ROOT}/sbin/init ] || [ "${REAL_ROOT}" = "/dev/nfs" ]

                        then

                                break

                        else

                                bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"

                                got_good_root=0

                                REAL_ROOT=''

                        fi

                else

                        bad_msg "Could not mount specified ROOT, try again"

                        got_good_root=0

                        REAL_ROOT=''

                fi

        fi

done

# End determine root device

#verbose_kmsg

# If CD root is set determine the looptype to boot

if [ "${CDROOT}" = '1' ]

then

        good_msg 'Determining looptype ...'

        cd "${NEW_ROOT}"

        # Find loop and looptype

        [ -z "${LOOP}" ] && find_loop

        [ -z "${LOOPTYPE}" ] && find_looptype

        cache_cd_contents

        # If encrypted, find key and mount, otherwise mount as usual

        if [ -n "${CRYPT_ROOT}" ]

        then

                CRYPT_ROOT_KEY="$(head -n 1 ${NEW_ROOT}/mnt/cdrom/livecd)"

                CRYPT_ROOT='/dev/loop0'

                good_msg 'You booted an encrypted livecd' "${CRYPT_SILENT}"

                losetup /dev/loop0 "${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}"

                test_success 'Preparing loop filesystem'

                startLUKS

                case ${LOOPTYPE} in

                        normal)

                                MOUNTTYPE="ext2"

                                ;;

                        *)

                                MOUNTTYPE="${LOOPTYPE}"

                                ;;

                esac

                mount -t "${MOUNTTYPE}" -o ro /dev/mapper/root "${NEW_ROOT}/mnt/livecd"

                test_success 'Mount filesystem'

                FS_LOCATION='mnt/livecd'

        # Setup the loopback mounts, if unencrypted

        else

                if [ "${LOOPTYPE}" = 'normal' ]

                then

                        good_msg 'Mounting loop filesystem'

                        mount -t ext2 -o loop,ro "${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}" "${NEW_ROOT}/mnt/livecd"

                        test_success 'Mount filesystem'

                        FS_LOCATION='mnt/livecd'

                elif [ "${LOOPTYPE}" = 'squashfs' ]

                then

                        good_msg 'Mounting squashfs filesystem'

                        mount -t squashfs -o loop,ro "${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}" "${NEW_ROOT}/mnt/livecd"

                        test_success 'Mount filesystem'

                        FS_LOCATION='mnt/livecd'

                elif [ "${LOOPTYPE}" = 'gcloop' ]

                then

                        good_msg 'Mounting gcloop filesystem'

                        echo ' ' | losetup -E 19 -e ucl-0 -p0 "${NEW_ROOT}/dev/loop0" "${NEW_ROOT}/mnt/cdrom/${LOOPEXT}${LOOP}"

                        test_success 'losetup the loop device'

                        mount -t ext2 -o ro "${NEW_ROOT}/dev/loop0" "${NEW_ROOT}/mnt/livecd"

                        test_success 'Mount the losetup loop device'

                        FS_LOCATION='mnt/livecd'

                elif [ "${LOOPTYPE}" = 'zisofs' ]

                then

                        FS_LOCATION="mnt/cdrom/${LOOPEXT}${LOOP}"

                elif [ "${LOOPTYPE}" = 'noloop' ]

                then

                        FS_LOCATION='mnt/cdrom'

                elif [ "${LOOPTYPE}" = 'sgimips' ]

                then

                        # getdvhoff finds the starting offset (in bytes) of the squashfs

                        # partition on the cdrom and returns this offset for losetup

                        #

                        # All currently supported SGI Systems use SCSI CD-ROMs, so

                        # so we know that the CD-ROM is usually going to be /dev/sr0.

                        #

                        # We use the value given to losetup to set /dev/loop0 to point

                        # to the liveCD root partition, and then mount /dev/loop0 as

                        # the LiveCD rootfs

                        good_msg 'Locating the SGI LiveCD Root Partition'

                        echo ' ' | \

                                losetup -o $(getdvhoff "${NEW_ROOT}${REAL_ROOT}" 0) \

                                        "${NEW_ROOT}${CDROOT_DEV}" \

                                        "${NEW_ROOT}${REAL_ROOT}"

                        test_success 'losetup /dev/sr0 /dev/loop0'

                        good_msg 'Mounting the Root Partition'

                        mount -t squashfs -o ro "${NEW_ROOT}${CDROOT_DEV}" "${NEW_ROOT}/mnt/livecd"

                        test_success 'mount /dev/loop0 /'

                        FS_LOCATION='mnt/livecd'

                fi

        fi

        # Unpacking additional packages from NFS mount

        # This is useful for adding kernel modules to /lib

        # We do this now, so that additional packages can add whereever they want.

        if [ "${REAL_ROOT}" = '/dev/nfs' ]

        then

                if [ -e "${NEW_ROOT}/mnt/cdrom/add" ]

                then

                                for targz in `ls ${NEW_ROOT}/mnt/cdrom/add/*.tar.gz`

                                do

                                        tarname=`basename ${targz}`

                                        good_msg "Adding additional package ${tarname}"

                                        (cd ${NEW_ROOT} ; /bin/tar -xzf ${targz})

                                done

                fi

        fi

        if [ "${USE_UNIONFS_NORMAL}" = '1' ]

        then

                setup_unionfs ${NEW_ROOT} ${NEW_ROOT}/${FS_LOCATION}

                CHROOT=/union

        else

        good_msg "Copying read-write image contents to tmpfs"

        # Copy over stuff that should be writable

        (cd "${NEW_ROOT}/${FS_LOCATION}"; cp -a ${ROOT_TREES} "${NEW_ROOT}")

        # Now we do the links.

        for x in ${ROOT_LINKS}

        do

                if [ -L "${NEW_ROOT}/${FS_LOCATION}/${x}" ]

                then

                        ln -s "`readlink ${NEW_ROOT}/${FS_LOCATION}/${x}`" "${x}" 2>/dev/null

                else

                        # List all subdirectories of x

                        find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null | while read directory

                        do

                                # Strip the prefix of the FS_LOCATION

                                directory="${directory#${NEW_ROOT}/${FS_LOCATION}/}"

                                # Skip this directory if we already linked a parent directory

                                if [ "${curent_parrent}" != '' ]; then

                                        var=`echo "${directory}" | grep "^${curent_parrent}"`

                                        if [ "${var}" != '' ]; then

                                                continue

                                        fi

                                fi

                                # Test if the directory exists already

                                if [ -e "/${NEW_ROOT}/${directory}" ]

                                then

                                        # It does exist, link all the individual files

                                        for file in `ls /${NEW_ROOT}/${FS_LOCATION}/${directory}`

                                        do

                                        if [ ! -d "/${NEW_ROOT}/${FS_LOCATION}/${directory}/${file}" ] && [ ! -e "${NEW_ROOT}/${directory}/${file}" ]; then

                                                        ln -s "/${FS_LOCATION}/${directory}/${file}" "${directory}/${file}" 2> /dev/null

                                                fi

                                        done

                                else

                                        # It does not exist, make a link to the livecd

                                        ln -s "/${FS_LOCATION}/${directory}" "${directory}" 2>/dev/null

                                        current_parent="${directory}"

                                fi

                        done

                fi

        done

        if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]

        then

                sleep 10

        fi

        mkdir initramfs proc tmp sys 2>/dev/null

        chmod 1777 tmp

        fi

        #UML=`cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||'`

        #if [ "${UML}" = 'UML' ]

        #then

        #       # UML Fixes

        #       good_msg 'Updating for uml system'

        #fi

        # Let Init scripts know that we booted from CD

        export CDBOOT

        CDBOOT=1

        check_slowusb

        if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]

        then

                sleep 10

        fi

else

        if [ "${USE_UNIONFS_NORMAL}" = '1' ]

        then

                mkdir /union_changes

                mount -t tmpfs tmpfs /union_changes

                setup_unionfs /union_changes ${NEW_ROOT}

                mkdir -p ${UNION}/tmp/.initrd

        fi

fi

# Execute script on the cdrom just before boot to update things if necessary

cdupdate

if [ "${SUBDIR}" != '' -a -e "${CHROOT}/${SUBDIR}" ]

then

        good_msg "Entering ${SUBDIR} to boot"

        CHROOT="${CHROOT}/${SUBDIR}"

fi

verbose_kmsg

echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"

if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ]

then

        echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing files required to boot (console and null)${NORMAL}"

elif [ -e /etc/initrd.splash -a ! -e "${CHROOT}/dev/tty1" ]

then

        echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing tty1, which is required for splash${NORMAL}"

fi

cd "${CHROOT}"

mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null

echo -ne "${BOLD}.${NORMAL}"

umount /sys || echo '*: Failed to unmount the ramdisk /sys!'

umount /proc || echo '*: Failed to unmount the ramdisk /proc!'

echo -e "${BOLD}.${NORMAL}"

exec /sbin/switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}"

# If we get here, something bad has happened

splash 'verbose'

echo 'A fatal error has probably occured since /sbin/init did not'

echo 'boot correctly. Trying to open a shell...'

echo

exec /bin/bash

exec /bin/sh

exec /bin/ash

exec sh

```

----------

## bob doe

forget I asked!  :Razz:   Thats a lot bigger than I thought it would be!

I searched the forums again for 'fastboot' and came up with this topic: https://forums.gentoo.org/viewtopic-t-725930-highlight-fastboot.html

Specifically the 5th and 7th posts.  His booting also had the same failure as mine.

Although I cant really move rw, I did some fooling around in Grub.  Im not done testing, but removing 'rw cdroot' did allow the LiveCD to boot, although then I got a complaint about the kernel modules being read-only.  I'll play around.

On the upside, it seems the new kernel has also fixed an issue that I had a random 8mb /dev/sda device for no apparent reason!

Do you know where I could get more info on rw and cdroot?

[EDIT]

It seems removing only 'cdroot' from the Grub boot line solves the issue, but with it I still get the read-only error for kernel modules (but it continues to boot)

----------

## richard.scott

LOL, yes it does include a lot of functions for all situations   :Cool: 

Somewhere in the linuxrc script they convert the cdroot into a cdboot variable:

```
# Let Init scripts know that we booted from CD

export CDBOOT

CDBOOT=1

```

Perhaps trying including that in your script?

----------

