How to stop the warning: Do not remove USB drive?

Using applications, configuring, problems
Message
Author
User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

How to stop the warning: Do not remove USB drive?

#1 Post by markofkane »

Every Time I bootup with Puppy with a USB drive, I get the warning "Do not remove USB drive"

OK, I know it, and I want it to stop reminding me. Any edits I can do to stop it?

Thanks

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

Whilst you await a more sensible suggestion . . .
. . . here is a quick fix :wink:

Image
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
floborg
Posts: 199
Joined: Thu 25 Oct 2007, 12:12
Location: Fort Worth, TX

#3 Post by floborg »

I've made some changes to the initrd.gz file and init script that will unmount the drive when copied to RAM (w/o pupsave file). A file within the puppy SFS must be modifed as well to get rid of the warning when the drive is unmounted. See this thread:

LiveHD & LiveUSB Boot

If all you want to do is get rid of that warning, and you have a pupsave, you would just need to edit the warning out of the delayedrun file.
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#4 Post by markofkane »

Where what file and where is it do I replace?

I just want to get rid of the warning.

Thanks.

Some I found were read only, so I could not save changes.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#5 Post by Béèm »

Start by taking the blindfold off and look in the url floborg gave you.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#6 Post by markofkane »

I looked, but I could not understand it. I have to know What I am modifying and where it its.

I tried umount, but it said it could not unmount, resource was busy.

Either I'll have to wait for an update, or live with it. (The fact my CD drive was running all the time was the reason I stuck Puppy 3.21 on the USB drive)
Last edited by markofkane on Sat 23 May 2009, 21:16, edited 1 time in total.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#7 Post by Béèm »

Making changes in the initrd.gz is a hazardous business.
You can break your system if not well done.
I can't help with it.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#8 Post by markofkane »

I guess so.

Well, like I said, I'll just have to live with it until there is an official update, if any. (or patch, or anything)

Bruce B

#9 Post by Bruce B »

markofkane

Looking over 4.00 routine, here is your culprit, (unwanted feature, (bell or whistle) ).

Code: Select all

#v2.16 popup a warning if booting from usb flash...
if [ "$PMEDIA" = "usbflash" ];then
 yaf-splash -font "8x16" -outline 0 -margin 4 -bg yellow -text "WARNING! Do not unplug USB Flash drive!" &
 X1PID=$!
 X1RET=$?
 sleep 3
 [ $X1RET -eq 0 ] && kill $X1PID
fi
The commands will run only if condition test is true. Make it false as shown below with one simple edit. Optionally
you can remove the entire block of code. But the edit
might be easier for you. Your choice.

File is /usr/sbin/delayedrun

from
if [ "$PMEDIA" = "usbflash" ];then

to
if [ "$PMEDIA" = "xyz" ];then

Bruce

~
Last edited by Bruce B on Sun 24 May 2009, 00:24, edited 1 time in total.

Bruce B

#10 Post by Bruce B »

markofkane wrote: Well, like I said, I'll just have to live with it until there is an official update, if any. (or patch, or anything)
An intentional feature, which is working as intended, is not
likely to get patched. But it's easy enough to 'fix' if you don't
like it.

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#11 Post by markofkane »

Thanks, I'll check it out. :)

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#12 Post by markofkane »

Worked like a charm!! thanks!!
Bruce B wrote:markofkane

Looking over 4.00 routine, here is your culprit, (unwanted feature, (bell or whistle) ).

Code: Select all

#v2.16 popup a warning if booting from usb flash...
if [ "$PMEDIA" = "usbflash" ];then
 yaf-splash -font "8x16" -outline 0 -margin 4 -bg yellow -text "WARNING! Do not unplug USB Flash drive!" &
 X1PID=$!
 X1RET=$?
 sleep 3
 [ $X1RET -eq 0 ] && kill $X1PID
fi
The commands will run only if condition test is true. Make it false as shown below with one simple edit. Optionally
you can remove the entire block of code. But the edit
might be easier for you. Your choice.

