SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-09-17 01:58:40

nolatux
#! Member
From: Covington, LA
Registered: 2010-09-11
Posts: 79

How to Remove the "Please remove the disc, close the tray" Message

This is to remove the hard pause and the CD eject message when powering down Statler, running  from a persistent Live-USB key:

1) Browse (as root) to /etc/init.d/live-boot.
2) Make backup copy of the file.
3) Open file with Gedit (right click and select "Open as root").
4) Remove EXACTLY these lines only: lines 150 - 177 (highlight them and delete).
5) Save file, you are done!

Here are the lines that need to be removed (they start on line 151 but, I take out the line of space at 150):

 

    if [ -z ${QUICKREBOOT} ]
    then

        # Exit if the system was booted from an ISO image rather than a physical CD
        grep -qs find_iso= /proc/cmdline && return 0
        # TODO: i18n
        BOOT_DEVICE="$(get_boot_device)"

        if device_is_USB_flash_drive ${BOOT_DEVICE}
        then
            # do NOT eject USB flash drives!
            # otherwise rebooting with most USB flash drives
            # failes because they actually remember the
            # "ejected" state even after reboot
            MESSAGE="Please remove the USB flash drive"
        else
            # ejecting is a very good idea here
            MESSAGE="Please remove the disc, close the the tray (if any)"

            if [ -x /usr/bin/eject ]
            then
                eject -p -m /live/image >/dev/null 2>&1
            fi

        fi

        [ "$prompt" ] || return 0 

Last edited by nolatux (2010-09-17 17:40:41)


Currently running "Statler" - Openbox edition.

Offline

Help fund CrunchBang, donate to the project!

#2 2010-09-17 07:23:44

rich
#! Junkie
From: barcelona
Registered: 2009-01-26
Posts: 413
Website

Re: How to Remove the "Please remove the disc, close the tray" Message

Very nice little hack. Thanks for sharing smile

Offline

#3 2010-09-17 11:09:50

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to Remove the "Please remove the disc, close the tray" Message

Thanks! I was wondering if it could be done a couple of days ago... (damn! I should have wondered if I could win the lotto or something smile)

Offline

#4 2010-09-17 17:48:19

nolatux
#! Member
From: Covington, LA
Registered: 2010-09-11
Posts: 79

Re: How to Remove the "Please remove the disc, close the tray" Message

Very nice little hack. Thanks for sharing smile

slapfish wrote:

Thanks! I was wondering if it could be done a couple of days ago... (damn! I should have wondered if I could win the lotto or something smile)

LMAO!!!

I found this trick a while ago, on the Backtrack forums and adapted it for use in Statler.

Last edited by nolatux (2010-09-18 07:52:00)


Currently running "Statler" - Openbox edition.

Offline

#5 2010-09-17 17:59:44

Bates
New Member
From: Italy
Registered: 2010-09-17
Posts: 4

Re: How to Remove the "Please remove the disc, close the tray" Message

Useful. Thanks! smile


I'm sorry for my english !

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo