Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 30 Aug 2014, 04:39
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Live(frugal)HD & LiveUSB Boot
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Fri 20 Mar 2009, 01:12    Post subject:  Live(frugal)HD & LiveUSB Boot
Subject description: How to automatically unmount the drive, just like the LiveCD?
 

The closest I seem to be able to get a frugal install to boot just like the Live CD is with pfix=ram. The hard drive partition I boot from, however, remains mounted.

Pmount doesn't want to let go of the boot partition. The nifty icon on the desktop had a yellow dot on it rather than green.

Sure, I can run
Code:
umount /dev/sdaX

to unmount it, but that's extra work.

Is there any boot option that will cause Puppy to release all media when startup is complete?

...or, will I have to dig into initrd.gz and add something to the startup script => hassle.


PS: While we're at it, which boot options can get me past the mouse selection screen and Xorg config screen? I already use pkeys=xx to get past the keyboard screen.

_________________
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM

Last edited by floborg on Sat 18 Apr 2009, 12:36; edited 3 times in total
Back to top
View user's profile Send private message 
jamesjeffries2

Joined: 27 Apr 2008
Posts: 196

PostPosted: Sun 22 Mar 2009, 12:21    Post subject:  

add that line to your /etc/rc.d/rc.local. It means it will be called every time at start up.

probably less hassle this way to be honest as then you dont have to remember the boot option everytime you want to start puppy. Also means you can boot then leave it to make breakfast instead of having to enter the option Wink
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Sun 22 Mar 2009, 16:02    Post subject:  

Interesting question, floborg.
What is your reasoning to absolutely unmount the partition you boot from?

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Sun 22 Mar 2009, 16:49    Post subject:  

Béèm wrote:
Interesting question, floborg.
What is your reasoning to absolutely unmount the partition you boot from?


Peace of mind. Like jamesjeffries2 said, it's nice to just start booting Puppy, walk away and come back to desktop - all ready to go. I want to take that a step further and run just like a LiveCD - completely in RAM, with no media mounted. Keep in mind, there's no pupsave file either.

_________________
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Sun 22 Mar 2009, 17:28    Post subject:  

I haven't seen an option for this.
I suppose there is a reason why the media the isn't released. But I don't know. You might PM Barry Kauler or Whodo.

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Wed 25 Mar 2009, 21:47    Post subject:  

Our exalted developers-in-chief take random PMs?

Since posting this originally, I've learned that Knoppix has a "fromiso" boot option. Someone in the Ubuntu forums ported it to Ubuntu, and, when I tried it, it more or less behaved like the LiveCD. Now, it didn't release the HD, but the Ubuntu LiveCD doesn't either. If Puppy could be tricked into thinking a frugal install is a LiveCD with a fromiso option, I think the HD will be released.

_________________
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Thu 26 Mar 2009, 07:03    Post subject:  

You could try to edit the PUPMODE line to read 5 (boot from CD) in /etc/pupstate.
_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Fri 17 Apr 2009, 13:22    Post subject:    

On a related note, Puppy doesn't unmount a USB flash drive it boots from - even if the Puppy SFS file is copied to RAM.

Again, I had to manually run the umount command from the console. There were no problems with the live system afterwards, and the drive is fine.

What's so special about a CD boot that it's the only type that releases the boot media? Is this just a holdover from legacy Puppies that were only intended for LiveCD use?

_________________
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM
Back to top
View user's profile Send private message 
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Sun 19 Apr 2009, 23:51    Post subject:  

I tried a sloppy hack in the init script inside initrd.gz. Near the end, there's this line:

Code:
#v3.01 a bit untidy, but cd may still be mounted when it doesn't have to be...
case $PMEDIA in
 *cd)
  [ "$PDEV1" ] && umount /dev/$PDEV1 2>/dev/null #okay if it fails.
  ;;
esac


I just added another case - $PMEDIA in *flash). The result was that my USB flash drive was not mounted when the desktop came up. I did, however, get the warning message about not unplugging the flash drive. Otherwise, the live system behaved just fine.

I think a better approach would be modify the official script to unmount any type of boot media as long as the SFS was copied to RAM and there's no pup save file on it.