File is /usr/sbin/delayedrun

from
if [ "$PMEDIA" = "usbflash" ];then

to
if [ "$PMEDIA" = "xyz" ];then

Bruce

~

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#13 Post by markofkane »

Bruce B wrote:
markofkane wrote: Well, like I said, I'll just have to live with it until there is an official update, if any. (or patch, or anything)
An intentional feature, which is working as intended, is not
likely to get patched. But it's easy enough to 'fix' if you don't
like it.

I did not actually mean the popup, but the fact that Puppy 4.21 locks the drives. Where as 4.12 did not. (at least not on my computer) But no problem since I am using a flash-drive, instead of my CD Drive.
If puppy had no need to lock the drives, the popup would not be needed, I suppose. :?:

Bruce B

#14 Post by Bruce B »

markofkane wrote:I did not actually mean the popup, but the fact that Puppy 4.21 locks the drives. Where as 4.12 did not. (at least not on my computer) But no problem since I am using a flash-drive, instead of my CD Drive.
If puppy had no need to lock the drives, the popup would not be needed, I suppose. :?:
Puppy doesn't need a pup_save file, if it stays mounted for
the pup_save file, it's for your convenience, so you can
read from the save file and periodically write back to it.

Puppy needs the pup_xxx.sfs file. If it is not copied to
RAM, and it won't be unless you have sufficient RAM, it
needs the USB stick* mounted or Puppy won't work.

* unless it got mounted from another location

~

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#15 Post by markofkane »

I got 2GB of RAM. So that is not an issue. :)

BTW, just out of curiosity, what would happen if I took out my USB stick? Would it corrupt Puppy?

I won't do it, but wondering is all.

User avatar
floborg
Posts: 199
Joined: Thu 25 Oct 2007, 12:12
Location: Fort Worth, TX

#16 Post by floborg »

If you don't have a pupsave (pfix=RAM, or first boot), AND you see the purple message that the puppy SFS file is copied to RAM, then Puppy isn't really using the boot media. You can just type "umount /dev/xxx" in the console and it will unmount. Just pulling it out? Not sure what will happen, but if you issue the umount command first, you should be fine.
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#17 Post by Béèm »

A device which is unmounted can be removed safely.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#18 Post by markofkane »

floborg wrote:If you don't have a pupsave (pfix=RAM, or first boot), AND you see the purple message that the puppy SFS file is copied to RAM, then Puppy isn't really using the boot media. You can just type "umount /dev/xxx" in the console and it will unmount. Just pulling it out? Not sure what will happen, but if you issue the umount command first, you should be fine.
I tried that. It said

"cannot umount /initrd/mnt/dev_ro2 Device or resource busy"

The command I used was:

"umount /dev/sdb1" which is my flash drive.

User avatar
floborg
Posts: 199
Joined: Thu 25 Oct 2007, 12:12
Location: Fort Worth, TX

#19 Post by floborg »

markofkane wrote:
floborg wrote:If you don't have a pupsave (pfix=RAM, or first boot), AND you see the purple message that the puppy SFS file is copied to RAM, then Puppy isn't really using the boot media. You can just type "umount /dev/xxx" in the console and it will unmount. Just pulling it out? Not sure what will happen, but if you issue the umount command first, you should be fine.
I tried that. It said

"cannot umount /initrd/mnt/dev_ro2 Device or resource busy"

The command I used was:

"umount /dev/sdb1" which is my flash drive.
You have written that you have 2 GB of RAM, so the puppy SFS should get copied to RAM. This will let you unmount the boot device, ONLY if a pupsave has not been loaded. Are you using a pupsave?
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM

User avatar
markofkane
Posts: 310
Joined: Thu 03 Jul 2008, 09:02
Location: Kane, IL USA

#20 Post by markofkane »

Yes. I use Pupsave to save to a USB Hard Drive.

There is no need to keep the CD or USB thumb drive plugged in, but it won't won't let go. :?

Post Reply