Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171568 - catalyst livecd doesn't power off or reboot
Summary: catalyst livecd doesn't power off or reboot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: High critical
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-20 14:37 UTC by Richard Scott
Modified: 2007-03-20 16:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scott 2007-03-20 14:37:59 UTC
I have noticed an issue with livecd's not rebooting or powering off. In the file /etc/init.d/halt.sh there is the following:

# Check to see if this is a livecd, if it is read the commandline
# this mainly makes sure $CDBOOT is defined if it's a livecd
[[ -f /sbin/livecd-functions.sh ]] && \
        source /sbin/livecd-functions.sh && \
        livecd_read_commandline

# Check to see if this is a livecd, if it is read the commandline
# this mainly makes sure $CDBOOT is defined if it's a livecd
[[ -f /sbin/livecd-functions.sh ]] && \
        source /sbin/livecd-functions.sh && \
        livecd_read_commandline

# livecd-functions.sh should _ONLY_ set this differently if CDBOOT is
# set, else the default one should be used for normal boots.
# say:  RC_NO_UMOUNTS="/mnt/livecd|/newroot"
RC_NO_UMOUNTS=${RC_NO_UMOUNTS:-^(/|/dev|/dev/pts|/lib/rcscripts/init.d|/proc|/proc/.*|/sys)$}



Am I correct in thinking that the value of RC_NO_UNMOUNTS should be set by the livecd-functions.sh scripts? If so, the this is not happening.

Perhaps we should change the /etc/init.d/halt.sh lines to be something like:

if [ -n "${CDBOOT}" ]; then 
  RC_NO_UMOUNTS="/mnt/livecd|/newroot"
else
  RC_NO_UMOUNTS=${RC_NO_UMOUNTS:-^(/|/dev|/dev/pts|/lib/rcscripts/init.d|/proc|/proc/.*|/sys)$}
fi

This will enable the CD's to power off correctly.

Reproducible: Always

Steps to Reproduce:
1. create a cd image with catalyst
2. boot from the cd
3. try and reboot or power off

Actual Results:  
you'll get an error about being unable to unmount loopback filesystems.

Expected Results:  
power off or clean reboot.
Comment 1 Richard Scott 2007-03-20 14:42:58 UTC
ok, I understand a little more about the bash used and realise that we just need to get the livecd_read_commandline function to set the RC_NO_UMOUNTS variable.

This will make things work correctly then.

So the real fix for this will be changing the lines in /sbin/livecd-functions.sh from this:

                        cdroot)
                                CDBOOT="yes"
                                export CDBOOT
                        ;;
                        cdroot\=*)
                                CDBOOT="yes"
                                export CDBOOT
                        ;;


to this:

                        cdroot)
                                CDBOOT="yes"
                                export CDBOOT
                                RC_NO_UMOUNTS="/mnt/livecd|/newroot"
                                export RC_NO_UMOUNTS
                        ;;
                        cdroot\=*)
                                CDBOOT="yes"
                                export CDBOOT
                                RC_NO_UMOUNTS="/mnt/livecd|/newroot"
                                export RC_NO_UMOUNTS
                        ;;

I hope this feedback helps :-)
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2007-03-20 16:54:20 UTC
This was done in SVN last week.  ;]
Comment 3 Richard Scott 2007-03-20 16:55:55 UTC
LOL...sweet! :-)

Many thanks for all your hard work on Gentoo!