_________________
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM
Back to top
View user's profile Send private message 
sky king

Joined: 08 Apr 2009
Posts: 72

PostPosted: Thu 23 Apr 2009, 05:26    Post subject: booting from usb to ram
Subject description: and using pupsave to usb
 

I have an older laptop that I have got to boot first from CD, then usb. This has resulted in the system running off the usb, not running in ram. I still want a pup_save file to remember all my settings. Maybe I should just run frugal from the hard drive. I really don't want to mess with the boot partition on the hard drive, maybe I could still just use the CD to boot to the HD. Then again, maybe I'm saving wear on the HD by using the cheap usb stick. Decisions...
Back to top
View user's profile Send private message 
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Thu 23 Apr 2009, 21:14    Post subject:  

So, here's the fix:

Code:
# Unmount boot device if first boot and Puppy SFS copied to RAM
if [ "$PUPMODE" = 5 ] && [ "$COPY2RAM" = "yes" ];then
umount /dev/$PDEV1 2>/dev/null
fi


I put this into the init script right after the code that unmounts the cd (quoted earlier). This worked when I tried a pfix=ram boot from a frugal hard drive install and a USB flash install. Once again, the live system worked fine. I am concerned that this is not the best method, based on Barry's comment on the cd unmount code.

The "Don't unplug" message was still displayed. That's because I missed something in the delayedrun file that exists inside the Puppy SFS file. The fix entails another edit to the init script:

Code:
#/etc/PUPSTATE passes useful variables to the running puppy...
mkdir -p /pup_rw/etc/rc.d
echo "PUPMODE=$PUPMODE" > /pup_rw/etc/rc.d/PUPSTATE
echo "PDEV1='$PDEV1'" >> /pup_rw/etc/rc.d/PUPSTATE
echo "DEV1FS='$DEV1FS'" >> /pup_rw/etc/rc.d/PUPSTATE
echo "PUPSFS='$PUPSFS'" >> /pup_rw/etc/rc.d/PUPSTATE
echo "PUPSAVE='$PUPSAVE'" >> /pup_rw/etc/rc.d/PUPSTATE
echo "PMEDIA='$PMEDIA'" >> /pup_rw/etc/rc.d/PUPSTATE
echo "COPY2RAM='$COPY2RAM'" >> /pup_rw/etc/rc.d/PUPSTATE


I added the COPY2RAM line. Also needed is a change to the delayedrun script. I probably have the wrong logic, but here it is:

Code:
#v2.16 popup a warning if booting from usb flash...
#  ...only if it is still mounted
if [ "$PUPMODE" = 5 ] && [ "$COPY2RAM" = "yes" ];then
else
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
fi


I would appreciate it if someone would inspect this and include it in the next release. The updated files are attached.
delayedrun-original.tar.gz
Description 
gz

 Download 
Filename  delayedrun-original.tar.gz 
Filesize  1.79 KB 
Downloaded  493 Time(s) 
init.tar.gz
Description 
gz

 Download 
Filename  init.tar.gz 
Filesize  17.37 KB 
Downloaded  489 Time(s) 

_________________
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM
Back to top
View user's profile Send private message 
polarops3

Joined: 21 Jun 2008
Posts: 3
Location: salem, oregon usa

PostPosted: Fri 28 Aug 2009, 15:17    Post subject: how do you handle keyboard and resolution spec'?  

Thank you very much for doing this! This is exactly the way I like to run my old sony vaio pcg r505tl to get the most snap out of my hardware and the longest duration out of my battery. (Fan runs almost continuously, though, probably due to excessive RAM usage.)

So how do you handle keyboard region and screen resolution specification for a nice clean "go make some coffee" boot?

Also, for hacks like moi, this might be helpful for how to unpack and repack the initrd.gz:

http://www.murga-linux.com/puppy/viewtopic.php?p=168712#168712
Back to top
View user's profile Send private message 
James.Esperantist

Joined: 06 Nov 2009
Posts: 5

PostPosted: Fri 06 Nov 2009, 19:49    Post subject:  

Is is safe for sure? Can it be incorporated in a ...safer way? =D
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0829s ][ Queries: 12 (0.0098s) ][ GZIP on ]